def testThreadSafeCounter(self):
     counter = test_dispatcher._ThreadSafeCounter()
     for i in xrange(5):
         self.assertEqual(counter.GetAndIncrement(), i)
 def testThreadSafeCounter(self):
   counter = test_dispatcher._ThreadSafeCounter()
   for i in xrange(5):
     self.assertEqual(counter.GetAndIncrement(), i)
 def testSetUp(self):
     runners = []
     counter = test_dispatcher._ThreadSafeCounter()
     test_dispatcher._SetUp(MockRunner, '0', runners, counter)
     self.assertEqual(len(runners), 1)
     self.assertEqual(runners[0].setups, 1)
 def testSetUp(self):
   runners = []
   counter = test_dispatcher._ThreadSafeCounter()
   test_dispatcher._SetUp(MockRunner, '0', runners, counter)
   self.assertEqual(len(runners), 1)
   self.assertEqual(runners[0].setups, 1)