-
Notifications
You must be signed in to change notification settings - Fork 243
Closed
Labels
bugSomething isn't workingSomething isn't workingmaintenanceBoring but important stuff for the core devsBoring but important stuff for the core devs
Description
Description of the problem
To reproduce the bug, run:
mkdir tmp-test-dir-with-unique-name
cd tmp-test-dir-with-unique-name
pytest ../pygmt/tests/test_session_management.py
then you'll see a "gmt.conf" file in the tmp-test-dir-with-unique-name directory.
The "gmt.conf" file is generated by the test "test_gmt_compat_6_is_applied":
pygmt/pygmt/tests/test_session_management.py
Lines 30 to 34 in 809a888
| end() # Kill the global session | |
| try: | |
| with Session() as lib: | |
| # pretend that gmt.conf has GMT_COMPATIBILITY = 5 | |
| lib.call_module("gmtset", "GMT_COMPATIBILITY 5") |
At the end of the test, Lines 46-49 revert the GMT_COMPATIBILTY to 6. However, these codes only affect the gmt.conf in the session directory. The "gmt.conf" in the current directory is still untouched, with GMT_COMPATIBILITY set to 5.
pygmt/pygmt/tests/test_session_management.py
Lines 45 to 49 in 809a888
| finally: | |
| with Session() as lib: | |
| # revert gmt.conf back to GMT_COMPATIBILITY = 6 | |
| lib.call_module("set", "GMT_COMPATIBILITY 6") | |
| end() |
We should remove the "gmt.conf" from the current directory at the end of the test.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingmaintenanceBoring but important stuff for the core devsBoring but important stuff for the core devs