Skip to content

Commit 3c1261a

Browse files
committed
Test for #19 ('import six' can be after its first use). refs #19
Signed-off-by: Daira Hopwood <[email protected]>
1 parent 57c8cba commit 3c1261a

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tests/test_fix_unicode.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
b = U"\\u2041"
88
c = ur'''blah
99
foo'''
10+
import sys
1011
"""
1112

1213
UNICODE_LITERALS_six = """\
@@ -16,16 +17,26 @@
1617
b = six.u("\\u2041")
1718
c = six.u(r'''blah
1819
foo''')
20+
import sys
1921
"""
2022

21-
UNICODE_LITERALS_compat = UNICODE_LITERALS
23+
UNICODE_LITERALS_compat = """\
24+
from __future__ import absolute_import
25+
a = u''
26+
b = U"\\u2041"
27+
c = ur'''blah
28+
foo'''
29+
import sys
30+
"""
2231

2332
UNICODE_LITERALS_future = """\
33+
from __future__ import absolute_import
2434
from __future__ import unicode_literals
2535
a = ''
2636
b = "\\u2041"
2737
c = r'''blah
2838
foo'''
39+
import sys
2940
"""
3041

3142
def test_unicode_six():

0 commit comments

Comments
 (0)