Simplify tests; don't use u literal not supported in py32

--HG--
branch : makepyfile_utf8
This commit is contained in:
Marc Abramowitz 2014-03-28 12:11:33 -07:00
parent f47ae74981
commit 555ba4159d
1 changed files with 6 additions and 6 deletions

View File

@ -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):