From 0e9f7481c8bafc75d0bc8cdb9204636caecfa8eb Mon Sep 17 00:00:00 2001
From: Max Liu <mjliu@mit.edu>
Date: Fri, 6 Dec 2019 14:37:09 -0500
Subject: [PATCH] Increase tolerance for rate check in pdep test

Resolves #1682
---
 arkane/pdepTest.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arkane/pdepTest.py b/arkane/pdepTest.py
index 8081372b335..dba1bbbcac0 100644
--- a/arkane/pdepTest.py
+++ b/arkane/pdepTest.py
@@ -104,7 +104,9 @@ def test_pdep_job(self):
             reaction_list = read_reactions_block(chem, dictionary)
         rxn = reaction_list[0]
         self.assertIsInstance(rxn.kinetics, Chebyshev)
-        self.assertAlmostEquals(rxn.kinetics.get_rate_coefficient(1000.0, 1.0), 88.88253229631246)
+        # Accept a delta of 0.2, which could result from numerical discrepancies
+        # See RMG-Py #1682 on GitHub for discussion
+        self.assertAlmostEquals(rxn.kinetics.get_rate_coefficient(1000.0, 1.0), 88.88253229631246, delta=0.2)
 
         files = [f for f in os.listdir(os.path.join(self.directory, 'sensitivity', ''))
                  if os.path.isfile(os.path.join(self.directory, 'sensitivity', f))]
@@ -116,7 +118,7 @@ def test_pdep_job(self):
                 if '1000.0' in line:
                     break
         sa_coeff = line.split()[-2]
-        self.assertEquals(float(sa_coeff), -8.23e-6)
+        self.assertAlmostEquals(float(sa_coeff), -8.23e-6, delta=0.2e-6)
 
     @classmethod
     def tearDown(cls):