File: test_setup_skip_class.py

package info (click to toggle)
pytest 9.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,308 kB
  • sloc: python: 65,808; makefile: 45
file content (18 lines) | stat: -rw-r--r-- 369 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# mypy: allow-untyped-defs
"""Skipping an entire subclass with unittest.skip() should *not* call setUpClass from a base class."""

from __future__ import annotations

import unittest


class Base(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        assert 0


@unittest.skip("skip all tests")
class Test(Base):
    def test_foo(self):
        assert 0