25 sys.path.insert(1,
"../")
29 from Singleton
import *
61 self.assertEqual(mock0.get(), 0)
62 self.assertEqual(mock1.get(), 0)
64 self.assertEqual(mock0.get(), 1)
65 self.assertEqual(mock1.get(), 1)
67 self.assertEqual(mock0.get(), 2)
68 self.assertEqual(mock1.get(), 2)
69 mock2 = SingletonMock.instance()
71 self.assertEqual(mock0.get(), 2)
72 self.assertEqual(mock1.get(), 2)
73 self.assertEqual(mock2.get(), 2)
76 if __name__ ==
"__main__":
def test_SingletonCase(self)