summaryrefslogtreecommitdiff
path: root/tests/decorator_utils_test.py
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2021-09-21 18:25:50 -0700
committerScott Gasch <[email protected]>2021-09-21 18:25:50 -0700
commitc46018e2b1ddc78f9df557c3fb24d2c2c849f054 (patch)
treeb44229a07af57dff717e579b789d9e5f4d00f408 /tests/decorator_utils_test.py
parent946279b8b220d9dffe3b47b3bda8ba9e48ccb25a (diff)
Persistent state.
Diffstat (limited to 'tests/decorator_utils_test.py')
-rwxr-xr-xtests/decorator_utils_test.py24
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()