[issue7668] test_httpservers fails with non-ascii path
STINNER Victor
report at bugs.python.org
Thu Jan 21 03:59:33 CET 2010
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
CGIHTTPServerTestCase creates .py files with sys.executable in a shebang:
-----
cgi_file1 = """\
#!%s
..."""
with open(self.file1_path, 'w') as file1:
file1.write(cgi_file1 % sys.executable)
-----
The shebang have to be the first line, and the encoding cookie (#coding:...) have to be written before any non-ASCII character. Since the shebang contains non-ASCII character, the cookie have to be written before... which is impossible.
Whereas issue #7708 contains the tested modules, this issue is specific to the tests themself.
Possible workaround: create a symbolic link to an ASCII directory (eg. "/tmp/python") and use the link in the shebang.
----------
nosy: +haypo
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7668>
_______________________________________
More information about the Python-bugs-list
mailing list