Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade gmt from 6.0.0rc1 to 6.0.0rc4 #327

Merged
merged 6 commits into from
Oct 1, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "Bad fix for test_begin_end by ending global session"
This reverts commit 57efa55.
  • Loading branch information
weiji14 committed Sep 30, 2019
commit d377320acd90d15d4f80ed4cdea86f960f4b72a6
7 changes: 1 addition & 6 deletions pygmt/tests/test_session_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,21 @@
Test the session management modules.
"""
import os
import pytest

from ..session_management import begin, end
from ..clib import Session
from ..exceptions import GMTCLibError


def test_begin_end():
""""
Run a command inside a begin-end modern mode block.
First, end the global session. When finished, restart it.
"""
with pytest.raises(GMTCLibError, match="Module 'end' failed with status code 78:"):
end() # Kill the global session first

end() # Kill the global session
begin()
with Session() as lib:
lib.call_module("basemap", "-R10/70/-3/8 -JX4i/3i -Ba")
end()

begin() # Restart the global session
assert os.path.exists("pygmt-session.pdf")
os.remove("pygmt-session.pdf")