diff options
Diffstat (limited to 'tests/decorator_utils_test.py')
| -rwxr-xr-x | tests/decorator_utils_test.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/decorator_utils_test.py b/tests/decorator_utils_test.py new file mode 100755 index 0000000..195dd63 --- /dev/null +++ b/tests/decorator_utils_test.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python3 + +import unittest + +import decorator_utils as du + +import unittest_utils as uu + + +class TestDecorators(unittest.TestCase): + + def test_singleton(self): + + @du.singleton + class FooBar(): + pass + + x = FooBar() + y = FooBar() + self.assertTrue(x is y) + + +if __name__ == '__main__': + unittest.main() |
