summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-08-27 23:38:12 (GMT)
committerGuido van Rossum <guido@python.org>2007-08-27 23:38:12 (GMT)
commit199fc75dc11b1652714720d4f09770bf0c7b547e (patch)
treec65c316947c57bccdb820f1384c153dbd6a7f5db /Lib
parentb644fb43d6ba9d3fe1206079e262c62015e55b3f (diff)
downloadcpython-199fc75dc11b1652714720d4f09770bf0c7b547e.zip
cpython-199fc75dc11b1652714720d4f09770bf0c7b547e.tar.gz
cpython-199fc75dc11b1652714720d4f09770bf0c7b547e.tar.bz2
str/bytes strictness.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_genericpath.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/Lib/test/test_genericpath.py b/Lib/test/test_genericpath.py
index 0c793ab..d912714 100644
--- a/Lib/test/test_genericpath.py
+++ b/Lib/test/test_genericpath.py
@@ -29,7 +29,7 @@ class AllCommonTest(unittest.TestCase):
def test_getsize(self):
f = open(test_support.TESTFN, "wb")
try:
- f.write("foo")
+ f.write(b"foo")
f.close()
self.assertEqual(genericpath.getsize(test_support.TESTFN), 3)
finally:
@@ -40,10 +40,10 @@ class AllCommonTest(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()
@@ -63,7 +63,7 @@ class AllCommonTest(unittest.TestCase):
self.assertIs(genericpath.exists(test_support.TESTFN), False)
f = open(test_support.TESTFN, "wb")
try:
- f.write("foo")
+ f.write(b"foo")
f.close()
self.assertIs(genericpath.exists(test_support.TESTFN), True)
finally:
@@ -80,7 +80,7 @@ class AllCommonTest(unittest.TestCase):
self.assertIs(genericpath.isdir(test_support.TESTFN), False)
f = open(test_support.TESTFN, "wb")
try:
- f.write("foo")
+ f.write(b"foo")
f.close()
self.assertIs(genericpath.isdir(test_support.TESTFN), False)
os.remove(test_support.TESTFN)
@@ -105,7 +105,7 @@ class AllCommonTest(unittest.TestCase):
self.assertIs(genericpath.isfile(test_support.TESTFN), False)
f = open(test_support.TESTFN, "wb")
try:
- f.write("foo")
+ f.write(b"foo")
f.close()
self.assertIs(genericpath.isfile(test_support.TESTFN), True)
os.remove(test_support.TESTFN)
@@ -129,7 +129,7 @@ class AllCommonTest(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(
genericpath.samefile(
@@ -154,7 +154,7 @@ class AllCommonTest(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(
genericpath.samefile(