Brett Cannon added the comment:
It's more of a "can't be an instance method" than a strict "only classmethod".
Can I ask why you want it to be a strictmethod instead of a classmethod? I
personally don't want to change the docs as I think that encourages a
potentially bad situation where
Karthikeyan Singaravelan added the comment:
The use case of setUpClass and tearDownClass is to run once during class setup
and teardown where a class variable might be mutated. It's not a strict
requirement [0] but rather maybe a common use case. There is at least one test
case where
New submission from Peter de Blanc :
According to unittest docs:
https://docs.python.org/3.7/library/unittest.html#module-unittest
`setUpClass is called with the class as the only argument and must be decorated
as a classmethod()`
and:
`tearDownClass is called with the class as the only