projects
/
python_utils.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
2cc2b5f71d14d7295e4610ffccf16f543c766478
[python_utils.git]
/
tests
/
decorator_utils_test.py
1
#!/usr/bin/env python3
2
3
import unittest
4
5
import decorator_utils as du
6
import unittest_utils as uu
7
8
9
class TestDecorators(unittest.TestCase):
10
def test_singleton(self):
11
@du.singleton
12
class FooBar:
13
pass
14
15
x = FooBar()
16
y = FooBar()
17
self.assertTrue(x is y)
18
19
20
if __name__ == '__main__':
21
unittest.main()