aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_apis.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_apis.py')
-rw-r--r--tests/test_apis.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_apis.py b/tests/test_apis.py
index c9e89ad..d34f2c0 100644
--- a/tests/test_apis.py
+++ b/tests/test_apis.py
@@ -227,8 +227,9 @@ class TestErrors(unittest.TestCase):
def testNonUnicodeSource(self):
""" Test falure on non-unicode source text. """
- source = "foo".encode('utf-16')
- self.assertRaises(UnicodeDecodeError, markdown.markdown, source)
+ if sys.version_info < (3, 0):
+ source = "foo".encode('utf-16')
+ self.assertRaises(UnicodeDecodeError, markdown.markdown, source)
def testBadOutputFormat(self):
""" Test failure on bad output_format. """