def test_deprecated():
 with warnings.catch_warnings(record=True) as w:
  warnings.simplefilter('always')
  deprecated_func()
 assert_true((len(w) == 1))
 with warnings.catch_warnings(record=True) as w:
  warnings.simplefilter('always')
  deprecated_class()
 assert_true((len(w) == 1))

def test_deprecated ( ) : with warnings . catch_warnings ( record = True ) as w : warnings . simplefilter ( 'always' ) deprecated_func ( ) assert_true ( ( len ( w ) == 1 ) ) with warnings . catch_warnings ( record = True ) as w : warnings . simplefilter ( 'always' ) deprecated_class ( ) assert_true ( ( len ( w ) == 1 ) )
test deprecated function .