Debian Codegraph @

testing/example_scripts/unittest/test_setup_skip.py

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