Issue79

Title [patch] Some tests fail on Windows
Priority bug Status resolved
Superseder Nosy List paj, tseaver
Assigned To tseaver Topics

Created on 2009-05-19.00:16:48 by paj, last changed 2009-05-20.11:55:00 by tseaver.

Files
File name Uploaded Type Edit Remove
repose.who-issue79.patch tseaver, 2009-05-20.07:08:16 text/x-diff
windows_fails.patch paj, 2009-05-19.23:56:12 application/octet-stream
Messages
msg214 (view) Author: tseaver Date: 2009-05-20.11:54:59
Fix committed in r4788.
msg213 (view) Author: paj Date: 2009-05-20.11:52:56
Yep, works a treat
msg212 (view) Author: tseaver Date: 2009-05-20.11:41:19
Does adding a call to 'logging.shutdown()' at the end of that
testcase make Windows happy?
msg211 (view) Author: paj Date: 2009-05-20.11:18:48
Nearly there... you hit the same problem I did. We need to close the log file.

ERROR: test_sample_config_w_log_file (repoze.who.tests.test_config.TestConfigMid
dleware)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\code\repoze.who\repoze\who\tests\test_config.py", line 337, in tearDo
wn
    shutil.rmtree(self.tempdir)
  File "c:\python25\lib\shutil.py", line 180, in rmtree
    onerror(os.remove, fullname, sys.exc_info())
  File "c:\python25\lib\shutil.py", line 178, in rmtree
    os.remove(fullname)
WindowsError: [Error 32] The process cannot access the file because it is being
used by another process: 'c:\\docume~1\\paul\\locals~1\\temp\\tmpwtmexf\\who.log
'

----------------------------------------------------------------------
Ran 206 tests in 2.688s

FAILED (errors=1)
msg208 (view) Author: tseaver Date: 2009-05-20.07:08:16
I plan to check in an alternate patch which uses 'tempfile.mkdtemp',
with appropriate cleanup of the tempdir.  Can you confirm that it
works for you on Windows?
msg207 (view) Author: paj Date: 2009-05-19.23:56:12
Ok, here's a patch. test_sample_config_w_log_file in test_config does now leave
the log file existing; can't see a way to fix that.
msg205 (view) Author: paj Date: 2009-05-19.23:47:50
Just updated to latest code base and the problem is a bit worse. working on a
new patch
msg194 (view) Author: paj Date: 2009-05-19.00:16:47
One unit test fails on Windows - problem with the test, not the code base.
History
Date User Action Args
2009-05-20 11:55:00 tseaver set status: in-progress -> resolved
assignedto: tseaver
messages: + msg214
nosy: + tseaver
2009-05-20 11:52:56 paj set messages: + msg213
2009-05-20 11:41:19 tseaver set messages: + msg212
2009-05-20 11:18:48 paj set messages: + msg211
2009-05-20 07:08:17 tseaver set files: + repose.who-issue79.patch
messages: + msg208
2009-05-19 23:56:12 paj set files: + windows_fails.patch
messages: + msg207
title: [patch] test_sample_config fails on Windows -> [patch] Some tests fail on Windows
2009-05-19 23:47:51 paj set status: unread -> in-progress
messages: + msg205
2009-05-19 23:47:12 paj set files: - test_sample_config.patch
2009-05-19 00:16:48 paj create