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

[BUG] Upgrading to pytest 7.1.2 breaks plugin #106

Open
tahoeschrader opened this issue Aug 31, 2022 · 0 comments
Open

[BUG] Upgrading to pytest 7.1.2 breaks plugin #106

tahoeschrader opened this issue Aug 31, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@tahoeschrader
Copy link
Contributor


name: Upgrading to pytest 7.1.2 breaks plugin
about: Create a report to help us improve
title: "[BUG] Upgrading to pytest 7.1.2 breaks plugin"
labels: bug
assignees:

Describe the bug

INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "<repo-path>/.venv/lib/python3.10/site-packages/_pytest/main.py", line 264, in wrap_session
INTERNALERROR>     config._do_configure()
INTERNALERROR>   File "<repo-path>/.venv/lib/python3.10/site-packages/_pytest/config/__init__.py", line 995, in _do_configure
INTERNALERROR>     self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
INTERNALERROR>   File "<repo-path>/.venv/lib/python3.10/site-packages/pluggy/_hooks.py", line 277, in call_historic
INTERNALERROR>     res = self._hookexec(self.name, self.get_hookimpls(), kwargs, False)
INTERNALERROR>   File "<repo-path>/.venv/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "<repo-path>/.venv/lib/python3.10/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "<repo-path>/.venv/lib/python3.10/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "<repo-path>/.venv/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "<repo-path>/.venv/lib/python3.10/site-packages/snappiershot/plugins/pytest.py", line 71, in pytest_configure
INTERNALERROR>     setattr(config.option, PACKAGE_TRACKER_OPTION, SnapshotTracker(*test_paths))
INTERNALERROR>   File "<repo-path>/.venv/lib/python3.10/site-packages/snappiershot/plugins/pytest.py", line 60, in <genexpr>
INTERNALERROR>     test_paths = (Path(path).resolve().relative_to(root_dir) for path in config.args)
INTERNALERROR>   File "<user>/.pyenv/versions/3.10.0/lib/python3.10/pathlib.py", line 816, in relative_to
INTERNALERROR>     raise ValueError("{!r} is not in the subpath of {!r}"
INTERNALERROR> ValueError: '<repo-path>' is not in the subpath of '<repo-path>/testing_framework' OR one path is relative and the other is absolute.

To Reproduce
change pytest in pyproject.toml to pytest = "^7.1.2". run any test.

Expected behavior
Not error out, which is what happens with pytest 6.2.5

Screenshots
N/A

Versions:

  • Python version: 3.10.0
  • Snappiershot version: 1.1.0

Additional context
N/A

@tahoeschrader tahoeschrader added the bug Something isn't working label Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant