diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-06-30 18:20:11 +0200 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-06-30 18:20:11 +0200 |
commit | a6d2c769fb38129b6654f8e4ad5b6b27af182f2c (patch) | |
tree | d45f5ca3e8633072da875d9944012f644d440bc3 /Lib/test/test_threading.py | |
parent | eaf399e3355e6d62b1bb5810b66ad4ff431ece57 (diff) | |
download | cpython-git-a6d2c769fb38129b6654f8e4ad5b6b27af182f2c.tar.gz |
Issue #12451: Open files in binary mode in some tests when the text file is not
needed.
Remove also an unused variable (blank) in test_threading.
Diffstat (limited to 'Lib/test/test_threading.py')
-rw-r--r-- | Lib/test/test_threading.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index 416d95f68d..703f80e7ac 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -642,11 +642,10 @@ class ThreadJoinOnShutdown(BaseTestCase): def random_io(): '''Loop for a while sleeping random tiny amounts and doing some I/O.''' - blank = b'x' * 200 while True: - in_f = open(os.__file__, 'r') + in_f = open(os.__file__, 'rb') stuff = in_f.read(200) - null_f = open(os.devnull, 'w') + null_f = open(os.devnull, 'wb') null_f.write(stuff) time.sleep(random.random() / 1995) null_f.close() |