550 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
Advice
0
votes
2
replies
53
views
How to port tox legacy-ini with factors to native toml?
I have a project with tox configuration for testing, with different versions of Python and Django. With the move from tox 3 to tox 4, I included the configuration as a legacy ini in my pyproject.toml ,...
1
vote
1
answer
146
views
AttributeError: module 'py' has no attribute 'io' for tox for python
AttributeError: module 'py' has no attribute 'io'
Steps:
clone Pytest
git clone https://github.com/pytest-dev/pytest.git
Run tox:
tox
Result:
AttributeError: module 'py' has no attribute 'io'
...
Irina's user avatar
- 1,419
0
votes
0
answers
138
views
Why does my Python test run fail when invoked via Tox, despite running just fine when invoked manually?
When I invoke my Python package testing in the usual way, via Tox, it's failing:
$ python -I -m tox run -e py310-lin
py310-lin: install_deps> python -I -m pip install pytest pytest-cov pytest-xdist ...
0
votes
0
answers
150
views
Proper way of building a package with tox
I'm using tox and wonder what is the intended way to build my package for distribution. I see that tox is building the package as part of the normal execution. It even provides a dedicated pkgenv ...
0
votes
0
answers
124
views
tox is not installing build requirements
I am trying to use tox with a project where some of the requirements need torch to be installed before their installation. To solve this, I tried adding torch as a build requirement.
A simplified ...
0
votes
0
answers
89
views
errors finding package when using tox for testing with cython extensions
I am using cython to build a module for a library. When I install the package locally, i.e., pip install . I can perfectly import and run the module, however I cannot do that in tox environments.
...
0
votes
1
answer
49
views
unable to set SPARK_HOME in tox.ini
Pyspark is installed using pip install in a virtual environment.
On the basis of the tox documentation, setenv is placed under the `[testenv]' section.
Here is the code that I got in the tox.ini file
...
-1
votes
1
answer
84
views
How tox create a fresh environments
Here is my workflow:
I have a requirements.txt file that includes tox and many other packages.
Run:
python3 -m venv global_env
source global_env/bin/activate
pip install -r requirements
I ...
0
votes
1
answer
64
views
Pytest in Tox - can't find tests, `ImportError`
I have a package with the current structure:
my_package
|- pyproject.toml
|- poetry.lock
|- tox.ini
|- my_package
| |- __init__.py
| |- my_package.py
|- tests
|- ...
1
vote
0
answers
121
views
Why Tox won't work in pycharm run/debug but works in terminal
I have an issue with pycharm and tox. When im running tox thru pycharm terminal by 'tox', all tests are start running but if i want to use ctrl+shift+R(run button in pycharm), i have an error:
...
0
votes
1
answer
232
views
no-data-collected when running tests with tox but not when running tests with pytest
I'm using tox to run unit tests with pytest. When I run the tests with tox, it runs the tests and shows the tree of my src directory but prints CoverageWarning: No data was collected. (no-data-...
0
votes
1
answer
428
views
HDF Error when reading a NetCDF file as part of tests
My code saves and analyzes data in NetCDF4 format. I have no problem whatsoever with the analysis.
However, when I run unit tests in tox I get a ton of HDF and OS errors, e.g.:
https://github.com/...
1
vote
1
answer
177
views
Tox with pyspark
We implemented unit tests for the Pyspark scenarios. But as tox creates the runtime environment and installs the required packages, every time I run tox, it has to install pyspark which takes around 3 ...
1
vote
0
answers
96
views
tox cannot find module
I am trying to run tox on a module.
Consider the following python package:
foo
├── tox.ini
├── setup.cfg
│ tests
│ └── test_bar.py
└── src
├── data
│ └── data.csv
├── __init__.py
...
0
votes
1
answer
1k
views
Pytest reports missing lines in coverage for imports and constant assignments
I'm baffled by differences in coverage behavior for different files in my project and hope someone will please suggest how to debug this more effectively than I am doing now. This is basically the ...