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_tempfile fails on cygwin
Type: behavior Stage: resolved
Components: Installation Versions: Python 2.5
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: Nosy List: ajaksu2, loewis, nnorwitz, tebeka
Priority: normal Keywords:

Created on 2006-08-20 13:18 by tebeka, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
cygcheck.out tebeka, 2006-08-21 05:55 Output of "cygcheck -s -v -r"
Messages (6)
msg29577 - (view) Author: Miki Tebeka (tebeka) * Date: 2006-08-20 13:18
This is RC1:
[16:07] ~/src/Python-2.5c1 $./python.exe -c 'from
test.test_tempfile import test_main; test_main()'
test_exports (test.test_tempfile.test_exports) ... ok
test_get_six_char_str
(test.test_tempfile.test__RandomNameSequence) ... ok
test_many (test.test_tempfile.test__RandomNameSequence)
... ok
test_supports_iter
(test.test_tempfile.test__RandomNameSequence) ... ok
test_nonempty_list
(test.test_tempfile.test__candidate_tempdir_list) ... ok
test_wanted_dirs
(test.test_tempfile.test__candidate_tempdir_list) ... ok
test_retval
(test.test_tempfile.test__get_candidate_names) ... ok
test_same_thing
(test.test_tempfile.test__get_candidate_names) ... ok
test_basic (test.test_tempfile.test__mkstemp_inner) ... ok
test_basic_many
(test.test_tempfile.test__mkstemp_inner) ... ok
test_choose_directory
(test.test_tempfile.test__mkstemp_inner) ... ok
test_file_mode (test.test_tempfile.test__mkstemp_inner)
... ok
test_noinherit (test.test_tempfile.test__mkstemp_inner)
... FAIL
test_textmode (test.test_tempfile.test__mkstemp_inner)
... ok
test_sane_template
(test.test_tempfile.test_gettempprefix) ... ok
test_usable_template
(test.test_tempfile.test_gettempprefix) ... ok
test_directory_exists
(test.test_tempfile.test_gettempdir) ... ok
test_directory_writable
(test.test_tempfile.test_gettempdir) ... ok
test_same_thing (test.test_tempfile.test_gettempdir) ... ok
test_basic (test.test_tempfile.test_mkstemp) ... ok
test_choose_directory (test.test_tempfile.test_mkstemp)
... ok
test_basic (test.test_tempfile.test_mkdtemp) ... ok
test_basic_many (test.test_tempfile.test_mkdtemp) ... ok
test_choose_directory (test.test_tempfile.test_mkdtemp)
... ok
test_mode (test.test_tempfile.test_mkdtemp) ... ok
test_basic (test.test_tempfile.test_mktemp) ... ok
test_many (test.test_tempfile.test_mktemp) ... ok
test_basic (test.test_tempfile.test_NamedTemporaryFile)
... ok
test_creates_named
(test.test_tempfile.test_NamedTemporaryFile) ... ok
test_del_on_close
(test.test_tempfile.test_NamedTemporaryFile) ... ok
test_multiple_close
(test.test_tempfile.test_NamedTemporaryFile) ... ok

======================================================================
FAIL: test_noinherit
(test.test_tempfile.test__mkstemp_inner)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/home/mtebeka/src/Python-2.5c1/Lib/test/test_tempfile.py",
line 310, in test_noinherit
    self.failIf(retval > 0, "child process reports
failure %d"%retval)
AssertionError: child process reports failure 127

----------------------------------------------------------------------
Ran 31 tests in 1.077s

FAILED (failures=1)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File
"/home/mtebeka/src/Python-2.5c1/Lib/test/test_tempfile.py",
line 665, in test_main
    test_support.run_unittest(*test_classes)
  File
"/home/mtebeka/src/Python-2.5c1/Lib/test/test_support.py",
line 441, in run_unittest
    run_suite(suite, testclass)
  File
"/home/mtebeka/src/Python-2.5c1/Lib/test/test_support.py",
line 426, in run_suite
    raise TestFailed(err)
test.test_support.TestFailed: Traceback (most recent
call last):
  File
"/home/mtebeka/src/Python-2.5c1/Lib/test/test_tempfile.py",
line 310, in test_noinherit
    self.failIf(retval > 0, "child process reports
failure %d"%retval)
AssertionError: child process reports failure 127

[16:12] ~/src/Python-2.5c1 $
msg29578 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2006-08-21 02:13
Logged In: YES 
user_id=33168

What version of cygwin?  I've been testing with 1.5.19 and
greater and not had this problem.  However, I've only run
with regrtest.  Do you have this problem only if running
directly?
msg29579 - (view) Author: Miki Tebeka (tebeka) * Date: 2006-08-21 05:55
Logged In: YES 
user_id=358087

Cygwin version is 1.5.21 (see attached output of cygcheck -s
-v -r).
What do you mean by "running directly"? I ran the test with
the following command line (and it failed):
./python.exe -c 'from test.test_tempfile import test_main;
test_main()'
msg29580 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-09-10 00:16
Logged In: YES 
user_id=21627

The usual way of invoking test_tempfile would be

./python Lib/test/regrtest.py test_tempfile

or

./python -mtest.regrtest test_tempfile

Do these give you the same error?
msg29581 - (view) Author: Miki Tebeka (tebeka) * Date: 2006-09-10 06:36
Logged In: YES 
user_id=358087

In your way it seems OK :)

[09:22] ~ $cd src/Python-2.5c1/
/home/mtebeka/src/Python-2.5c1
[09:23] ~/src/Python-2.5c1 $./python.exe -mtest.regrtest
test_tempfile
Could not find '/home/mtebeka/src/Python-2.5c1/Lib/test' in
sys.path to remove it
test_tempfile
1 test OK.
[09:23] ~/src/Python-2.5c1 $
msg84483 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-03-30 03:42
Closing as WFM, reopen if you'd like to address the alternative way of
calling test_tempfile.
History
Date User Action Args
2022-04-11 14:56:19adminsetgithub: 43863
2009-03-30 03:42:10ajaksu2setstatus: open -> closed

type: behavior

nosy: + ajaksu2
messages: + msg84483
resolution: works for me
stage: resolved
2006-08-20 13:18:21tebekacreate