Do a timeout test
This commit is contained in:
@@ -84,4 +84,9 @@ def test_valid():
|
|||||||
print this_instance
|
print this_instance
|
||||||
assert valid(this_instance) == False # unless on a very fast machine :-)
|
assert valid(this_instance) == False # unless on a very fast machine :-)
|
||||||
soon = in_a_while(seconds=10)
|
soon = in_a_while(seconds=10)
|
||||||
assert valid(soon) == True
|
assert valid(soon) == True
|
||||||
|
|
||||||
|
def test_timeout():
|
||||||
|
soon = in_a_while(seconds=1)
|
||||||
|
time.sleep(2)
|
||||||
|
assert valid(soon) == False
|
||||||
|
|||||||
Reference in New Issue
Block a user