Skip to content

Commit 0256d4c

Browse files
committed
Eliminate the windows mocking since we only run the windows tests on windows.
1 parent cd829fc commit 0256d4c

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

jupyter_core/tests/mocking.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,3 @@ def __exit__(self, *args):
2929
patch.object(os, 'name', 'posix'),
3030
patch.object(sys, 'platform', 'linux2'),
3131
)
32-
33-
windows = MultiPatch(
34-
patch.object(os, 'name', 'nt'),
35-
patch.object(sys, 'platform', 'win32'),
36-
)

jupyter_core/tests/test_paths.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,10 @@ def test_data_dir_darwin():
115115

116116
@pytest.mark.skipif(sys.platform != "win32", reason="only run on windows")
117117
def test_data_dir_windows():
118-
with windows:
119-
data = jupyter_data_dir()
118+
data = jupyter_data_dir()
120119
assert data == realpath(pjoin(os.environ.get('APPDATA', None), 'jupyter'))
121120

122-
with windows, xdg:
121+
with xdg:
123122
# windows should ignore xdg
124123
data = jupyter_data_dir()
125124
assert data == realpath(pjoin(os.environ.get('APPDATA', None), 'jupyter'))
@@ -156,11 +155,10 @@ def test_runtime_dir_darwin():
156155

157156
@pytest.mark.skipif(sys.platform != "win32", reason="only run on windows")
158157
def test_runtime_dir_windows():
159-
with windows:
160-
runtime = jupyter_runtime_dir()
158+
runtime = jupyter_runtime_dir()
161159
assert runtime == realpath(pjoin(os.environ.get('APPDATA', None), 'jupyter', 'runtime'))
162160

163-
with windows, xdg:
161+
with xdg:
164162
# windows should ignore xdg
165163
runtime = jupyter_runtime_dir()
166164
assert runtime == realpath(pjoin(os.environ.get('APPDATA', None), 'jupyter', 'runtime'))

0 commit comments

Comments
 (0)