mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Properly skip on non-windows platforms
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
parent
fac82b3e10
commit
d0ffe3a3e1
2 changed files with 11 additions and 2 deletions
|
@ -695,7 +695,8 @@ allowed-3rd-party-modules=msgpack,
|
|||
base64,
|
||||
tempfile,
|
||||
fnmatch,
|
||||
ptscripts
|
||||
ptscripts,
|
||||
packaging
|
||||
|
||||
[EXCEPTIONS]
|
||||
|
||||
|
|
|
@ -13,6 +13,14 @@ pytestmark = [
|
|||
]
|
||||
|
||||
|
||||
def _parse_platform_version():
|
||||
if platform.system() != "Windows":
|
||||
# Test only applies to windows but pytestmark is not getting
|
||||
# evaluated soon enough
|
||||
return True
|
||||
return version.parse(platform.version()) < version.parse("10.0.16299")
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def lgpo(modules):
|
||||
return modules.lgpo
|
||||
|
@ -20,7 +28,7 @@ def lgpo(modules):
|
|||
|
||||
# The "Allow Online Tips" policy only became available in version 10.0.16299
|
||||
@pytest.mark.skipif(
|
||||
version.parse(platform.version()) < version.parse("10.0.16299"),
|
||||
_parse_platform_version(),
|
||||
reason="Policy only available on 10.0.16299 or later",
|
||||
)
|
||||
def test_62058_whitespace(lgpo):
|
||||
|
|
Loading…
Add table
Reference in a new issue