From 723c5cec2e2be34d033d0c7ace7654480f5607ff Mon Sep 17 00:00:00 2001 From: Michele Simionato Date: Sun, 14 Jan 2018 11:02:37 +0100 Subject: Fixed IPython issue --- src/tests/test.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/tests') 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 -- cgit v1.2.1