Skip to content

Commit

Permalink
Disable expand_path test on github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
MHendricks committed Sep 4, 2024
1 parent 3c15b9b commit 2894980
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/test_env_var.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import os

import pytest
import win32api

from casement.env_var import EnvVar
from casement.registry import RegKey
Expand Down Expand Up @@ -53,13 +54,14 @@ def wrapper(*args, **kwargs):
return decorator


@pytest.mark.skipif(
os.getenv("GITHUB_ACTIONS") == "true",
reason="Github Actions doesn't support short names anymore.",
)
def test_expand_path():
# Generate a short name path. This method needs a file that actually
# exists on disk, and test_env_var.py is long enough to get ~'ed
# short_name = win32api.GetShortPathName(__file__)
# Github actions windows servers stopped supporting short names from the
# above command. For now just convert the file name to a short name.
short_name = os.path.join(os.path.dirname(__file__), "TEST_E~1.PY")
short_name = win32api.GetShortPathName(__file__)
assert '~' in short_name

# Check expandvars argument
Expand Down

0 comments on commit 2894980

Please sign in to comment.