Tests fail in Python 3 with non UTF-8 locale
Bug #1196754 reported by
Barry Warsaw
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
configglue |
Fix Released
|
Low
|
Ricardo Kirkner |
Bug Description
$ LC_ALL='POSIX' python3 setup.py test
This fails the test_save_
Related branches
lp:~ricardokirkner/configglue/1196754-non-utf8-locale
- Ricardo Kirkner: Approve
- Barry Warsaw (community): Approve
-
Diff: 241 lines (+54/-37)2 files modifiedconfigglue/parser.py (+4/-7)
configglue/tests/test_parser.py (+50/-30)
Changed in configglue: | |
assignee: | nobody → Ricardo Kirkner (ricardokirkner) |
status: | New → Confirmed |
importance: | Undecided → Low |
tags: | added: u1-by-dev u1-on-production |
Changed in configglue: | |
status: | Confirmed → In Progress |
Changed in configglue: | |
status: | In Progress → Fix Committed |
Changed in configglue: | |
status: | Fix Committed → Fix Released |
Changed in configglue: | |
milestone: | none → 1.1.1 |
tags: | added: u1-notrack |
To post a comment you must log in.
======= ======= ======= ======= ======= ======= ======= ======= ======= ======= config_ non_ascii (configglue. tests.test_ parser. TestSchemaConfi gParser) ------- ------- ------- ------- ------- ------- ------- ------- ------- barry/projects/ ubuntu/ configglue/ configglue- 1.1.0/configglu e/tests/ test_parser. py", line 1005, in test_save_ config_ non_ascii _check_ save_file( expected) barry/projects/ ubuntu/ configglue/ configglue- 1.1.0/configglu e/tests/ test_parser. py", line 1015, in _check_save_file parser. save(open( filename, 'w')) barry/projects/ ubuntu/ configglue/ configglue- 1.1.0/configglu e/parser. py", line 599, in save barry/projects/ ubuntu/ configglue/ configglue- 1.1.0/configglu e/parser. py", line 584, in write
ERROR: test_save_
-------
Traceback (most recent call last):
File "/home/
self.
File "/home/
self.
File "/home/
self.write(fp)
File "/home/
fp.write("%s\n" % (key))
UnicodeEncodeError: 'ascii' codec can't encode character '\xf3' in position 7: ordinal not in range(128)