You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The tmpdir and tmpdir_factory fixtures are similar to tmp_path and tmp_path_factory, but use/return legacy py.path.local objects rather than standard pathlib.Path objects.
Note
These days, it is preferred to use tmp_path and tmp_path_factory.
In order to help modernize old code bases, one can run pytest with the legacypath plugin disabled:
pytest -p no:legacypath
This will trigger errors on tests using the legacy paths. It can also be permanently set as part of the addopts parameter in the config file.
While this should be a small internal change, it seems like still using tmpdir is keeping projects that use pytest-mpl form using the legacypath plugin to do validation (c.f. scikit-hep/pyhf#2384 (comment)).
The text was updated successfully, but these errors were encountered:
Nothing breaks yet, but
pytest
now uses thetmp_path
andtmp_path_factory
fixtures over the (now "legacy")tmpdir
andtmpdir_factory
fixtures.From the pytest docs (https://docs.pytest.org/en/7.4.x/how-to/tmp_path.html#the-tmpdir-and-tmpdir-factory-fixtures):
While this should be a small internal change, it seems like still using
tmpdir
is keeping projects that usepytest-mpl
form using thelegacypath
plugin to do validation (c.f. scikit-hep/pyhf#2384 (comment)).The text was updated successfully, but these errors were encountered: