diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2021-11-07 17:41:22 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-11-07 17:41:22 -0500 |
commit | 2a2293cafb6b322eb3329b5a7abd98435c56f361 (patch) | |
tree | 46bd827dbca10f809d069fe6bce3b402dad01d95 /tests/mixins.py | |
parent | 354245e8b6e8ada42a1a88c668596b5c6d3e9539 (diff) | |
download | python-coveragepy-git-2a2293cafb6b322eb3329b5a7abd98435c56f361.tar.gz |
refactor(test): use the expected name for initializing tests.
Originally I used setup_test because something went wrong when I used setUp. I
wrote https://github.com/pytest-dev/pytest/issues/8424 about it. There they say
to use `-p no:nose` to disable nose interpretation.
But now I simply went back to setUp, and all seems well? Not sure what changed,
but using the expected name is better.
Diffstat (limited to 'tests/mixins.py')
-rw-r--r-- | tests/mixins.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/mixins.py b/tests/mixins.py index 1043c2d2..e55a05b9 100644 --- a/tests/mixins.py +++ b/tests/mixins.py @@ -27,12 +27,9 @@ class PytestBase: # pylint: disable=attribute-defined-outside-init self._pytest_request = request self._monkeypatch = monkeypatch - self.setup_test() + self.setUp() - # Can't call this setUp or setup because pytest sniffs out unittest and - # nosetest special names, and does things with them. - # https://github.com/pytest-dev/pytest/issues/8424 - def setup_test(self): + def setUp(self): """Per-test initialization. Override this as you wish.""" pass |