[Python-checkins] cpython: Issue #23193: Skip numeric_owner tests on platforms where they don't make sense

zach.ware python-checkins at python.org
Wed May 13 07:01:57 CEST 2015


https://hg.python.org/cpython/rev/e5a53d75dc19
changeset:   96001:e5a53d75dc19
user:        Zachary Ware <zachary.ware at gmail.com>
date:        Tue May 12 23:57:21 2015 -0500
summary:
  Issue #23193: Skip numeric_owner tests on platforms where they don't make sense

In particular, the tests bomb out on Windows.  The feature is a no-op on platforms
without the pwd module or os.geteuid anyway.

files:
  Lib/test/test_tarfile.py |  2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)


diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py
--- a/Lib/test/test_tarfile.py
+++ b/Lib/test/test_tarfile.py
@@ -2279,6 +2279,8 @@
     return True
 
 
+ at unittest.skipUnless(hasattr(os, 'chown'), "missing os.chown")
+ at unittest.skipUnless(hasattr(os, 'geteuid'), "missing os.geteuid")
 class NumericOwnerTest(unittest.TestCase):
     # mock the following:
     #  os.chown: so we can test what's being called

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list