Since this thing is on the innerwebs I suppose it should have a
[python_utils.git] / tests / decorator_utils_test.py
1 #!/usr/bin/env python3
2
3 # © Copyright 2021-2022, Scott Gasch
4
5 """decorator_utils unittest such as it is."""
6
7 import unittest
8
9 import decorator_utils as du
10 import unittest_utils as uu
11
12
13 class TestDecorators(unittest.TestCase):
14     def test_singleton(self):
15         @du.singleton
16         class FooBar:
17             pass
18
19         x = FooBar()
20         y = FooBar()
21         self.assertTrue(x is y)
22
23
24 if __name__ == '__main__':
25     unittest.main()