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

Use alias long-form for grdimage, text, and psconvert tests #1570

Merged
merged 4 commits into from
Oct 6, 2021
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion pygmt/tests/test_grdimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def test_grdimage_over_dateline(xrgrid):
fig = Figure()
assert xrgrid.gmt.registration == 0 # gridline registration
xrgrid.gmt.gtype = 1 # geographic coordinate system
fig.grdimage(grid=xrgrid, region="g", projection="A0/0/1c", V="i")
fig.grdimage(grid=xrgrid, region="g", projection="A0/0/1c", verbose="i")
maxrjones marked this conversation as resolved.
Show resolved Hide resolved
return fig


Expand Down
12 changes: 6 additions & 6 deletions pygmt/tests/test_psconvert.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ def test_psconvert():
psconvert creates a figure in the current directory.
"""
fig = Figure()
fig.basemap(R="10/70/-3/8", J="X4i/3i", B="a")
fig.basemap(region="10/70/-3/8", projection="X4i/3i", frame="a")
prefix = "test_psconvert"
fig.psconvert(F=prefix, T="f", A=True)
fig.psconvert(prefix=prefix, fmt="f", crop=True)
fname = prefix + ".pdf"
assert os.path.exists(fname)
os.remove(fname)
Expand All @@ -24,15 +24,15 @@ def test_psconvert_twice():
Call psconvert twice to get two figures.
"""
fig = Figure()
fig.basemap(R="10/70/-3/8", J="X4i/3i", B="a")
fig.basemap(region="10/70/-3/8", projection="X4i/3i", frame="a")
prefix = "test_psconvert_twice"
# Make a PDF
fig.psconvert(F=prefix, T="f")
fig.psconvert(prefix=prefix, fmt="f")
fname = prefix + ".pdf"
assert os.path.exists(fname)
os.remove(fname)
# Make a PNG
fig.psconvert(F=prefix, T="g")
fig.psconvert(prefix=prefix, fmt="g")
fname = prefix + ".png"
assert os.path.exists(fname)
os.remove(fname)
Expand All @@ -43,7 +43,7 @@ def test_psconvert_aliases():
Use the aliases to make sure they work.
maxrjones marked this conversation as resolved.
Show resolved Hide resolved
"""
fig = Figure()
fig.basemap(R="10/70/-3/8", J="X4i/3i", B="a")
fig.basemap(region="10/70/-3/8", projection="X4i/3i", frame="a")
prefix = "test_psconvert_aliases"
fig.psconvert(prefix=prefix, fmt="g", crop=True, dpi=100)
fname = prefix + ".png"
Expand Down
2 changes: 1 addition & 1 deletion pygmt/tests/test_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def test_text_justify_parsed_from_textfile():
projection="H90/9i",
justify=True,
textfiles=CITIES_DATA,
D="j0.45/0+vred", # draw red-line from xy point to text label (city name)
offset="j0.45/0+vred", # draw red-line from xy point to text label (city name)
)
return fig

Expand Down