fix a py3k related skip - py.io.TextIO on py3k should probably

not allow to write bytes to it.

--HG--
branch : trunk
This commit is contained in:
holger krekel 2010-04-29 10:50:20 +02:00
parent 5dc66bb4ca
commit 1c1623885f
1 changed files with 1 additions and 2 deletions

View File

@ -43,8 +43,7 @@ class TestTextIO:
f = py.io.TextIO() f = py.io.TextIO()
if sys.version_info >= (3,0): if sys.version_info >= (3,0):
f.write("\u00f6") f.write("\u00f6")
py.test.skip("3k IO beahviour?") py.test.raises(TypeError, "f.write(bytes('hello', 'UTF-8'))")
f.write(bytes("hello", 'UTF-8'))
else: else:
f.write(unicode("\u00f6", 'UTF-8')) f.write(unicode("\u00f6", 'UTF-8'))
f.write("hello") # bytes f.write("hello") # bytes