There was an error while loading. Please reload this page.
1 parent 363aec1 commit fb187f1Copy full SHA for fb187f1
1 file changed
Lib/test/support/__init__.py
@@ -71,7 +71,8 @@
71
"BrokenIter",
72
"in_systemd_nspawn_sync_suppressed",
73
"run_no_yield_async_fn", "run_yielding_async_fn", "async_yield",
74
- "reset_code", "on_github_actions"
+ "reset_code", "on_github_actions",
75
+ "requires_root_user", "requires_non_root_user",
76
]
77
78
@@ -3376,3 +3377,7 @@ def skip_on_low_desktop_heap_memory_subprocess(returncode):
3376
3377
if returncode == STATUS_DLL_INIT_FAILED:
3378
raise unittest.SkipTest('gh-150436: DLL init failed, likely because '
3379
'of low desktop heap memory')
3380
+
3381
+_ROOT_IN_POSIX = hasattr(os, 'geteuid') and os.geteuid() == 0
3382
+requires_root_user = unittest.skipUnless(_ROOT_IN_POSIX, "test needs root privilege")
3383
+requires_non_root_user = unittest.skipIf(_ROOT_IN_POSIX, "test needs non-root account")
0 commit comments