summaryrefslogtreecommitdiff
path: root/tests/decorator_utils_test.py
blob: 2cc2b5f71d14d7295e4610ffccf16f543c766478 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/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()