[py-svn] py-trunk commit 571dde886a2c: fix a py3k related skip - py.io.TextIO on py3k should probably

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Thu Apr 29 10:54:57 CEST 2010


# HG changeset patch -- Bitbucket.org
# Project py-trunk
# URL http://bitbucket.org/hpk42/py-trunk/overview
# User holger krekel <holger at merlinux.eu>
# Date 1272531020 -7200
# Node ID 571dde886a2c4424b98d794bf2d6beaca4359721
# Parent  f67a76b4d53c91ff8490ab3610f908c5f789e3ce
fix a py3k related skip - py.io.TextIO on py3k should probably
not allow to write bytes to it.

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



More information about the pytest-commit mailing list