Skip to content

Commit fc431dd

Browse files
committed
Attempting to fix windows tests tempfile issue
1 parent 76f8bc3 commit fc431dd

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.github/workflows/tap-tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ jobs:
2626
python-version: ${{ matrix.python-version }}
2727
- name: Install dependencies
2828
run: |
29+
if [ "$RUNNER_OS" == "Windows" ] then;
30+
echo "TMP=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV
31+
echo "TEMP=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV
32+
fi
2933
git config --global user.email "[email protected]"
3034
git config --global user.name "Your Name"
3135
python -m pip install --upgrade pip

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.idea
2+
.vscode
23
__pycache__
34
.DS_Store
45
*.json

tests/test_utils.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,10 @@ def test_has_git_false(self) -> None:
5757
self.assertFalse(has_git())
5858
os.chdir(self.temp_dir.name)
5959

60-
# TODO: fix this test on Windows
61-
@unittest.skipIf(platform.system() == 'Windows', 'Inconsistent user path on Windows in GitHub Actions')
6260
def test_get_git_root(self) -> None:
6361
# Ideally should be self.temp_dir.name == get_git_root() but the OS may add a prefix like /private
6462
self.assertTrue(get_git_root().endswith(self.temp_dir.name))
6563

66-
# TODO: fix this test on Windows
67-
@unittest.skipIf(platform.system() == 'Windows', 'Inconsistent user path on Windows in GitHub Actions')
6864
def test_get_git_root_subdir(self) -> None:
6965
subdir = os.path.join(self.temp_dir.name, 'subdir')
7066
os.makedirs(subdir)

0 commit comments

Comments
 (0)