Simplify tests; don't use u literal not supported in py32
--HG-- branch : makepyfile_utf8
This commit is contained in:
parent
f47ae74981
commit
555ba4159d
|
@ -458,29 +458,29 @@ class TestAssertionRewriteHookDetails(object):
|
||||||
|
|
||||||
@pytest.mark.skipif("sys.version_info[0] >= 3")
|
@pytest.mark.skipif("sys.version_info[0] >= 3")
|
||||||
def test_detect_coding_cookie(self, testdir):
|
def test_detect_coding_cookie(self, testdir):
|
||||||
testdir.makepyfile(test_cookie=u"""
|
testdir.makepyfile(test_cookie="""
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
u"St\xc3\xa4d"
|
u"St\xc3\xa4d"
|
||||||
def test_rewritten():
|
def test_rewritten():
|
||||||
assert "@py_builtins" in globals()""".encode('utf-8'))
|
assert "@py_builtins" in globals()""")
|
||||||
assert testdir.runpytest().ret == 0
|
assert testdir.runpytest().ret == 0
|
||||||
|
|
||||||
@pytest.mark.skipif("sys.version_info[0] >= 3")
|
@pytest.mark.skipif("sys.version_info[0] >= 3")
|
||||||
def test_detect_coding_cookie_second_line(self, testdir):
|
def test_detect_coding_cookie_second_line(self, testdir):
|
||||||
testdir.makepyfile(test_cookie=u"""
|
testdir.makepyfile(test_cookie="""
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
u"St\xc3\xa4d"
|
u"St\xc3\xa4d"
|
||||||
def test_rewritten():
|
def test_rewritten():
|
||||||
assert "@py_builtins" in globals()""".encode('utf-8'))
|
assert "@py_builtins" in globals()""")
|
||||||
assert testdir.runpytest().ret == 0
|
assert testdir.runpytest().ret == 0
|
||||||
|
|
||||||
@pytest.mark.skipif("sys.version_info[0] >= 3")
|
@pytest.mark.skipif("sys.version_info[0] >= 3")
|
||||||
def test_detect_coding_cookie_crlf(self, testdir):
|
def test_detect_coding_cookie_crlf(self, testdir):
|
||||||
testdir.makepyfile(test_cookie=u"""
|
testdir.makepyfile(test_cookie="""
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
u"St\xc3\xa4d"
|
u"St\xc3\xa4d"
|
||||||
def test_rewritten():
|
def test_rewritten():
|
||||||
assert "@py_builtins" in globals()""".encode('utf-8'))
|
assert "@py_builtins" in globals()""")
|
||||||
assert testdir.runpytest().ret == 0
|
assert testdir.runpytest().ret == 0
|
||||||
|
|
||||||
def test_sys_meta_path_munged(self, testdir):
|
def test_sys_meta_path_munged(self, testdir):
|
||||||
|
|
Loading…
Reference in New Issue