Test failures due to lack of isolation

Bug #907053 reported by dobey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dirspec
New
Undecided
Unassigned

Bug Description

The test_get_env_path_var and test_get_env_path_no_var tests in test_utils.py fail with LANG=C (or when filesystem encoding on Windows is configured to certain values). This is due to the use of sys.getfilesystemencoding() which may not return an encoding which the set of characters in a Unicode string in Python, may be converted to. When this happens, a UnicodeEncodeError occurs, causing the tests to fail.

[ERROR]
Traceback (most recent call last):
  File "/home/tarmac/cache/dirspec/trunk/dirspec/tests/test_utils.py", line 144, in test_get_env_path_no_var
    default = fake_path.encode(sys.getfilesystemencoding())
exceptions.UnicodeEncodeError: 'ascii' codec can't encode character u'\xd1' in position 9: ordinal not in range(128)

dirspec.tests.test_utils.TestBaseDirectoryWindows.test_get_env_path_no_var
===============================================================================
[ERROR]
Traceback (most recent call last):
  File "/home/tarmac/cache/dirspec/trunk/dirspec/tests/test_utils.py", line 134, in test_get_env_path_var
    mbcs_path = fake_path.encode(sys.getfilesystemencoding())
exceptions.UnicodeEncodeError: 'ascii' codec can't encode character u'\xd1' in position 9: ordinal not in range(128)

dirspec.tests.test_utils.TestBaseDirectoryWindows.test_get_env_path_var

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.