diff options
author | Lars Gustäbel <lars@gustaebel.de> | 2007-08-28 07:34:33 (GMT) |
---|---|---|
committer | Lars Gustäbel <lars@gustaebel.de> | 2007-08-28 07:34:33 (GMT) |
commit | a280ca759492360fd7440476f513fa9726d22bff (patch) | |
tree | 95474291136ddb7b070c4f602b6c5a2a24d40945 /Lib/test/test_tarfile.py | |
parent | 6665cefb852fd728b6db25ce38d3ba3134c08044 (diff) | |
download | cpython-a280ca759492360fd7440476f513fa9726d22bff.zip cpython-a280ca759492360fd7440476f513fa9726d22bff.tar.gz cpython-a280ca759492360fd7440476f513fa9726d22bff.tar.bz2 |
Conform to strict str/bytes distinction.
Diffstat (limited to 'Lib/test/test_tarfile.py')
-rw-r--r-- | Lib/test/test_tarfile.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py index 913ab60..8a59879 100644 --- a/Lib/test/test_tarfile.py +++ b/Lib/test/test_tarfile.py @@ -481,7 +481,7 @@ class WriteTest(unittest.TestCase): tar = tarfile.open(tmpname, self.mode) path = os.path.join(TEMPDIR, "file") fobj = open(path, "wb") - fobj.write("aaa") + fobj.write(b"aaa") fobj.close() tar.add(path) tar.close() @@ -499,7 +499,7 @@ class WriteTest(unittest.TestCase): self.assertEqual(tarinfo.size, 0) fobj = open(path, "wb") - fobj.write("aaa") + fobj.write(b"aaa") fobj.close() tarinfo = tar.gettarinfo(path) self.assertEqual(tarinfo.size, 3) @@ -603,7 +603,7 @@ class StreamWriteTest(unittest.TestCase): data = fobj.read() fobj.close() - self.assert_(data.count("\0") == tarfile.RECORDSIZE, + self.assert_(data.count(b"\0") == tarfile.RECORDSIZE, "incorrect zero padding") @@ -693,7 +693,7 @@ class HardlinkTest(unittest.TestCase): self.bar = os.path.join(TEMPDIR, "bar") fobj = open(self.foo, "wb") - fobj.write("foo") + fobj.write(b"foo") fobj.close() os.link(self.foo, self.bar) |