Skip to content

Commit

Permalink
Added a test for mercator edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
aashish24 committed Sep 17, 2015
1 parent 4754b03 commit c7961f7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
7 changes: 7 additions & 0 deletions testing/vcs/CMakeLists.txt
Expand Up @@ -737,5 +737,12 @@ cdat_add_test(vcs_test_click_info
${BASELINE_DIR}/test_vcs_click_info.png
)

cdat_add_test(vcs_test_mercator_edge
"${PYTHON_EXECUTABLE}"
${cdat_SOURCE_DIR}/testing/vcs/test_vcs_mercator_edge.py
${BASELINE_DIR}/test_vcs_mercator_edge.png
)


add_subdirectory(vtk_ui)
add_subdirectory(editors)
21 changes: 21 additions & 0 deletions testing/vcs/test_vcs_mercator_edge.py
@@ -0,0 +1,21 @@
import vcs,cdms2
import os,sys
f = cdms2.open(os.path.join(vcs.sample_data, "clt.nc"))
s = f("clt")
x = vcs.init()
iso = x.createisofill()
iso.projection = "mercator"
x.plot(s(latitude=(-90, 90)), iso)

# Load the image testing module:
testingDir = os.path.join(os.path.dirname(__file__), "..")
sys.path.append(testingDir)
import checkimage

# Create the test image and compare:
baseline = sys.argv[1]
testFile = "test_vcs_mercator_edge.png"
x.png(testFile)
ret = checkimage.check_result_image(testFile, baseline,
checkimage.defaultThreshold)
sys.exit(ret)

0 comments on commit c7961f7

Please sign in to comment.