[issue17746] test_shutil.TestWhich.test_non_matching_mode fails when running as root

Matthias Klose report at bugs.python.org
Tue Apr 16 12:23:10 CEST 2013


Matthias Klose added the comment:

one way would be to skip this test when running as root. Would the check for the X bit work on Windows?

    @unittest.skipUnless(hasattr(os, 'getuid') and os.getuid() != 0,
                         "test always succeeds as root")

----------
nosy: +doko

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17746>
_______________________________________


More information about the Python-bugs-list mailing list