diff options
Diffstat (limited to 'tests/test_string_asserts.py')
-rw-r--r-- | tests/test_string_asserts.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/test_string_asserts.py b/tests/test_string_asserts.py index 0beed15c..90d81d67 100644 --- a/tests/test_string_asserts.py +++ b/tests/test_string_asserts.py @@ -17,23 +17,19 @@ class TestStringTests(StringTests, unittest.TestCase): # @unittest.expectedFailure not supported by nose def test_startswith_incorrect(self): - with self.assertRaises(AssertionError): - self.assertStartsWith("AAA", "B") + self.assertRaises(AssertionError, self.assertStartsWith, "AAA", "B") # @unittest.expectedFailure not supported by nose def test_startswith_short(self): - with self.assertRaises(AssertionError): - self.assertStartsWith("A", "AA") + self.assertRaises(AssertionError, self.assertStartsWith, "A", "AA") def test_endswith_correct(self): self.assertEndsWith("AAA", "A") # @unittest.expectedFailure not supported by nose def test_endswith_incorrect(self): - with self.assertRaises(AssertionError): - self.assertEndsWith("AAA", "B") + self.assertRaises(AssertionError, self.assertEndsWith, "AAA", "B") # @unittest.expectedFailure not supported by nose def test_endswith_short(self): - with self.assertRaises(AssertionError): - self.assertEndsWith("A", "AA") + self.assertRaises(AssertionError, self.assertEndsWith, "A", "AA") |