Browse Source

tests/thread: Make sure that thread tests don't rely on floating point.

pull/2165/head
Damien George 9 years ago
parent
commit
15e68277c1
  1. 2
      tests/thread/stress_aes.py
  2. 2
      tests/thread/thread_exit1.py
  3. 2
      tests/thread/thread_exit2.py
  4. 2
      tests/thread/thread_lock2.py
  5. 2
      tests/thread/thread_sleep1.py
  6. 2
      tests/thread/thread_start1.py
  7. 2
      tests/thread/thread_start2.py

2
tests/thread/stress_aes.py

@ -252,4 +252,4 @@ if __name__ == '__main__':
for i in range(n_thread):
_thread.start_new_thread(thread_entry, ())
while count.value < n_thread:
time.sleep(0.1)
time.sleep(1)

2
tests/thread/thread_exit1.py

@ -15,5 +15,5 @@ _thread.start_new_thread(thread_entry, ())
_thread.start_new_thread(thread_entry, ())
# wait for threads to finish
time.sleep(0.2)
time.sleep(1)
print('done')

2
tests/thread/thread_exit2.py

@ -15,5 +15,5 @@ _thread.start_new_thread(thread_entry, ())
_thread.start_new_thread(thread_entry, ())
# wait for threads to finish
time.sleep(0.2)
time.sleep(1)
print('done')

2
tests/thread/thread_lock2.py

@ -20,5 +20,5 @@ for i in range(4):
_thread.start_new_thread(thread_entry, ())
# wait for threads to finish
time.sleep(0.2)
time.sleep(1)
print('done')

2
tests/thread/thread_sleep1.py

@ -24,5 +24,5 @@ for i in range(n_thread):
# wait for threads to finish
while n_finished < n_thread:
time.sleep(0.1)
time.sleep(1)
print('done', n_thread)

2
tests/thread/thread_start1.py

@ -19,5 +19,5 @@ _thread.start_new_thread(thread_entry, (10,))
_thread.start_new_thread(thread_entry, (20,))
# wait for threads to finish
time.sleep(0.2)
time.sleep(1)
print('done')

2
tests/thread/thread_start2.py

@ -15,5 +15,5 @@ def thread_entry(a0, a1, a2, a3):
_thread.start_new_thread(thread_entry, (10, 20), {'a2': 0, 'a3': 1})
# wait for thread to finish
time.sleep(0.2)
time.sleep(1)
print('done')

Loading…
Cancel
Save