New submission from Tim Golden <m...@timgolden.me.uk>:
lib\distutils\tests\test_util.py, run as part of the full testsuite,
creates a stub os.uname on an OS which doesn't support it natively.
However, it fails to restore it correctly -- ie fails to delete the
attribute. As a result, test_platform and test_pep352 fail when run
as a part of regrtest, since they rely on os.uname raising an
AttributeError on, eg, Windows.
Patch attached against r70302 of lib\distutils\tests\test_util.py
----------
files: test_util.patch
keywords: patch
messages: 83449
nosy: tim.golden
severity: normal
status: open
title: distutils.test_util fails to restore os.uname
Added file: http://bugs.python.org/file13299/test_util.patch
_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5472>
_______________________________________
Index: test_util.py
===================================================================
--- test_util.py (revision 70302)
+++ test_util.py (working copy)
@@ -51,7 +51,9 @@
os.path.join = self.join
os.path.isabs = self.isabs
os.path.splitdrive = self.splitdrive
- if self.uname is not None:
+ if self.uname is None:
+ del os.uname
+ else:
os.uname = self.uname
def _set_uname(self, uname):
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com