From 5843a33e560363ba52ec00ebe3d471b59d570edf Mon Sep 17 00:00:00 2001 From: dave <dave@dtu.dk> Date: Thu, 4 Feb 2016 09:35:11 +0100 Subject: [PATCH] assertRaises can not evaluate exception text, out-comment --- wetb/hawc2/tests/test_compare_test_cases.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/wetb/hawc2/tests/test_compare_test_cases.py b/wetb/hawc2/tests/test_compare_test_cases.py index d73d5a9..197f016 100644 --- a/wetb/hawc2/tests/test_compare_test_cases.py +++ b/wetb/hawc2/tests/test_compare_test_cases.py @@ -32,14 +32,19 @@ class TestCmpTestCases(CompareTestCases): self.compare_sel(self.ref_path + 'test3.sel', self.test_path + 'test3.sel') def test_compare_sel_difference(self): - self.assertRaises(AssertionError, " 2 bea1 angle deg shaft_rot angle", - self.compare_sel, self.ref_path + 'test4.sel', self.test_path + 'test4.sel') + self.assertRaises(AssertionError,# " 2 bea1 angle deg shaft_rot angle", + self.compare_sel, self.ref_path + 'test4.sel', + self.test_path + 'test4.sel') def test_compare_contents_dat(self): self.compare_dat_contents(self.ref_path + 'test1.dat', self.test_path + 'test1.dat') def test_compare_dat_contents_difference(self): - self.assertRaises(AssertionError, " 2.00000E-02", self.compare_dat_contents, self.ref_path + 'test3.dat', self.test_path + 'test3.dat') + # FIXME: can we have something similar in PY2 that checks the error + # text as well? + self.assertRaises(AssertionError,# " 2.00000E-02", + self.compare_dat_contents, self.ref_path + 'test3.dat', + self.test_path + 'test3.dat') #def test_compare_plot_difference(self): # self.assertRaises(AssertionError, "Difference in the the values of:\n1 Time", self.compare_dat_plot, self.ref_path + 'test3', self.test_path + 'test3') -- GitLab