New submission from Vratko Polak <vrpo...@cisco.com>:
One particular paragraph from unittest.rst is not clear enough: "If you want the setUpClass and tearDownClass on base classes called then you must call up to them yourself. The implementations in TestCase are empty." It has sparkled a debate here [0]. Example: A class SuperTestCase, which inherits from unittest.TestCase, defines some non-trivial setUpClass class method. Then a class SubTestCase, which inherits from SuperTestCase, wants to have SuperTestCase.setUpClass executed as its setUpClass. Does SubTestCase need to override setUpClass just to call SuperTestCase.setUpClass (as the paragraphs might suggest), or can it rely in inheritance to have it executed without overriding? I will create GitHub PR soon. [0] https://gerrit.fd.io/r/#/c/18579/1/test/test_sparse_vec.py@14 ---------- assignee: docs@python components: Documentation messages: 340028 nosy: docs@python, vrpolakatcisco priority: normal severity: normal status: open title: Unittest document is not clear on SetUpClass calls type: enhancement versions: Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36612> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com