runner tests should take start_time from future.start_time
@@ -289,7 +289,7 @@ def test_wait_for__times_out_on_constructor_timeout(observer_runner, connection_
connection_observer.timeout = 0.2
future = observer_runner.submit(connection_observer)
- start_time = time.time()
+ start_time = future.start_time
with pytest.raises(MolerTimeout):
observer_runner.wait_for(connection_observer, future,
timeout=None) # means: use .timeout of observer
@@ -308,7 +308,7 @@ def test_wait_for__times_out_on_specified_timeout(observer_runner, connection_ob
connection_observer.timeout = 0.4
future = observer_runner.submit(connection_observer)
- start_time = time.time()
+ start_time = future.start_time
with pytest.raises(MolerTimeout):
observer_runner.wait_for(connection_observer, future,
timeout=0.2) # means: use timeout of wait_for (shorter then initial one)
@@ -323,7 +323,7 @@ def test_wait_for__times_out_on_earlier_timeout(observer_runner, connection_obse
connection_observer.timeout = 0.3
future = observer_runner.submit(connection_observer)
- start_time = time.time()
+ start_time = future.start_time
with pytest.raises(MolerTimeout):
observer_runner.wait_for(connection_observer, future,
timeout=0.5) # means: timeout of wait_for longer then initial one
@@ -338,7 +338,7 @@ def test_wait_for__tracks_changes_of_observer_timeout__extension(observer_runner
connection_observer.timeout = 0.2
future = observer_runner.submit(connection_observer)
- start_time = time.time()
+ start_time = future.start_time
def modify_observer_timeout():
time.sleep(0.15)
@@ -359,7 +359,7 @@ def test_wait_for__tracks_changes_of_observer_timeout__shortening(observer_runne
connection_observer.timeout = 0.35
future = observer_runner.submit(connection_observer)
- start_time = time.time()
+ start_time = future.start_time
def modify_observer_timeout():
time.sleep(0.05)
@@ -382,7 +382,7 @@ def test_wait_for__direct_timeout_takes_precedence_over_extended_observer_timeou
connection_observer.timeout = 0.2
future = observer_runner.submit(connection_observer)
- start_time = time.time()
+ start_time = future.start_time
def modify_observer_timeout():
time.sleep(0.15)
