python-coveralls icon indicating copy to clipboard operation
python-coveralls copied to clipboard

Unicode chars in source file

Open spulec opened this issue 12 years ago • 2 comments

The json.dumps() in api.py blows up if there is a unicode char in one of the source files. My fork has a fix that works for me, but I didn't get a chance to update the tests.

Cool library.

spulec avatar Mar 11 '13 03:03 spulec

Hi, could you write an example of broken code? I added this file and it just works

# coding=utf-8
EUR = "€"


def amount(tariff, currency=EUR):
    return '{0} {1:.2f}'.format(currency, float(tariff))

z4r avatar Mar 12 '13 13:03 z4r

Hey, sorry for the shitty bug report. I originally thought the issue was simpler than what it actually appears to be.

The file in question is dateutil/parser. The encoding is iso-8859-1. Not sure why someone would do that, but alas.

The broken Travis traceback is here.

spulec avatar Mar 12 '13 14:03 spulec