We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 669d343 commit fca89f6Copy full SHA for fca89f6
python-stdlib/unittest/test_unittest.py
@@ -111,6 +111,21 @@ def testRaises(self):
111
def testSkip(self):
112
self.assertFail("this should be skipped")
113
114
+ def testAssert(self):
115
+
116
+ e1 = None
117
+ try:
118
119
+ def func_under_test(a):
120
+ assert a > 10
121
122
+ self.assertRaises(AssertionError, func_under_test, 20)
123
+ except AssertionError as e:
124
+ e1 = e
125
126
+ if not e1 or "not raised" not in e1.args[0]:
127
+ self.fail("Expected to catch lack of AssertionError from assert in func_under_test")
128
129
130
if __name__ == "__main__":
131
unittest.main()
0 commit comments