-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor test_image to plot @circuit.png instead of test_logo.png (#2922
) So that we don't need to pull test_logo.png from dvc, or run test_logo first to generate the image. * Add @circuit.png to cache * Remove dvc pull step from ci_tests_legacy.yaml * Try running test_image on Windows to see if it crashes
- Loading branch information
Showing
4 changed files
with
4 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
outs: | ||
- md5: c2e05c0d6fb17bcc7bf2f96193f91ad6 | ||
size: 10005 | ||
- md5: d7d0d71a44a232d5907dbd44f7a08f18 | ||
size: 30811 | ||
path: test_image.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,15 @@ | ||
""" | ||
Test Figure.image. | ||
""" | ||
import os | ||
import sys | ||
|
||
import pytest | ||
from pygmt import Figure | ||
|
||
TEST_IMG = os.path.join(os.path.dirname(__file__), "baseline", "test_logo.png") | ||
|
||
|
||
@pytest.mark.skipif(sys.platform == "win32", reason="crashes on Windows") | ||
@pytest.mark.mpl_image_compare | ||
def test_image(): | ||
""" | ||
Place images on map. | ||
""" | ||
fig = Figure() | ||
fig.image(TEST_IMG, position="x0/0+w2c", box="+pthin,blue") | ||
fig.image(imagefile="@circuit.png", position="x0/0+w2c", box="+pthin,blue") | ||
return fig |