summaryrefslogtreecommitdiff
path: root/tests/test_string_asserts.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-10-08 09:21:15 +0200
committerGeorg Brandl <georg@python.org>2014-10-08 09:21:15 +0200
commit444fb6fd9b3492040a36fcca672fee8175f8d603 (patch)
tree2bd411ca78decf276b95dc6b1788e594b2e35287 /tests/test_string_asserts.py
parent491fec23ef01687906f5d71ee718522cd2917926 (diff)
parentc1bfe4eed3805d3556bffa3c6b9cc2d3f6976205 (diff)
downloadpygments-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.py12
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")