From 2dd2b3554fabbd1ec63e8e2c877f05cad4c61ecf Mon Sep 17 00:00:00 2001 From: Dan Lipsa Date: Thu, 12 May 2016 11:34:31 -0400 Subject: [PATCH] Reenable autot_axis tests. Keep max Y to 500. --- Packages/testing/regression.py | 3 +- testing/vcs/CMakeLists.txt | 35 ++++++++++++----------- testing/vcs/test_vcs_autot_axis_titles.py | 9 ++++-- 3 files changed, 26 insertions(+), 21 deletions(-) diff --git a/Packages/testing/regression.py b/Packages/testing/regression.py index 68ded76d9f..b9cd2cdeb3 100644 --- a/Packages/testing/regression.py +++ b/Packages/testing/regression.py @@ -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 diff --git a/testing/vcs/CMakeLists.txt b/testing/vcs/CMakeLists.txt index fd253ac230..c6ccf8517f 100644 --- a/testing/vcs/CMakeLists.txt +++ b/testing/vcs/CMakeLists.txt @@ -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 diff --git a/testing/vcs/test_vcs_autot_axis_titles.py b/testing/vcs/test_vcs_autot_axis_titles.py index dcc0f00b14..2728cbd6d5 100644 --- a/testing/vcs/test_vcs_autot_axis_titles.py +++ b/testing/vcs/test_vcs_autot_axis_titles.py @@ -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 @@ -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]) \ No newline at end of file