From 7753b9c111f41849bab794043d345697307c9f1d Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sat, 24 Aug 2024 22:40:19 +0800 Subject: [PATCH] Fix test_gmt_compat_6_is_applied --- pygmt/tests/test_session_management.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pygmt/tests/test_session_management.py b/pygmt/tests/test_session_management.py index d949f1a51c0..289e4f15b02 100644 --- a/pygmt/tests/test_session_management.py +++ b/pygmt/tests/test_session_management.py @@ -36,10 +36,8 @@ def test_gmt_compat_6_is_applied(capsys): """ end() # Kill the global session try: - # Generate a gmt.conf file in the current directory - # with GMT_COMPATIBILITY = 5 - with Session() as lib: - lib.call_module("gmtset", ["GMT_COMPATIBILITY=5"]) + # Generate a gmt.conf file in the current directory with GMT_COMPATIBILITY = 5 + Path("gmt.conf").write_text("GMT_COMPATIBILITY = 5", encoding="utf-8") begin() with Session() as lib: lib.call_module("basemap", ["-R10/70/-3/8", "-JX4i/3i", "-Ba"])