diff options
Diffstat (limited to 'src/tests/test.py')
-rw-r--r-- | src/tests/test.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/tests/test.py b/src/tests/test.py index ab65dfa..b01bc10 100644 --- a/src/tests/test.py +++ b/src/tests/test.py @@ -77,7 +77,19 @@ class ExtraTestCase(unittest.TestCase): self.assertNotEqual(d1.__code__.co_filename, d2.__code__.co_filename) self.assertNotEqual(f1.__code__.co_filename, f2.__code__.co_filename) - self.assertNotEqual(f1_orig.__code__.co_filename, f1.__code__.co_filename) + self.assertNotEqual(f1_orig.__code__.co_filename, + f1.__code__.co_filename) + + def test_no_first_arg(self): + @decorator + def example(*args, **kw): + return args[0](*args[1:], **kw) + + @example + def func(**kw): + return kw + + self.assertEqual(func(f='a'), {'f': 'a'}) # ################### test dispatch_on ############################# # # adapted from test_functools in Python 3.5 |