This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_subinterps fails on Windows
Type: behavior Stage: resolved
Components: Tests, Windows Versions: Python 3.2, Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: brian.curtin, cdimauro, pitrou, python-dev
Priority: normal Keywords: patch

Created on 2011-06-25 11:02 by cdimauro, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_capi.py.patch cdimauro, 2011-06-25 11:02 review
Messages (6)
msg139044 - (view) Author: Cesare Di Mauro (cdimauro) Date: 2011-06-25 11:02
This test fails on Windows because it tries to change the working folder to an empty string.
Anyway, even changing:
    os.chdir(basepath)
with:
    os.chdir(basepath or '.')
it fails because the subprocess tries to execute an ELF file ('Modules/_testembed') which Windows isn't able to handle.
msg139371 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-06-28 18:38
I don't really understand why you need this. Under normal setups, the test is already properly skipped under Windows, since there's no rule to build the "Modules/_testembed" with MSVC.
Or are you talking about another kind of setup? Cygwin? mingw?
msg139394 - (view) Author: Cesare Di Mauro (cdimauro) Date: 2011-06-29 05:22
Unfortunately this test isn't skip on normal setup (using VisualStudio 2008 Express). I've updated the clone just a few minutes ago, rebuilt Python (in Debug mode), and that's what happened:

D:\CPython>PCbuild\python_d.exe Lib\test\test_capi.py
test_instancemethod (__main__.CAPITest) ... ok
test_memoryview_from_NULL_pointer (__main__.CAPITest) ... ok
test_no_FatalError_infinite_loop (__main__.CAPITest) ... ok
test_pendingcalls_non_threaded (__main__.TestPendingCalls) ... ok
test_pendingcalls_threaded (__main__.TestPendingCalls) ... ok
test (__main__.Test6012) ... ok
test_subinterps (__main__.EmbeddingTest) ... ERROR

======================================================================
ERROR: test_subinterps (__main__.EmbeddingTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib\test\test_capi.py", line 155, in test_subinterps
    os.chdir(basepath)
WindowsError: [Error 123] La sintassi del nome del file, della directory o del volume non è corretta: ''

----------------------------------------------------------------------
Ran 7 tests in 4.587s

FAILED (errors=1)
Traceback (most recent call last):
  File "Lib\test\test_capi.py", line 212, in <module>
    test_main()
  File "Lib\test\test_capi.py", line 176, in test_main
    support.run_unittest(CAPITest, TestPendingCalls, Test6012, EmbeddingTest)
  File "D:\CPython\lib\test\support.py", line 1280, in run_unittest
    _run_suite(suite)
  File "D:\CPython\lib\test\support.py", line 1263, in _run_suite
    raise TestFailed(err)
test.support.TestFailed: Traceback (most recent call last):
  File "Lib\test\test_capi.py", line 155, in test_subinterps
    os.chdir(basepath)
WindowsError: [Error 123] La sintassi del nome del file, della directory o del volume non è corretta: ''

[90425 refs]

The patch ensures that this test isn't always executed on Windows, as expected.
msg139505 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-06-30 18:03
New changeset 7c60c1b41da9 by Antoine Pitrou in branch '3.2':
Issue #12407: Explicitly skip test_capi.EmbeddingTest under Windows.
http://hg.python.org/cpython/rev/7c60c1b41da9
msg139506 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-06-30 18:05
New changeset 5cae52417b9d by Antoine Pitrou in branch 'default':
Issue #12407: Explicitly skip test_capi.EmbeddingTest under Windows.
http://hg.python.org/cpython/rev/5cae52417b9d
msg139507 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-06-30 18:06
Fixed, thank you.
History
Date User Action Args
2022-04-11 14:57:19adminsetgithub: 56616
2011-06-30 18:06:04pitrousetstatus: open -> closed
versions: + Python 3.2
messages: + msg139507

resolution: fixed
stage: resolved
2011-06-30 18:05:06python-devsetmessages: + msg139506
2011-06-30 18:03:38python-devsetnosy: + python-dev
messages: + msg139505
2011-06-29 05:22:59cdimaurosetmessages: + msg139394
2011-06-28 18:38:38pitrousetmessages: + msg139371
2011-06-25 11:02:08cdimaurocreate