Debian Codegraph @

testing/example_scripts/unittest/test_setup_skip_class.py

raw
1 # mypy: allow-untyped-defs
2 """Skipping an entire subclass with unittest.skip() should *not* call setUpClass from a base class."""
3
4 from __future__ import annotations
5
6 import unittest
7
8
9 class Base(unittest.TestCase):
10 @classmethod
11 def setUpClass(cls):
12 assert 0
13
14
15 @unittest.skip("skip all tests")
16 class Test(Base):
17 def test_foo(self):
18 assert 0