Skip to content

Commit 2db874a

Browse files
committed
Support values that can change in test
1 parent d1450bd commit 2db874a

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

tests/testcommon.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def stop(self):
200200

201201
print(outtxt)
202202

203-
print('vs')
203+
print('vs expected')
204204

205205
for chkval in self.p.chkvals:
206206
print(chkval)
@@ -213,4 +213,10 @@ def stop(self):
213213
for lidx, linevals in enumerate(self.p.chkvals):
214214
for i, chkpt in enumerate(chkpts):
215215
chkval = '%f' % self.ind.lines[lidx][chkpt]
216-
assert chkval == linevals[i]
216+
if not isinstance(linevals[i], tuple):
217+
assert chkval == linevals[i]
218+
else:
219+
try:
220+
assert chkval == linevals[i][0]
221+
except AssertionError:
222+
assert chkval == linevals[i][1]

0 commit comments

Comments
 (0)