File tree Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Expand file tree Collapse file tree 4 files changed +9
-6
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 24
24
uses : actions/setup-python@v2
25
25
with :
26
26
python-version : ${{ matrix.python-version }}
27
+ - name : Set temp directories on Windows
28
+ if : matrix.os == 'windows-latest'
29
+ run : |
30
+ echo "TMPDIR=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV
31
+ echo "TEMP=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV
32
+ echo "TMP=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV
27
33
- name : Install dependencies
28
34
run : |
29
35
git config --global user.email "[email protected] "
Original file line number Diff line number Diff line change 1
1
.idea
2
+ .vscode
2
3
__pycache__
3
4
.DS_Store
4
5
* .json
Original file line number Diff line number Diff line change @@ -57,21 +57,17 @@ def test_has_git_false(self) -> None:
57
57
self .assertFalse (has_git ())
58
58
os .chdir (self .temp_dir .name )
59
59
60
- # TODO: fix this test on Windows
61
- @unittest .skipIf (platform .system () == 'Windows' , 'Inconsistent user path on Windows in GitHub Actions' )
62
60
def test_get_git_root (self ) -> None :
63
61
# Ideally should be self.temp_dir.name == get_git_root() but the OS may add a prefix like /private
64
- self .assertTrue (get_git_root ().endswith (self .temp_dir .name ))
62
+ self .assertTrue (get_git_root ().endswith (self .temp_dir .name . replace ( ' \\ ' , '/' ) ))
65
63
66
- # TODO: fix this test on Windows
67
- @unittest .skipIf (platform .system () == 'Windows' , 'Inconsistent user path on Windows in GitHub Actions' )
68
64
def test_get_git_root_subdir (self ) -> None :
69
65
subdir = os .path .join (self .temp_dir .name , 'subdir' )
70
66
os .makedirs (subdir )
71
67
os .chdir (subdir )
72
68
73
69
# Ideally should be self.temp_dir.name == get_git_root() but the OS may add a prefix like /private
74
- self .assertTrue (get_git_root ().endswith (self .temp_dir .name ))
70
+ self .assertTrue (get_git_root ().endswith (self .temp_dir .name . replace ( ' \\ ' , '/' ) ))
75
71
76
72
os .chdir (self .temp_dir .name )
77
73
You can’t perform that action at this time.
0 commit comments