Commit e9c30c1b authored by Yori 'AGy' Fournier's avatar Yori 'AGy' Fournier
Browse files

corrections:

modify the tests 200, 308 and 309, such that they won't fail because of the new
debugging feature.
parent 6189dd74
......@@ -82,7 +82,7 @@ class FigTest2(MyFig):
# (private variable can not be updated)
FIGSIZE = (8., 6.)
def defineKeywords(self):
def declareKeywords(self):
self.keywords = {'xRange': D_XRANGE,
'yRange': D_YRANGE}
......
......@@ -78,7 +78,10 @@ def test200(debug):
# create stupid data
data = MyData()
data.data = [[0, 0], [1, 1]] # Dummy data
data.data = [0, 0, 1, 1] # Dummy data
if(debug):
print(DBUG + "try to create FigTest2.")
# create a figure
fig = FigTest2((data,), dpi=75.)
......@@ -86,6 +89,9 @@ def test200(debug):
# set ratio and frameRect
ratio = 4. / 6. # float
frameRect = [0, 0, 0.5, 1.0] # [x0, y0, x1, y1]
if(debug):
print(DBUG + "try to create MyAxes.")
# create the MyAxes object.
ax = MyAxes(fig, ratio, frameRect)
......@@ -396,7 +402,7 @@ def test307(debug):
# TEST 3.08: test MyFig::plot
def test308(debug):
fig = FigTest2(('Non-Existing-Data',))
fig = FigTest2(('Non-Existing-Data',), debug=False)
if(debug):
print(DBUG + "test without data: ")
......@@ -411,6 +417,8 @@ def test308(debug):
if(debug):
print(DBUG + "test without data: " + str(status))
fig.debug = debug
G_RAWDATAS.update({'data': MyData()})
G_RAWDATAS['data'].data = [1, -1, -1, 1]
......@@ -441,7 +449,7 @@ def test309(debug):
status = True
fig = FigTest2(('dummy',), fignum=-12, reformat=True, debug=True, formatted=True)
fig = FigTest2(('dummy',), fignum=-12, reformat=True, debug=False, formatted=True)
if fig.fignum != -12:
status = False
......@@ -449,7 +457,7 @@ def test309(debug):
if fig.rawdata != ('dummy',):
status = False
if(not (fig.debug and fig.reformat and not fig.formatted)): # EXPECT: True, True, False
if(not (not fig.debug and fig.reformat and not fig.formatted)): # EXPECT: False, True, False
status = False
if not hasattr(fig, 'FIGSIZE'):
......
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