From: Günter M. <mi...@us...> - 2021-11-19 14:25:29
|
> I ran the tests again, and it works perfectly now. (On Python 2) Good news. > However, on Python 3, it fails with > ```pwsh > PS D:\<redacted>\docutils-code-r8892-trunk> py docutils/test/alltests.py > Unable to create process using '/bin/sh docutils/test/alltests.py' > ``` It seems the [Python laucher for Windows](https://docs.python.org/3/using/windows.html#python-launcher-for-windows) tries to get the required python version from the (shebang line)[https://stackoverflow.com/questions/7061449/what-is-a-shebang-line]. Unfortunately, alltest.py uses a workaround to pass the -u option to python:: #!/bin/sh ''''exec python -u "$0" "$@" #''' which could explain why `py` wants to launch `/bin/sh`. You may need to specify the names of the python3.x executable(s) (possibly also the full path). On my system, this is .../docutils/test> python3 docutils/test/alltests.py .../docutils/test> python3.5 docutils/test/alltests.py .../docutils/test> python3.9 docutils/test/alltests.py --- ** [bugs:#434] Error when running the test suite for Docutils on Windows 10.** **Status:** open **Labels:** test **Created:** Sun Nov 14, 2021 03:34 PM UTC by PotentialUser-54 **Last Updated:** Fri Nov 19, 2021 02:39 AM UTC **Owner:** nobody Running the test suite for Docutils on Windows 10 using [the instructions](https://docutils.sourceforge.io/README.html#running-the-test-suite) fails. As instructed, I am now opening this bug report after checking that there is not already one. ```pwsh PS <redacted>\docutils\docutils\test> python alltests.py Traceback (most recent call last): File "<redacted>\docutils\docutils\test\alltests.py", line 93, in <module> suite = suite() File "<redacted>\docutils\docutils\test\alltests.py", line 80, in suite suite = package_unittest.loadTestModules(DocutilsTestSupport.testroot, File "<redacted>\docutils\docutils\test\package_unittest.py", line 102, in loadTestModules module = import_module(mod) File "<redacted>\docutils\docutils\test\package_unittest.py", line 133, in import_module mod = __import__(name) File "<redacted>\docutils\docutils\test\test_error_reporting.py", line 212, in <module> class SafeStringTests_locale(unittest.TestCase): File "<redacted>\docutils\docutils\test\test_error_reporting.py", line 225, in SafeStringTests_locale open(b'\xfc') UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfc in position 0: invalid start byte ``` ```pwsh PS <redacted>\docutils\docutils\test> python ../tools/quicktest.py --version quicktest.py (Docutils 0.18 [release]) PS <redacted>\docutils\docutils\test> python --version Python 3.9.6 ``` --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |