Skip to content

Commit

Permalink
more travis debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
njsmith committed Jan 13, 2014
1 parent 375ad26 commit ea112e5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions patsy/contrasts.py
Expand Up @@ -92,8 +92,12 @@ def t(obj, expected):
t("asdf", "asdf")
t(u"asdf", "asdf")
if sys.version_info >= (3,):
# a utf-8 encoded euro-sign comes out as a real euro sign
t(u"\u20ac".encode("utf-8"), "\u20ac")
# a utf-8 encoded euro-sign comes out as a real euro sign. We have to
# use u""-style strings here, even though this is a py3-only block,
# because otherwise 2to3 may be clever enough to realize that in py2
# "\u20ac" produces a literal \, and double it for us when
# converting.
t(u"\u20ac".encode("utf-8"), u"\u20ac")
# but a iso-8859-15 euro sign can't be decoded, and we fall back on
# repr()
t(u"\u20ac".encode("iso-8859-15"), "b'\\xa4'")
Expand Down

0 comments on commit ea112e5

Please sign in to comment.