summaryrefslogtreecommitdiffstats
path: root/Lib/packaging/tests/test_database.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-05-19 13:52:59 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-05-19 13:52:59 (GMT)
commit4c9706bd275134d513c61e07764215a7d0c2302c (patch)
treee6fa27d81211d15e3028e9ce7cde899c58a6f3c4 /Lib/packaging/tests/test_database.py
parent21a9c748aa8698c8201e30a58320d587f6bb7540 (diff)
downloadcpython-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_database.py')
-rw-r--r--Lib/packaging/tests/test_database.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/packaging/tests/test_database.py b/Lib/packaging/tests/test_database.py
index c8d9415..251181a 100644
--- a/Lib/packaging/tests/test_database.py
+++ b/Lib/packaging/tests/test_database.py
@@ -133,7 +133,7 @@ class TestDistribution(CommonDistributionTests, unittest.TestCase):
def tearDown(self):
for distinfo_dir in self.dirs:
record_file = os.path.join(distinfo_dir, 'RECORD')
- open(record_file, 'w').close()
+ open(record_file, 'wb').close()
super(TestDistribution, self).tearDown()
def test_instantiation(self):