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

Reenable autot_axis tests. Keep max Y to 500. #1967

Merged
merged 1 commit into from
May 20, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
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
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't you need 250 and 500 here as well?

Copy link
Contributor Author

@danlipsa danlipsa May 13, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem way the Y size was bigger than the screen's Y. The way it is now works fine on the lowest resolution on my mac: 1024 x 640

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danlipsa what is the logic of picking these hard-coded x and y size?

Copy link
Contributor Author

@danlipsa danlipsa May 18, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aashish24 I am making the window tall and narrow or long and thin so that ratio=autot is very different than the old behavior where the data is scaled with the window.

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])