diff options
| author | Michele Simionato <michele.simionato@gmail.com> | 2018-01-14 11:02:37 +0100 |
|---|---|---|
| committer | Michele Simionato <michele.simionato@gmail.com> | 2018-01-14 11:02:37 +0100 |
| commit | 723c5cec2e2be34d033d0c7ace7654480f5607ff (patch) | |
| tree | 10426653b11326c972be707150858aee86d703cc /src/tests | |
| parent | 12caca929e4f6401730cb1d29d1ebc855a763482 (diff) | |
| download | python-decorator-git-723c5cec2e2be34d033d0c7ace7654480f5607ff.tar.gz | |
Fixed IPython issue4.2.1
Diffstat (limited to 'src/tests')
| -rw-r--r-- | src/tests/test.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tests/test.py b/src/tests/test.py index 7eb8391..e5f2ff4 100644 --- a/src/tests/test.py +++ b/src/tests/test.py @@ -119,6 +119,12 @@ class ExtraTestCase(unittest.TestCase): # there is no confusion when passing args as a keyword argument self.assertEqual(func(args='a'), {'args': 'a'}) + def test_decorator_factory(self): + # similar to what IPython is doing in traitlets.config.application + @decorator + def catch_config_error(method, app, *args, **kwargs): + return method(app) + catch_config_error(lambda app: None) # ################### test dispatch_on ############################# # # adapted from test_functools in Python 3.5 |
