diff options
author | Guido van Rossum <guido@python.org> | 2007-08-27 23:26:56 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-08-27 23:26:56 (GMT) |
commit | 7dcb844892bbcc7e06e8cde5d7d153bb7ea3fda5 (patch) | |
tree | 1ae892d6318c2c92bd69ddbd2a04129532df5f18 /Lib/test/test_posixpath.py | |
parent | 7d5baac81ce7617bc70f721b0ad90e95391063bb (diff) | |
download | cpython-7dcb844892bbcc7e06e8cde5d7d153bb7ea3fda5.zip cpython-7dcb844892bbcc7e06e8cde5d7d153bb7ea3fda5.tar.gz cpython-7dcb844892bbcc7e06e8cde5d7d153bb7ea3fda5.tar.bz2 |
More str/bytes strictness.
Diffstat (limited to 'Lib/test/test_posixpath.py')
-rw-r--r-- | Lib/test/test_posixpath.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Lib/test/test_posixpath.py b/Lib/test/test_posixpath.py index bcb29df..3eb981d 100644 --- a/Lib/test/test_posixpath.py +++ b/Lib/test/test_posixpath.py @@ -143,7 +143,7 @@ class PosixPathTest(unittest.TestCase): def test_getsize(self): f = open(test_support.TESTFN, "wb") try: - f.write("foo") + f.write(b"foo") f.close() self.assertEqual(posixpath.getsize(test_support.TESTFN), 3) finally: @@ -153,10 +153,10 @@ class PosixPathTest(unittest.TestCase): def test_time(self): f = open(test_support.TESTFN, "wb") try: - f.write("foo") + f.write(b"foo") f.close() f = open(test_support.TESTFN, "ab") - f.write("bar") + f.write(b"bar") f.close() f = open(test_support.TESTFN, "rb") d = f.read() @@ -175,7 +175,7 @@ class PosixPathTest(unittest.TestCase): self.assertIs(posixpath.islink(test_support.TESTFN + "1"), False) f = open(test_support.TESTFN + "1", "wb") try: - f.write("foo") + f.write(b"foo") f.close() self.assertIs(posixpath.islink(test_support.TESTFN + "1"), False) if hasattr(os, "symlink"): @@ -195,7 +195,7 @@ class PosixPathTest(unittest.TestCase): self.assertIs(posixpath.exists(test_support.TESTFN), False) f = open(test_support.TESTFN, "wb") try: - f.write("foo") + f.write(b"foo") f.close() self.assertIs(posixpath.exists(test_support.TESTFN), True) self.assertIs(posixpath.lexists(test_support.TESTFN), True) @@ -209,7 +209,7 @@ class PosixPathTest(unittest.TestCase): self.assertIs(posixpath.isdir(test_support.TESTFN), False) f = open(test_support.TESTFN, "wb") try: - f.write("foo") + f.write(b"foo") f.close() self.assertIs(posixpath.isdir(test_support.TESTFN), False) os.remove(test_support.TESTFN) @@ -226,7 +226,7 @@ class PosixPathTest(unittest.TestCase): self.assertIs(posixpath.isfile(test_support.TESTFN), False) f = open(test_support.TESTFN, "wb") try: - f.write("foo") + f.write(b"foo") f.close() self.assertIs(posixpath.isfile(test_support.TESTFN), True) os.remove(test_support.TESTFN) @@ -242,7 +242,7 @@ class PosixPathTest(unittest.TestCase): def test_samefile(self): f = open(test_support.TESTFN + "1", "wb") try: - f.write("foo") + f.write(b"foo") f.close() self.assertIs( posixpath.samefile( @@ -267,7 +267,7 @@ class PosixPathTest(unittest.TestCase): ) os.remove(test_support.TESTFN + "2") f = open(test_support.TESTFN + "2", "wb") - f.write("bar") + f.write(b"bar") f.close() self.assertIs( posixpath.samefile( @@ -285,7 +285,7 @@ class PosixPathTest(unittest.TestCase): def test_samestat(self): f = open(test_support.TESTFN + "1", "wb") try: - f.write("foo") + f.write(b"foo") f.close() self.assertIs( posixpath.samestat( @@ -308,7 +308,7 @@ class PosixPathTest(unittest.TestCase): ) os.remove(test_support.TESTFN + "2") f = open(test_support.TESTFN + "2", "wb") - f.write("bar") + f.write(b"bar") f.close() self.assertIs( posixpath.samestat( |