You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
386 B
18 lines
386 B
import sys
|
|
|
|
try:
|
|
import grp
|
|
import pwd
|
|
except ImportError:
|
|
grp = pwd = None
|
|
|
|
import pytest
|
|
|
|
UNIX_ID_SUPPORT = grp and pwd
|
|
UID_0_SUPPORT = UNIX_ID_SUPPORT and sys.platform != "cygwin"
|
|
|
|
require_unix_id = pytest.mark.skipif(
|
|
not UNIX_ID_SUPPORT, reason="Requires grp and pwd support"
|
|
)
|
|
require_uid_0 = pytest.mark.skipif(not UID_0_SUPPORT, reason="Requires UID 0 support")
|