summaryrefslogtreecommitdiff
path: root/test/unittest_deprecation.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/unittest_deprecation.py')
-rw-r--r--test/unittest_deprecation.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unittest_deprecation.py b/test/unittest_deprecation.py
index 7881252..60b10f4 100644
--- a/test/unittest_deprecation.py
+++ b/test/unittest_deprecation.py
@@ -107,6 +107,17 @@ class RawInputTC(TestCase):
with self.assertRaises(ValueError):
some_function(new=42, old=42)
+ def test_argument_removed(self):
+ @deprecation.argument_removed("old")
+ def some_function(new):
+ return new
+
+ self.assertEqual(some_function(new=42), 42)
+ self.assertEqual(some_function(new=10, old=20), 10)
+ self.assertEqual(self.messages,
+ ['argument old of callable some_function has been removed and is '
+ 'deprecated'])
+
def test_renamed(self):
def any_func():
pass