Do a timeout test

This commit is contained in:
Roland Hedberg
2010-03-09 18:35:38 +01:00
parent 47414e2e1c
commit 4d23a8e6f3

View File

@@ -85,3 +85,8 @@ def test_valid():
assert valid(this_instance) == False # unless on a very fast machine :-)
soon = in_a_while(seconds=10)
assert valid(soon) == True
def test_timeout():
soon = in_a_while(seconds=1)
time.sleep(2)
assert valid(soon) == False