Close #13401: Skip TestFileTypeW of test_argparse if the current user is root
Patch written by Arfrever Frehtes Taifersar Arahesis.
diff --git a/Lib/test/test_argparse.py b/Lib/test/test_argparse.py
index 5785eec..28d1ef3 100644
--- a/Lib/test/test_argparse.py
+++ b/Lib/test/test_argparse.py
@@ -1509,6 +1509,8 @@
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"""