diff --git a/environment.yml b/environment.yml index 057b8466fe16..27624759ea86 100644 --- a/environment.yml +++ b/environment.yml @@ -63,7 +63,7 @@ dependencies: - psutil - prek - pydocstyle>=5.1.0 - - pytest!=4.6.0,!=5.4.0,!=8.1.0,<9.1.0 + - pytest!=4.6.0,!=5.4.0,!=8.1.0 - pytest-cov - pytest-rerunfailures - pytest-timeout diff --git a/lib/matplotlib/tests/test_mlab.py b/lib/matplotlib/tests/test_mlab.py index 82f877b4cc01..4f2ae49f4772 100644 --- a/lib/matplotlib/tests/test_mlab.py +++ b/lib/matplotlib/tests/test_mlab.py @@ -207,7 +207,8 @@ def test_detrend_linear_2d(self): scope='class') class TestSpectral: @pytest.fixture(scope='class', autouse=True) - def stim(self, request, fstims, iscomplex, sides, len_x, NFFT_density, + @classmethod + def stim(cls, request, fstims, iscomplex, sides, len_x, NFFT_density, nover_density, pad_to_density, pad_to_spectrum): Fs = 100. @@ -323,11 +324,6 @@ def stim(self, request, fstims, iscomplex, sides, len_x, NFFT_density, if iscomplex: y = y.astype('complex') - # Interestingly, the instance on which this fixture is called is not - # the same as the one on which a test is run. So we need to modify the - # class itself when using a class-scoped fixture. - cls = request.cls - cls.Fs = Fs cls.sides = sides cls.fstims = fstims diff --git a/pyproject.toml b/pyproject.toml index b63ce715ed9e..cf0cde26cdce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -129,7 +129,7 @@ test = [ "certifi", "coverage!=6.3", "psutil; sys_platform != 'cygwin'", - "pytest!=4.6.0,!=5.4.0,!=8.1.0,<9.1.0", + "pytest!=4.6.0,!=5.4.0,!=8.1.0", "pytest-cov", "pytest-rerunfailures!=16.0", "pytest-timeout",