mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
tests: Make faketime tests less susceptible to race conditions
The duration can be 10:01 if the original task call happened a split second before the faketime fixation of +10 minutes. Use more relaxed regular expresison to check.
This commit is contained in:
parent
54cfc6cab9
commit
ccb222a31b
1 changed files with 2 additions and 2 deletions
|
@ -51,7 +51,7 @@ class TestBug1999(TestCase):
|
||||||
self.t(("stop", "1"))
|
self.t(("stop", "1"))
|
||||||
|
|
||||||
code, out, err = self.t(("info", "1"))
|
code, out, err = self.t(("info", "1"))
|
||||||
self.assertIn("duration: 0:10:00", out)
|
self.assertRegex(out, "duration: 0:10:0[0-5]")
|
||||||
|
|
||||||
|
|
||||||
class TestBug1999Server(ServerTestCase):
|
class TestBug1999Server(ServerTestCase):
|
||||||
|
@ -77,7 +77,7 @@ class TestBug1999Server(ServerTestCase):
|
||||||
self.t1("sync")
|
self.t1("sync")
|
||||||
|
|
||||||
code, out, err = self.t1(("info", "1"))
|
code, out, err = self.t1(("info", "1"))
|
||||||
self.assertIn("duration: 0:10:00", out)
|
self.assertRegex(out, "duration: 0:10:0[0-5]")
|
||||||
|
|
||||||
self.t2("sync")
|
self.t2("sync")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue