From 555ba4159dc655ed7626c928167189ac010dcf99 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Fri, 28 Mar 2014 12:11:33 -0700 Subject: [PATCH] Simplify tests; don't use u literal not supported in py32 --HG-- branch : makepyfile_utf8 --- testing/test_assertrewrite.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/testing/test_assertrewrite.py b/testing/test_assertrewrite.py index d19879527..21e22c15f 100644 --- a/testing/test_assertrewrite.py +++ b/testing/test_assertrewrite.py @@ -458,29 +458,29 @@ class TestAssertionRewriteHookDetails(object): @pytest.mark.skipif("sys.version_info[0] >= 3") def test_detect_coding_cookie(self, testdir): - testdir.makepyfile(test_cookie=u""" + testdir.makepyfile(test_cookie=""" # -*- coding: utf-8 -*- u"St\xc3\xa4d" def test_rewritten(): - assert "@py_builtins" in globals()""".encode('utf-8')) + assert "@py_builtins" in globals()""") assert testdir.runpytest().ret == 0 @pytest.mark.skipif("sys.version_info[0] >= 3") def test_detect_coding_cookie_second_line(self, testdir): - testdir.makepyfile(test_cookie=u""" + testdir.makepyfile(test_cookie=""" # -*- coding: utf-8 -*- u"St\xc3\xa4d" def test_rewritten(): - assert "@py_builtins" in globals()""".encode('utf-8')) + assert "@py_builtins" in globals()""") assert testdir.runpytest().ret == 0 @pytest.mark.skipif("sys.version_info[0] >= 3") def test_detect_coding_cookie_crlf(self, testdir): - testdir.makepyfile(test_cookie=u""" + testdir.makepyfile(test_cookie=""" # -*- coding: utf-8 -*- u"St\xc3\xa4d" def test_rewritten(): - assert "@py_builtins" in globals()""".encode('utf-8')) + assert "@py_builtins" in globals()""") assert testdir.runpytest().ret == 0 def test_sys_meta_path_munged(self, testdir):