[Test] Update SOFC test tolerances
This test was failing on some OS/compiler combinations
This commit is contained in:
parent
7eb4eaa13a
commit
67aa9eb4e3
2 changed files with 3 additions and 3 deletions
|
|
@ -683,7 +683,7 @@ class TestSofcKinetics(utilities.CanteraTest):
|
|||
cathode_bulk.electric_potential -
|
||||
anode_bulk.electric_potential])
|
||||
|
||||
self.compare(data, pjoin(self.test_data_dir, 'sofc-test.csv'))
|
||||
self.compare(data, pjoin(self.test_data_dir, 'sofc-test.csv'), rtol=1e-7)
|
||||
|
||||
|
||||
class TestDuplicateReactions(utilities.CanteraTest):
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ class CanteraTest(unittest.TestCase):
|
|||
if worst[0]:
|
||||
self.fail(worst[1])
|
||||
|
||||
def compare(self, data, reference_file):
|
||||
def compare(self, data, reference_file, rtol=1e-8, atol=1e-12):
|
||||
"""
|
||||
Compare an array with a reference data file, or generate the reference
|
||||
file if it does not exist.
|
||||
|
|
@ -98,7 +98,7 @@ class CanteraTest(unittest.TestCase):
|
|||
ref = np.genfromtxt(reference_file)
|
||||
self.assertEqual(data.shape, ref.shape)
|
||||
for i in range(ref.shape[0]):
|
||||
self.assertArrayNear(ref[i], data[i])
|
||||
self.assertArrayNear(ref[i], data[i], rtol, atol)
|
||||
else:
|
||||
# Generate the output file for the first time
|
||||
warnings.warn('Generating test data file:' +
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue