Пример #1
0
        def test_decorator(cls):
            NonLocal.reassign(test_decorator_called, test_decorator_called + 1)

            self.assertIsInstance(cls, a)
            cls = cls.unboxed

            self.assertIsInstance(cls, b)
            cls = cls.unboxed

            self.assertIsInstance(cls, c)
            cls = cls.unboxed

            self.assertIsInstance(cls, type)
            return cls
Пример #2
0
 def new(cls):
     NonLocal.reassign(called, called + 1)
     return object.__new__(cls)