Skip to content

Commit

Permalink
Reenable autot_axis tests. Keep max Y to 500.
Browse files Browse the repository at this point in the history
  • Loading branch information
danlipsa committed May 20, 2016
1 parent b5e67ac commit 2dd2b35
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 21 deletions.
3 changes: 2 additions & 1 deletion Packages/testing/regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ def init(*args, **kwargs):
vcsinst.setantialiasing(0)
vcsinst.drawlogooff()

if ('bg' in kwargs and kwargs['bg']) or ('bg' not in kwargs):
if ((('bg' in kwargs and kwargs['bg']) or ('bg' not in kwargs)) and
('geometry' not in kwargs)):
vcsinst.setbgoutputdimensions(1200, 1091, units="pixels")
return vcsinst

Expand Down
35 changes: 18 additions & 17 deletions testing/vcs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -983,23 +983,24 @@ cdat_add_test(test_vcs_large_pattern_hatch
${cdat_SOURCE_DIR}/testing/vcs/test_vcs_large_pattern_hatch.py
${BASELINE_DIR}/test_vcs_large_pattern_hatch.png
)
# crashes on mac commenting out for release`
#foreach(x_over_y 0.5 2)
# # a_meshfill does not work yet, as meshfills are wrapped which is not known to VCS
# foreach(plot a_boxfill a_mollweide_boxfill a_robinson_meshfill a_lambert_isofill a_robinson_isoline)
# foreach(mode foreground background)
# string(SUBSTRING ${plot} 2 -1 plot_name)
# cdat_add_test(test_vcs_autot_axis_titles_${mode}_${plot_name}_${x_over_y}
# "${PYTHON_EXECUTABLE}"
# ${cdat_SOURCE_DIR}/testing/vcs/test_vcs_autot_axis_titles.py
# "${BASELINE_DIR}/test_vcs_autot_axis_titles_${plot_name}_${x_over_y}.png"
# ${mode}
# ${plot}
# ${x_over_y}
# )
# endforeach()
# endforeach()
#endforeach()

foreach(x_over_y 0.5 2)
# a_meshfill does not work yet, as meshfills are wrapped which is not known to VCS
foreach(plot a_boxfill a_mollweide_boxfill a_robinson_meshfill a_lambert_isofill a_robinson_isoline)
foreach(mode foreground background)
string(SUBSTRING ${plot} 2 -1 plot_name)
cdat_add_test(test_vcs_autot_axis_titles_${mode}_${plot_name}_${x_over_y}
"${PYTHON_EXECUTABLE}"
${cdat_SOURCE_DIR}/testing/vcs/test_vcs_autot_axis_titles.py
"${BASELINE_DIR}/test_vcs_autot_axis_titles_${plot_name}_${x_over_y}.png"
${mode}
${plot}
${x_over_y}
)
endforeach()
endforeach()
endforeach()

cdat_add_test(test_vcs_boxfill_lambert_crash
"${PYTHON_EXECUTABLE}"
${cdat_SOURCE_DIR}/testing/vcs/test_vcs_boxfill_lambert_crash.py
Expand Down
9 changes: 6 additions & 3 deletions testing/vcs/test_vcs_autot_axis_titles.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
'a_robinson_isoline': ('clt.nc', 'clt')}

# Tests if ratio=autot works correctly for background and foreground plots
bg = 1
if (sys.argv[2] == 'foreground'):
bg = 0
plot = sys.argv[3]
x_over_y = sys.argv[4]
if (x_over_y == '0.5'):
xSize = 400
ySize = 800
xSize = 250
ySize = 500
else:
xSize = 800
ySize = 400
Expand All @@ -39,5 +42,5 @@
x.setantialiasing(0)
x.drawlogooff()
x.plot(s, gm, ratio="autot")
name = "test_autot_axis_titles_" + plot[2:] + "_" + x_over_y + "_" + str(bg) + ".png"
name = "test_vcs_autot_axis_titles_" + plot[2:] + "_" + x_over_y + "_" + str(bg) + ".png"
regression.run(x, name, sys.argv[1])

0 comments on commit 2dd2b35

Please sign in to comment.