Commit 2831b6c0 authored by Yori Fournier's avatar Yori Fournier
Browse files

Merge branch 'add-tests' into 'dev'

add test203 and 204

See merge request !32
parents dc020517 e9da4e85
......@@ -91,25 +91,4 @@ from .mytool import FigOneAxes
from .test import myTest
# import the tests
from .test import test100
from .test import test200, test201, test202
from .test import test300, test301, test302, test303, test304, test305
from .test import test306, test307, test308, test309, test310, test311
from .test import test312
from .test import test400, test401, test402, test403
from .test import test500, test501, test502, test503, test504
from .test import test505, test506, test507, test508, test509
from .test import test510, test511
from .test import test600
# the tests to run
testList = [test100,
test201, test202,
test300, test301, test302, test303, test304, test305,
test306, test307, test308, test309, test310, test311,
test312,
test400, test401, test402,
test503, test506, test500, test507, test501, test502,
test504, test505, test508, test509, test510, test511,
test600,
]
from .test import testList
# IMPORT ---------------------------------------------------------------
from .. import SEVR, DBUG, INFO
from .. import MyAxes
from .. import rcParams
SEVR = SEVR + ' (mypl.mytool.axPlot2D): '
DBUG = DBUG + ' (mypl.mytool.axPlot2D): '
INFO = INFO + ' (mypl.mytool.axPlot2D): '
D_XRANGE = None
D_YRANGE = None
......
......@@ -8,7 +8,7 @@ from .tests import myTest
# import the tests
from .tests import test100
from .tests import test200, test201, test202
from .tests import test200, test201, test202, test203, test204
from .tests import test300, test301, test302, test303, test304, test305
from .tests import test306, test307, test308, test309, test310, test311
from .tests import test312
......@@ -18,5 +18,17 @@ from .tests import test505, test506, test507, test508, test509
from .tests import test510, test511
from .tests import test600
# the tests to run
testList = [test100,
test201, test202, test203, test204,
test300, test301, test302, test303, test304, test305,
test306, test307, test308, test309, test310, test311,
test312,
test400, test401, test402,
test503, test506, test500, test507, test501, test502,
test504, test505, test508, test509, test510, test511,
test600,
]
# for the demos
from ..mytool import print2screen
......@@ -221,6 +221,59 @@ def test202(debug):
return(status)
# TEST 2.03: Test Axes.__init__ with keywords.
def test203(debug):
# create the environment
data = MyData()
fig = FigTest1((data,))
# create the axis
ax = AxTest1(fig, 6. / 8., [0, 0, 1, 1], xRange=[-2, 2])
# set the data (simulate some formatRawData function)
ax.data = {'xdata': [-1, 1], 'ydata': [1, -1]}
# plotting
status = ax.plotting()
del ax
del fig
del data
return(status)
# TEST 2.04: Test Axes.update
def test204(debug):
# create the environment
data = MyData()
fig = FigTest1((data,))
# create the axis
ax = AxTest1(fig, 6. / 8., [0, 0, 1, 1])
# set the data (simulate some formatRawData function)
ax.data = {'xdata': [-1, 1], 'ydata': [1, -1]}
# myplotlib usage
ax.update(xRange=[-2, 2])
# matplotlib usage
kwargs = {'yRange': [-2, 2]}
ax.update(kwargs)
# plotting
status = ax.plotting()
del ax
del fig
del data
return(status)
# TEST 300: test the update of rawdata (EXPECTED: TRUE)
def test300(debug):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment