Skip to content

Commit

Permalink
Stop using win32api.GetShortPathName
Browse files Browse the repository at this point in the history
  • Loading branch information
MHendricks committed Sep 4, 2024
1 parent 8252699 commit 3c15b9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/python-static-analysis-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,8 @@ jobs:
python -m pip install --upgrade pip
python -m pip install tox
- name: Enable 8dot3name
run: |
dir c:\PROGRA~1
fsutil 8dot3name query d:
fsutil 8dot3name set 0
fsutil 8dot3name query d:
dir c:\PROGRA~1
- name: Run Tox
run: |
fsutil 8dot3name query d:
tox -e begin,py
- name: Upload coverage
Expand Down
6 changes: 4 additions & 2 deletions tests/test_env_var.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import os

import pytest
import win32api

from casement.env_var import EnvVar
from casement.registry import RegKey
Expand Down Expand Up @@ -57,7 +56,10 @@ def wrapper(*args, **kwargs):
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__)
# 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")
assert '~' in short_name

# Check expandvars argument
Expand Down

0 comments on commit 3c15b9b

Please sign in to comment.