diff options
Diffstat (limited to 'Lib/unittest/test/test_skipping.py')
-rw-r--r-- | Lib/unittest/test/test_skipping.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/unittest/test/test_skipping.py b/Lib/unittest/test/test_skipping.py index 71f7b70..1c178a9 100644 --- a/Lib/unittest/test/test_skipping.py +++ b/Lib/unittest/test/test_skipping.py @@ -255,6 +255,17 @@ class Test_TestSkipping(unittest.TestCase): suite.run(result) self.assertEqual(result.skipped, [(test, "testing")]) + def test_skip_without_reason(self): + class Foo(unittest.TestCase): + @unittest.skip + def test_1(self): + pass + + result = unittest.TestResult() + test = Foo("test_1") + suite = unittest.TestSuite([test]) + suite.run(result) + self.assertEqual(result.skipped, [(test, "")]) if __name__ == "__main__": unittest.main() |