Skip to content

Supporting pytest 8 #4

@pengyunie

Description

@pengyunie

Got this error when running pytest-inline tests, probably due to an API change of _pytest.import_path from pytest 7 to 8.

(inline-dev) pynie@PRODIGY-T16Gen2:~/projects/pytest-inline$ pytest
============================================================================================= test session starts ==============================================================================================
platform linux -- Python 3.9.0, pytest-8.3.3, pluggy-1.5.0
rootdir: /home/pynie/projects/pytest-inline
configfile: pytest.ini
testpaths: tests
plugins: inline-1.0.5
collected 44 items / 2 errors

==================================================================================================== ERRORS ====================================================================================================
______________________________________________________________________________________ ERROR collecting tests/__init__.py ______________________________________________________________________________________
../../opt/miniconda3/envs/inline-dev/lib/python3.9/site-packages/inline/plugin.py:1397: in collect
    module = import_path(self.path, root=self.config.rootpath)
E   TypeError: import_path() missing 1 required keyword-only argument: 'consider_namespace_packages'
____________________________________________________________________________________ ERROR collecting tests/test_plugin.py _____________________________________________________________________________________
../../opt/miniconda3/envs/inline-dev/lib/python3.9/site-packages/inline/plugin.py:1397: in collect
    module = import_path(self.path, root=self.config.rootpath)
E   TypeError: import_path() missing 1 required keyword-only argument: 'consider_namespace_packages'
=========================================================================================== short test summary info ============================================================================================
ERROR tests/__init__.py - TypeError: import_path() missing 1 required keyword-only argument: 'consider_namespace_packages'
ERROR tests/test_plugin.py - TypeError: import_path() missing 1 required keyword-only argument: 'consider_namespace_packages'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================================================== 2 errors in 0.11s ===============================================================================================

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions