Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with pytest 7.0 #352

Closed
derfred opened this issue Feb 9, 2022 · 1 comment · Fixed by #354
Closed

Compatibility with pytest 7.0 #352

derfred opened this issue Feb 9, 2022 · 1 comment · Fixed by #354

Comments

@derfred
Copy link
Contributor

derfred commented Feb 9, 2022

What action do you want to perform

I upgraded pytest to 7.0

What are the results

There's a ImportError regarding TempdirFactory which was removed in 7.0

Traceback (most recent call last):

  ....


  File "/usr/local/lib/python3.9/site-packages/pytest_mysql/plugin.py", line 21, in <module>
    from pytest_mysql import factories
  File "/usr/local/lib/python3.9/site-packages/_pytest/assertion/rewrite.py", line 171, in exec_module
    exec(co, module.__dict__)
  File "/usr/local/lib/python3.9/site-packages/pytest_mysql/factories/__init__.py", line 3, in <module>
    from pytest_mysql.factories.process import mysql_proc
  File "/usr/local/lib/python3.9/site-packages/_pytest/assertion/rewrite.py", line 171, in exec_module
    exec(co, module.__dict__)
  File "/usr/local/lib/python3.9/site-packages/pytest_mysql/factories/process.py", line 25, in <module>
    from _pytest.tmpdir import TempdirFactory
ImportError: cannot import name 'TempdirFactory' from '_pytest.tmpdir' (/usr/local/lib/python3.9/site-packages/_pytest/tmpdir.py)

What are the expected results

No error

@fizyk
Copy link
Member

fizyk commented Feb 9, 2022

the tmpdir_factory fixture with tmp_path_factory fixture.

The minimum supported pytest version should then be set to 6.2
ref: ClearcodeHQ/pytest-postgresql#533

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants