diff options
author | Georg Brandl <georg@python.org> | 2014-10-08 09:21:15 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-10-08 09:21:15 +0200 |
commit | 444fb6fd9b3492040a36fcca672fee8175f8d603 (patch) | |
tree | 2bd411ca78decf276b95dc6b1788e594b2e35287 /tests/test_string_asserts.py | |
parent | 491fec23ef01687906f5d71ee718522cd2917926 (diff) | |
parent | c1bfe4eed3805d3556bffa3c6b9cc2d3f6976205 (diff) | |
download | pygments-444fb6fd9b3492040a36fcca672fee8175f8d603.tar.gz |
Merged in leodemoura/pygments-main (pull request #399)
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") |