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
I'm using tox specifically so that I can catch errors that pytest would otherwise miss. For example, if I add a package resource to my files and include a unit test that loads that resource, pytest will think everything is fine. Noticing that my package doesn't load because I failed to include the new resource in package data happens only later, when I try to install the package in a new environment using the whl.
I've found that running tox with this configuration works as desired, raising an error where I try to load a package resource that was not added to package data:
[tox]
isolated_build=True
[testenv]
description = Run unit tests
deps =
pytest
dependency_groups = extras
changedir = {envtmpdir} # suggested by https://blog.ganssle.io/articles/2019/08/test-as-installed.html
commands = python -m pytest {posargs} {toxinidir}
However, deleting
deps =
pytest
and replacing it with
runner = uv-venv-lock-runner
with_dev = true
puts me back where I started; tox runs without noticing the problem. Please let me know if it's obvious what's going on here -- if not I may follow up with a reproducable example.
Environment
OS: OSX 15.1.1
The text was updated successfully, but these errors were encountered:
@zkurtz Feel free to make PR to fix it. Basically every option supported by Tox own venv implementation will need to be implemented by this as they do not magically work.
Issue
I'm using tox specifically so that I can catch errors that pytest would otherwise miss. For example, if I add a package resource to my files and include a unit test that loads that resource, pytest will think everything is fine. Noticing that my package doesn't load because I failed to include the new resource in package data happens only later, when I try to install the package in a new environment using the whl.
I've found that running tox with this configuration works as desired, raising an error where I try to load a package resource that was not added to package data:
However, deleting
and replacing it with
puts me back where I started; tox runs without noticing the problem. Please let me know if it's obvious what's going on here -- if not I may follow up with a reproducable example.
Environment
The text was updated successfully, but these errors were encountered: