Skip to content

Commit

Permalink
tests: fix test assertion
Browse files Browse the repository at this point in the history
In Python3.6, Exception('Message') gets represented as Exception('Message',).

Signed-off-by: Matteo Cafasso <noxdafox@gmail.com>
  • Loading branch information
noxdafox committed Nov 3, 2021
1 parent 2ee4d97 commit af87009
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/environment_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ def test_eval_python_error(self):

with self.assertRaises(CLIPSError):
self.env.eval('(python_error)')
self.assertEqual(str(self.env.error_state),
"[PYCODEFUN1] Exception('BOOM!')")
self.assertTrue("[PYCODEFUN1]" in str(self.env.error_state))

self.env.clear_error_state()
self.assertIsNone(self.env.error_state)
Expand Down

0 comments on commit af87009

Please sign in to comment.