Questions tagged [tox]

tox is a generic virtualenv management and test running tool.

tox is a generic virtualenv management and test command line tool you can use for:

  • checking your package installs correctly with different Python versions and interpreters running your tests in each of the environments,
  • configuring your test tool of choice
  • acting as a frontend to Continuous Integration servers, greatly reducing boilerplate and merging CI and shell-based testing

Resources:

529 questions
6
votes
1 answer

Is it not redundant to run tox if you are using GitHub actions' matrix strategy?

With GitHub actions matrix strategy you can specify which versions of python (for example) you want your code to run on, so is there any need to run tox in a GitHub actions workflow? Is there anything tox offers that the gh-actions matrix strategy…
ben stear
  • 105
  • 1
  • 5
6
votes
1 answer

Virtual environment created with tox failed to use pip install

Thanks in advance, if any help. background os: osx 10.15.3 (19D76) python: /usr/local/Cellar/python@2/2.7.16_1/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python tox: 3.14.5 imported from…
xiaojueguan
  • 870
  • 10
  • 19
6
votes
1 answer

How do I configure tox so it produces a wheel?

According to the docs, tox creates "a source distribution of the current project by invoking python setup.py sdist". How do I configure tox so it produces a wheel instead and then uses it for testing?: python setup.py bdist_wheel --universal
Pablo
  • 983
  • 10
  • 24
6
votes
0 answers

Why wouldn't the tox see the environment variable during install_command?

Given the tox==3.13.2, see details ++pip install tox Requirement already satisfied: tox in /home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages (3.13.2) and the tox.ini: [tox] envlist = py-cythonized [testenv] ; simplify numpy…
alvas
  • 115,346
  • 109
  • 446
  • 738
6
votes
1 answer

how to require a specific package version in tox?

In my tox.ini file, the dependencies are installed via the requirements.txt file which is also used by setup.py, as follows: The requirements.txt file contains the acceptable range of django packages, depending on the python version installed, as…
singuliere
  • 767
  • 10
  • 19
6
votes
1 answer

How can I install extras with `pip install git+ssh`?

I have an internal Python package which I install for tox with pip install git+ssh://git@bitbucket.org/org/repo.git This works. What does not work is to install the extra server. What I tried pip install…
Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
6
votes
2 answers

Change tox workdir

Looking on the tox global settings section from tox documentation, the .tox directory which is working dir, is created in directory where tox.ini is located: toxworkdir={toxinidir}/.tox(PATH) Directory for tox to generate its environments into,…
brxie
  • 107
  • 1
  • 7
6
votes
1 answer

How to minimize repetition in tox file

Goal: Successfully execute specific tox commands, and have it run for "just" that specific matched command. Example: tox -e py35-integration tox should run only for py35-integration and not including the default or standalone py35 definition. I…
idjaw
  • 25,487
  • 7
  • 64
  • 83
6
votes
2 answers

Tox and lib and lib64 and site-packages

I'm using tox and coverage.py to run tests of my Python project in my continuous build server. I also have a package pkg_x from a vendor (not available on PyPI) that I've installed using python3.5 setup.py install, which puts it in…
Ken Williams
  • 22,756
  • 10
  • 85
  • 147
6
votes
3 answers

tox can't detect python interpreter in D:\python27 path

My tox.ini file looks like this [tox] envlist=py27 [testenv] deps= pytest This fails to find my base python installation which is at D:\python27 and not the standard c:\python27 location If I change tox.ini to this, it works but looks…
user330612
  • 2,189
  • 7
  • 33
  • 64
6
votes
2 answers

How to show full Python Traceback with Tox/Py.test

I'm using tox and py.test to run my Python unittests, and even though I'm using py.test's --tb=long option, errors are showing like: E ConftestImportFailure: (local('/myproject/tests/functional_tests/conftest.py'), (
Cerin
  • 60,957
  • 96
  • 316
  • 522
6
votes
1 answer

Missing conf file for sphinx command

I am running into problem when I am running tox command to generate Sphinx documentation for my Python project. Here is the error: docs runtests: PYTHONHASHSEED='1181019260' docs runtests: commands[0] | sphinx-build -W -b html -c ./conf.py -d…
Kumari Sweta
  • 271
  • 1
  • 5
  • 16
6
votes
1 answer

What should a Python project structure look like for Travis CI to find and run tests?

I currently have a project with the following .travis.yml file: language: python install: "pip install tox" script: "tox" Locally, tox properly executes and runs 35 tests, but on Travis CI, it runs 0 tests. More details:…
neverendingqs
  • 4,006
  • 3
  • 29
  • 57
6
votes
1 answer

Specifying exact Python version for Travis CI in combination with tox

I have the following .travis.yml: language: python env: - TOXENV=py27 - TOXENV=py34 install: - pip install -U tox script: - tox and the following tox.ini: [tox] envlist = py27,py34 [testenv] commands = py.test tests/ deps =…
S.G
  • 163
  • 8
6
votes
4 answers

how to configure tox for getting the logs

I am trying to use tox automating testing in my project. But I am not able to figure out where the logs or prints from my test_methods in python file goes while using tox. I also grepped the entire tox directory for logs but couldn't find it.…
Knight71
  • 2,927
  • 5
  • 37
  • 63