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
4
votes
2 answers

Linking error: "relocation R_X86_64_32 ... can not be used when making a shared object; recompile with -fPIC"

I am attempting to compile Tox (specifically toxcore). When I attempt to compile it, I encounter the following error: >make make all-recursive make[1]: Entering directory '/root/Tox/toxcore' Making all in build make[2]: Entering directory…
d3pd
  • 7,935
  • 24
  • 76
  • 127
4
votes
1 answer

tox fails to install pyYaml on windows

My tox.ini file looks like this on windows [tox] envlist = cpy27,dpy27 skip_missing_interpreters = True [testenv] basepython = cpy27: C:\Python27\python.exe dpy27: D:\Python27\python.exe deps = pytest commands = py.test tests But…
user330612
  • 2,189
  • 7
  • 33
  • 64
4
votes
1 answer

Installing extra_requires with tox

If I want to install extra requirements for the package being tested with Tox who would I do it? E.g. If I am testing a package called Websauna and I want to instal websauna[test] Instead of websauna
Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435
4
votes
2 answers

How to run different tox command inside Jenkins environment?

I would like to use different command line arguments for py.test, depending on environment: running locally there should be only default ones, but on Jenkins I would like to add --junitxml=junit-{envname}.xml, so the test results could be published…
grundic
  • 4,641
  • 3
  • 31
  • 47
4
votes
2 answers

Python tox dependencies installation output

Is it possibile with tox to avoid the redirect of the output to a file when installing dependencies with pip? I want to see what's being installed so I would like to log to stdout instead of a file.
se7entyse7en
  • 4,310
  • 7
  • 33
  • 50
4
votes
3 answers

Install-time dependencies in requirements.txt

I'm using tox to prepare venv and run unit tests and my application needs openopt library which in turn imports numpy.distutils.core in its setup.py. No matter how I order numpy and openopt in my requirements.txt I can't ensure numpy is installed…
Chulup
  • 460
  • 6
  • 10
4
votes
1 answer

Testing python project with Tox and Teamcity

I have project with very simple configuration matrix, described in tox: py{27,35}-django{18,19} I'm using TeamCity as the CI-server, run tests with py.test with installed teamcity-messages. I've tried to run every configuration like tox -e…
prokaktus
  • 582
  • 5
  • 12
4
votes
1 answer

tox Invocation failed for Python 3

tox runs my Python 2.7 tests, but fails for Python 3.4. It gives an "Invocation failed" message. Excerpts: py34 create: /home/josh/code/ezoutlet/.tox/py34 ERROR: invocation failed (exit code 1), logfile:…
jtpereyda
  • 6,987
  • 10
  • 51
  • 80
4
votes
2 answers

How can I add to $PATH with tox?

I'm using tox to run protractor tests which will test an application which uses django+angularjs, there is a glue library (django-protractor) which makes this easier, except that it makes the call to protractor inside a django management command,…
Lefunque
  • 468
  • 5
  • 16
4
votes
1 answer

Environment variable

I have a tox.ini file like this: [tox] envlist = {py27,py34} [testenv] setenv = PYTHONDONTWRITEBYTECODE=1 deps = -r{toxinidir}/requirements-test.txt commands = nosetests -v --stop --with-coverage --cover-package=project So, I need…
4
votes
1 answer

why can't my virtualenv find distutils.sysconfig?

I've just forked a Python project that was built with test driven development. I certainly see its value and I'm looking forward to making further use out of it. I've installed all the required Python interpreters (see tox.ini) using pyenv. Running…
wxl
  • 246
  • 3
  • 10
3
votes
1 answer

Is there a framework that can be used to test Python modules against several versions of Python?

I there a framework that can be used to run Python unit tests on all installed versions of python? I have 3 versions of python installed on my system and I want to be able to run the unitests on all of them. The executables are using the "usual"…
sorin
  • 161,544
  • 178
  • 535
  • 806
3
votes
1 answer

Why do the PySide6 Qt modules cause Tox to fail during a GitHub Action?

I have a python project that I am trying to test with Tox in GitHub Actions. Unfortunately the package PySide6 and its Qt modules causes Tox to fail when I have any python file that has any kind of import such as the following: from…
bitclip
  • 187
  • 7
3
votes
0 answers

Debug tox unit tests with visual studio code

I am trying to debug an existing set of unit tests that are run with tox. I updated my launch.json file to include the following configuration: { "module": "tox", "name": "tox unit tests", "request": "launch", "type": "python", …
John
  • 65
  • 6
3
votes
2 answers

how to substitute tox environment dependencies with considering the Python version?

Suppose that we have two tox environment collections {py37,py38}-develop and {py37,py38}-test. The develop environments dependencies include the corresponding test environment dependencies (for simplicity, additional dependencies and configurations…
Alireza Roshanzamir
  • 1,165
  • 6
  • 17