Skip to content

Commit f68c737

Browse files
authored
Fix compatibility with pytest 8 (#14413)
setup/teardown nose methods are no longer supported by pytest 8. https://docs.pytest.org/en/latest/deprecations.html#setup-teardown
2 parents f476dd7 + cdacafd commit f68c737

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

IPython/core/tests/test_pylabtools.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def init_history(self):
165165
def enable_gui(self, gui):
166166
pass
167167

168-
def setup(self):
168+
def setup_method(self):
169169
import matplotlib
170170
def act_mpl(backend):
171171
matplotlib.rcParams['backend'] = backend
@@ -184,7 +184,7 @@ def act_mpl(backend):
184184
self._save_cis = backend_inline.configure_inline_support
185185
backend_inline.configure_inline_support = lambda *a, **kw: None
186186

187-
def teardown(self):
187+
def teardown_method(self):
188188
pt.activate_matplotlib = self._save_am
189189
pt.import_pylab = self._save_ip
190190
backend_inline.configure_inline_support = self._save_cis

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ qtconsole = [
9494
]
9595
terminal = []
9696
test = [
97-
"pytest<8",
97+
"pytest",
9898
"pytest-asyncio<0.22",
9999
"testpath",
100100
"pickleshare",

0 commit comments

Comments
 (0)