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
0 answers

Permission Denied when running tox as Gitlab CI Job

I'm relatively new to Gitlab and Gitlab CI (actually with the whole CI thing), I have successfully setup my Gitlab Server and Gitlab CI Server both on the same machine (well due to lack spare servers, and pretty much because our team is still in…
cj cabero
  • 383
  • 10
  • 23
6
votes
2 answers

Set up multiple python installations on windows with tox

I am trying to set up tox on windows to run tests against multiple python installations. I have installed each python in folders named, C:\Python\PythonXX_YY, XX is the python version (e.g. 27) and YY is either 32 or 64. Currently, the only python…
aquavitae
  • 17,414
  • 11
  • 63
  • 106
5
votes
1 answer

How to test my python package using GItHub Actions?

I have a python package, and I am using poetry for dependency management and packaging. In my local environment, I am using tox to test the package in multiple python version. How can I use GitHub actions to test my package, everytime there is a…
aahnik
  • 1,661
  • 1
  • 11
  • 29
5
votes
4 answers

poetry dependencies not available when running script with tox

I have a python project that uses poetry and tox. It has source code, tests and scripts (juptext notebooks). I can't import the dev dependencies in the scripts, but I can in the tests. When I came across this problem, I created the following minimal…
joel
  • 6,359
  • 2
  • 30
  • 55
5
votes
1 answer

How does a tox environment set its sys.path

I have a Python project that requires some compilation. tox makes the sdist and the bdist_wheel successfully. But when tox runs the tests, the source code module is always the one that get imported, causing the tests to fail (because there are no…
drhagen
  • 8,331
  • 8
  • 53
  • 82
5
votes
1 answer

Tox not finding python3.6 even with the shim present. What is wrong with my pyenv setup?

Trying to breathe some life back into a django package that has fallen into a state of disrepair. They use tox for testing so I've setup pyenv on my MacBook. I've installed 3 versions of python as you can see below, and everything looks like it…
boatcoder
  • 17,525
  • 18
  • 114
  • 178
5
votes
1 answer

virtual env PYTHONPATH using tox

I have a tox.ini file [testenv:py27] deps= -r{toxinidir}/requirements.txt setenv = PYTHONPATH = {toxinidir}{:}{toxinidir}/helpers I ran the command tox and the virtualenv was created inside .tox/py27 When I activate the py27 environment cd…
Varunkumar Manohar
  • 887
  • 3
  • 11
  • 29
5
votes
2 answers

pytest-cov not working with tox

This is my tox.ini configuration [tox] envlist = py36 [testenv] commands = pytest -vv --pep8 --flakes \ --cov=quest --cov-report \ term-missing --profile {posargs} deps = -rrequirements.txt When I run tox, I get this error…
Hanxue
  • 12,243
  • 18
  • 88
  • 130
5
votes
2 answers

pyenv installs multiple pythons, but recognizes only some

I am trying to get pyenv up and running (Mac OS X), so I can use tox/detox to test code vs. multiple python environments. I was able to install multiple python3 versions, and then I used pyenv global on all the versions. After doing that, pyenv…
Geoffrey Sametz
  • 618
  • 1
  • 6
  • 17
5
votes
2 answers

Tox running command based on env variable

My current workflow is github PRs and Builds tested on Travis CI, with tox testing pytest and reporting coverage to codeclimate. travis.yml os: - linux sudo: false language: python python: - "3.3" - "3.4" - "3.5" - "pypy3" - "pypy3.3-5.2-alpha1" -…
iScrE4m
  • 882
  • 1
  • 12
  • 31
5
votes
1 answer

How can I prevent tox from producing a bunch of .egg directories?

Whenever I run tox, my repository's directory gets trashed with .egg directories. These are obviously the required dependencies for my library which needs to install in each of the virtual environments, but I don't want to see them. I'm not sure why…
joshvillbrandt
  • 143
  • 1
  • 6
5
votes
1 answer

How do you install pywin32 from a binary file in tox on Windows?

My application depends on pywin32 which I have installed in my system environment via Windows binary file. How do you install a module like pywin32 from a binary file in tox on Windows?
BP_
  • 2,497
  • 5
  • 18
  • 18
5
votes
3 answers

How to update setuptools on tox during travis build

I'm trying to develop a python program with a recent version of setuptools. But every time my build fails with the following message: $ tox -e $TOX_ENV GLOB sdist-make: /home/travis/build/kartoch/myapp/setup.py py26 create:…
Kartoch
  • 7,610
  • 9
  • 40
  • 68
5
votes
1 answer

How to I configure tox so it will run pytest coverage on a single environment instead of all?

I do have a complex tox.ini configuration with multiple environments for different versions of python. I would like to know how to tell tox to run coverage only on the default python interpretor. One of the problems is that the default python…
sorin
  • 161,544
  • 178
  • 535
  • 806
5
votes
1 answer

How to add a bootstrap script to tox's virtualenv?

I need psycopg2 and lxml for my tests, but when I try to install it in a virtualenv through tox it fails due to the missing pg_conf or other dependencies. I found this explanation of bootstrap scripts:…
Jon
  • 11,356
  • 5
  • 40
  • 74