Skip to content

Commit a142008

Browse files
committed
Using a fixed size for click test
1 parent f19b372 commit a142008

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Packages/testing/regression.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,16 @@
1616

1717
defaultThreshold=10.0
1818

19-
def init():
19+
def init(*args, **kwargs):
2020
testingDir = os.path.join(os.path.dirname(__file__), "..")
2121
sys.path.append(testingDir)
2222

23-
vcsinst = vcs.init()
23+
vcsinst = vcs.init(*args, **kwargs)
2424
vcsinst.setantialiasing(0)
2525
vcsinst.drawlogooff()
26-
vcsinst.setbgoutputdimensions(1200,1091,units="pixels")
26+
27+
if ('bg' in kwargs and kwargs['bg']) or ('bg' not in kwargs):
28+
vcsinst.setbgoutputdimensions(1200, 1091, units="pixels")
2729
return vcsinst
2830

2931
def run(vcsinst, fname, baseline=sys.argv[1], threshold=defaultThreshold):

testing/vcs/test_vcs_click_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Tests if the info produced when clicking on a map is correct.
99
src = sys.argv[1]
1010
plot = sys.argv[2]
11-
x = regression.init()
11+
x = regression.init(bg=False, geometry=(800, 600))
1212

1313
# data
1414
f = cdms2.open(vcs.sample_data + "/" + testConfig[plot][0])

0 commit comments

Comments
 (0)