]> granicus.if.org Git - python/commitdiff
Close #13401: Skip TestFileTypeW of test_argparse if the current user is root
authorVictor Stinner <victor.stinner@haypocalc.com>
Sun, 20 Nov 2011 22:09:09 +0000 (23:09 +0100)
committerVictor Stinner <victor.stinner@haypocalc.com>
Sun, 20 Nov 2011 22:09:09 +0000 (23:09 +0100)
Patch written by Arfrever Frehtes Taifersar Arahesis.

Lib/test/test_argparse.py

index 5785eec57fb1ad7fca804b9abc20385df3d9cd1b..28d1ef39d46e727bf2184ff48f682495a139648d 100644 (file)
@@ -1509,6 +1509,8 @@ class WFile(object):
         return self.name == other.name
 
 
+@unittest.skipIf(hasattr(os, 'geteuid') and os.geteuid() == 0,
+                 "non-root user required")
 class TestFileTypeW(TempDirMixin, ParserTestCase):
     """Test the FileType option/argument type for writing files"""