testtools: Import new upstream snapshot.
[nivanova/samba-autobuild/.git] / lib / testtools / testtools / tests / test_testsuite.py
index 3f2f02758f4dc71aa0b53cc85ef2b8ceb617bf0d..eeb8fd28119cb973285264bff98d284ab4895274 100644 (file)
@@ -4,6 +4,7 @@
 
 __metaclass__ = type
 
+import datetime
 import unittest
 
 from testtools import (
@@ -35,16 +36,12 @@ class TestConcurrentTestSuiteRun(TestCase):
         original_suite = unittest.TestSuite([test1, test2])
         suite = ConcurrentTestSuite(original_suite, self.split_suite)
         suite.run(result)
-        test1 = log[0][1]
+        # 0 is the timestamp for the first test starting.
+        test1 = log[1][1]
         test2 = log[-1][1]
         self.assertIsInstance(test1, Sample)
         self.assertIsInstance(test2, Sample)
         self.assertNotEqual(test1.id(), test2.id())
-        # We expect the start/outcome/stop to be grouped
-        expected = [('startTest', test1), ('addSuccess', test1),
-            ('stopTest', test1), ('startTest', test2), ('addSuccess', test2),
-            ('stopTest', test2)]
-        self.assertThat(log, Equals(expected))
 
     def split_suite(self, suite):
         tests = list(iterate_tests(suite))