diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-19 13:52:59 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-19 13:52:59 (GMT) |
commit | 4c9706bd275134d513c61e07764215a7d0c2302c (patch) | |
tree | e6fa27d81211d15e3028e9ce7cde899c58a6f3c4 /Lib/packaging/tests/test_command_build_py.py | |
parent | 21a9c748aa8698c8201e30a58320d587f6bb7540 (diff) | |
download | cpython-4c9706bd275134d513c61e07764215a7d0c2302c.zip cpython-4c9706bd275134d513c61e07764215a7d0c2302c.tar.gz cpython-4c9706bd275134d513c61e07764215a7d0c2302c.tar.bz2 |
package: replace open(fn, 'w').close() by open(fn, 'wb').close()
We don't need to open the files in text mode just to create them (or update
their modification time).
Diffstat (limited to 'Lib/packaging/tests/test_command_build_py.py')
-rw-r--r-- | Lib/packaging/tests/test_command_build_py.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/packaging/tests/test_command_build_py.py b/Lib/packaging/tests/test_command_build_py.py index 9b40e6d..3c5630b 100644 --- a/Lib/packaging/tests/test_command_build_py.py +++ b/Lib/packaging/tests/test_command_build_py.py @@ -72,10 +72,10 @@ class BuildPyTestCase(support.TempdirManager, sources = self.mkdtemp() pkg = os.path.join(sources, 'pkg') os.mkdir(pkg) - open(os.path.join(pkg, "__init__.py"), "w").close() + open(os.path.join(pkg, "__init__.py"), "wb").close() testdir = os.path.join(pkg, "doc") os.mkdir(testdir) - open(os.path.join(testdir, "testfile"), "w").close() + open(os.path.join(testdir, "testfile"), "wb").close() os.chdir(sources) old_stdout = sys.stdout |