Skip to content

Commit ea112e5

Browse files
committed
more travis debugging
1 parent 375ad26 commit ea112e5

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

patsy/contrasts.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,12 @@ def t(obj, expected):
9292
t("asdf", "asdf")
9393
t(u"asdf", "asdf")
9494
if sys.version_info >= (3,):
95-
# a utf-8 encoded euro-sign comes out as a real euro sign
96-
t(u"\u20ac".encode("utf-8"), "\u20ac")
95+
# a utf-8 encoded euro-sign comes out as a real euro sign. We have to
96+
# use u""-style strings here, even though this is a py3-only block,
97+
# because otherwise 2to3 may be clever enough to realize that in py2
98+
# "\u20ac" produces a literal \, and double it for us when
99+
# converting.
100+
t(u"\u20ac".encode("utf-8"), u"\u20ac")
97101
# but a iso-8859-15 euro sign can't be decoded, and we fall back on
98102
# repr()
99103
t(u"\u20ac".encode("iso-8859-15"), "b'\\xa4'")

0 commit comments

Comments
 (0)