Skip to content

Commit

Permalink
more tolerance in testing thread start
Browse files Browse the repository at this point in the history
  • Loading branch information
mdipierro committed Apr 19, 2018
1 parent 954d322 commit b7677e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/contribs.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ def worker1():
content = g.read()

results = [line.strip().split('\t') for line in content.split('\n') if line]
# all started at the same time
starts = [float(line[0])-t0<0.01 for line in results]
# all started at more or less the same time
starts = [1 for line in results if float(line[0])-t0<1]
ends = [line[1] for line in results]
self.assertEqual(len(set(starts)), 1)
self.assertEqual(sum(starts), len(starts))
# end - start is at least 2
for line in results:
self.assertTrue(float(line[1]) - float(line[0]) >= 2)
Expand Down

0 comments on commit b7677e5

Please sign in to comment.