MNT Deprecate assert_true and assert_false
@@ -94,8 +94,6 @@ __all__.extend(additional_names_in_all)
_dummy = TestCase('__init__')
assert_equal = _dummy.assertEqual
assert_not_equal = _dummy.assertNotEqual
-assert_true = _dummy.assertTrue
-assert_false = _dummy.assertFalse
assert_raises = _dummy.assertRaises
SkipTest = unittest.case.SkipTest
assert_dict_equal = _dummy.assertDictEqual
@@ -112,6 +110,16 @@ assert_raises_regex = _dummy.assertRaisesRegex
# the old name for now
assert_raises_regexp = assert_raises_regex
+deprecation_message = "'assert_true' is deprecated in version 0.21 " \
+ "and will be removed in version 0.23. " \
+ "Please use 'assert' instead."
+assert_true = deprecated(deprecation_message)(_dummy.assertTrue)
+
+deprecation_message = "'assert_false' is deprecated in version 0.21 " \
+ "and will be removed in version 0.23. " \
+ "Please use 'assert' instead."
+assert_false = deprecated(deprecation_message)(_dummy.assertFalse)
+
def assert_warns(warning_class, func, *args, **kw):
"""Test that a certain warning occurs.
