-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using common module for regression testing
- Loading branch information
Showing
118 changed files
with
569 additions
and
2,057 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import os, sys | ||
from distutils.core import setup | ||
import cdat_info | ||
|
||
sys.path.append(os.environ.get('BUILD_DIR',"build")) | ||
|
||
setup(name="testing", | ||
version=cdat_info.Version, | ||
description="Testing infrastructure for cdat", | ||
url="http://uvcdat.llnl.gov", | ||
packages=['testing'], | ||
package_dir={'testing': 'testing',}, | ||
install_requires=['numpy','vcs', 'vtk'], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,9 @@ | ||
|
||
import vcs,numpy,os,sys | ||
src=sys.argv[1] | ||
pth = os.path.join(os.path.dirname(__file__),"..") | ||
sys.path.append(pth) | ||
import checkimage | ||
|
||
x=vcs.init() | ||
x.setantialiasing(0) | ||
x.drawlogooff() | ||
x.setbgoutputdimensions(1200,1091,units="pixels") | ||
import vcs, numpy, cdms2, MV2, os, sys, testing.regression as regression | ||
|
||
x = regression.init() | ||
d = numpy.sin(numpy.arange(100)) | ||
d=numpy.reshape(d,(10,10)) | ||
|
||
|
||
d = numpy.reshape(d,(10,10)) | ||
one = x.create1d() | ||
|
||
x.plot(d,one,bg=1) | ||
|
||
|
||
fnm = "test_1D_with_manyDs.png" | ||
x.png(fnm) | ||
|
||
print "fnm:",fnm | ||
print "src:",src | ||
ret = checkimage.check_result_image(fnm,src,checkimage.defaultThreshold) | ||
sys.exit(ret) | ||
|
||
|
||
|
||
regression.run(x, "test_1D_with_manyDs.png", sys.argv[1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,8 @@ | ||
|
||
import vcs,numpy,os,sys | ||
src=sys.argv[1] | ||
pth = os.path.join(os.path.dirname(__file__),"..") | ||
sys.path.append(pth) | ||
import checkimage | ||
|
||
x=vcs.init() | ||
x.setantialiasing(0) | ||
x.drawlogooff() | ||
x.setbgoutputdimensions(1200,1091,units="pixels") | ||
import vcs, numpy, cdms2, MV2, os, sys, testing.regression as regression | ||
|
||
x = regression.init() | ||
d = numpy.sin(numpy.arange(100)) | ||
|
||
b = x.createboxfill() | ||
|
||
x.plot(d,b,bg=1) | ||
|
||
|
||
fnm = "test_1d_in_boxfill.png" | ||
x.png(fnm) | ||
|
||
print "fnm:",fnm | ||
print "src:",src | ||
ret = checkimage.check_result_image(fnm,src,checkimage.defaultThreshold) | ||
sys.exit(ret) | ||
|
||
|
||
|
||
regression.run(x, "test_1d_in_boxfill.png", sys.argv[1]) |
33 changes: 3 additions & 30 deletions
33
testing/vcs/test_vcs_1d_marker_not_shown_if_xaxis_flipped.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,15 @@ | ||
import vcs | ||
import numpy | ||
import MV2 | ||
import cdms2 | ||
import sys | ||
import os | ||
|
||
src=sys.argv[1] | ||
pth = os.path.join(os.path.dirname(__file__),"..") | ||
sys.path.append(pth) | ||
import checkimage | ||
|
||
x=vcs.init() | ||
x.setantialiasing(0) | ||
x.drawlogooff() | ||
x.setbgoutputdimensions(1200,1091,units="pixels") | ||
import vcs, numpy, cdms2, MV2, os, sys, testing.regression as regression | ||
|
||
x = regression.init() | ||
data = MV2.array([4,5,6,7,1,3,7,9,])+230. | ||
|
||
p = cdms2.createAxis([2,5,100,200,500,800,850,1000]) | ||
|
||
data.setAxis(0,p) | ||
|
||
data.id="jim" | ||
|
||
gm=x.create1d() | ||
|
||
gm.linewidth=0 | ||
gm.datawc_x1=1000 | ||
gm.datawc_x2=0 | ||
|
||
gm.markersize=30 | ||
|
||
x.plot(data,gm,bg=1) | ||
|
||
fnm = "test_1d_marker_not_shown_if_xaxis_flipped.png" | ||
x.png(fnm) | ||
|
||
print "fnm:",fnm | ||
print "src:",src | ||
ret = checkimage.check_result_image(fnm,src,checkimage.defaultThreshold) | ||
sys.exit(ret) | ||
regression.run(x, "test_1d_marker_not_shown_if_xaxis_flipped.png", sys.argv[1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.