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

Test suite failure: "Direct construction of SpecModule has been deprecated, please use SpecModule.from_parent." #29

Open
samuela opened this issue Mar 27, 2022 · 0 comments

Comments

@samuela
Copy link

samuela commented Mar 27, 2022

When running the test suite with inv test I'm getting the following error:

============================= test session starts ==============================
platform darwin -- Python 3.9.10, pytest-6.2.5, py-1.11.0, pluggy-1.0.0 -- /nix/store/mqdppmn4n37dkqwx71g88a8pa5h676gj-python3-3.9.10/bin/python3.9
cachedir: .pytest_cache
rootdir: /private/tmp/nix-build-python3.9-invocations-2.6.0.drv-0/source, configfile: pytest.ini, testpaths: tests
plugins: relaxed-1.1.5
collected 0 items / 1 error                                                    

==================================== ERRORS ====================================
________________________ ERROR collecting test session _________________________
Direct construction of SpecModule has been deprecated, please use SpecModule.from_parent.
See https://docs.pytest.org/en/stable/deprecations.html#node-construction-changed-to-node-from-parent for more details.
=============================== warnings summary ===============================
../../../../nix/store/mq15vnx91rm5vzdkf1qnixs5p9k5py2g-python3.9-pytest-6.2.5/lib/python3.9/site-packages/_pytest/assertion/rewrite.py:170
  /nix/store/mq15vnx91rm5vzdkf1qnixs5p9k5py2g-python3.9-pytest-6.2.5/lib/python3.9/site-packages/_pytest/assertion/rewrite.py:170: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
    exec(co, module.__dict__)

-- Docs: https://docs.pytest.org/en/stable/warnings.html
=========================== short test summary info ============================
ERROR 
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
========================= 1 warning, 1 error in 0.17s ==========================

What am I doing wrong? What versions of pytest are supported?

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

No branches or pull requests

1 participant