Skip to content

Commit

Permalink
Update test_feature.py
Browse files Browse the repository at this point in the history
  • Loading branch information
GoodManWEN authored Dec 30, 2020
1 parent bb93459 commit 5449226
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def some_error():

list(map(lambda x:x.result() , results))
end_time = time.time()
assert (_sleeptime - _inaccuracy) <= (end_time - start_time) <= (_sleeptime + _inaccuracy + _interval * _range3)
assert (_sleeptime - _inaccuracy) <= (end_time - start_time) <= (_sleeptime * _range3 - _inaccuracy + _interval * _range3)

# test shrink
assert len(executor._threads) == _range3
Expand All @@ -77,4 +77,4 @@ def some_error():
list(map(lambda x:x.result() , results))
end_time = time.time()
expect_time = (_time3 * _range4) / _range2
assert (expect_time - _inaccuracy) <= (end_time - start_time) <= (expect_time + _inaccuracy)
assert (expect_time - _inaccuracy) <= (end_time - start_time) <= (expect_time + _inaccuracy)

0 comments on commit 5449226

Please sign in to comment.