]> granicus.if.org Git - python/commit
bpo-29796: test_weakref: Fix collect_in_thread() on Windows (#2553)
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 4 Jul 2017 09:36:16 +0000 (11:36 +0200)
committerGitHub <noreply@github.com>
Tue, 4 Jul 2017 09:36:16 +0000 (11:36 +0200)
commit1fef0154d97bd7f01c5bc59954a278bacf1a3f0e
treec8f446f5f2f757959217c1c5bf4547525e424216
parent2e5867d93ab2717f55e0b0622a38d917b00c05e3
bpo-29796: test_weakref: Fix collect_in_thread() on Windows (#2553)

Sleep 1 ms instead of 0.1 ms to workaround a rounding issue on
Windows. On Windows, time.sleep(0.0001) sleeps 0 ms, so
collect_in_thread() calls gc.collect() in a loop and tests using this
thread takes too long. Sleep 1 ms so time.sleep() sleeps 15.6 ms on
Windows.
Lib/test/test_weakref.py