Skip to content

Commit a048c86

Browse files
committed
Pretend to be on macOS instead of Windows
Workaround for AttributeError: 'NoneType' object has no attribute 'NeedCurrentDirectoryForExePath' when calling`_winapi.NeedCurrentDirectoryForExePath`, where `_winapi` is None on UNIX. See #2711 (comment)
1 parent d1b01c3 commit a048c86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pygmt/tests/test_clib_loading.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def test_load_libgmt_fails(monkeypatch):
7272
be found.
7373
"""
7474
with monkeypatch.context() as mpatch:
75-
mpatch.setattr(sys, "platform", "win32") # pretend to be on Windows
75+
mpatch.setattr(sys, "platform", "darwin") # pretend to be on macOS
7676
mpatch.setattr(
7777
subprocess, "check_output", lambda cmd, encoding: "libfakegmt.so"
7878
)

0 commit comments

Comments
 (0)