Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a9620d1

Browse files
committed
Fix stupid typo: Don't read from a writer.
1 parent bb5fbc4 commit a9620d1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/test/test_codecs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,11 @@ def test_only_one_bom(self):
161161

162162
def test_badbom(self):
163163
s = StringIO.StringIO("\xff\xff")
164-
f = codecs.getwriter(self.encoding)(s)
164+
f = codecs.getreader(self.encoding)(s)
165165
self.assertRaises(UnicodeError, f.read)
166166

167167
s = StringIO.StringIO("\xff\xff\xff\xff")
168-
f = codecs.getwriter(self.encoding)(s)
168+
f = codecs.getreader(self.encoding)(s)
169169
self.assertRaises(UnicodeError, f.read)
170170

171171
def test_partial(self):

0 commit comments

Comments
 (0)