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
0
votes
1 answer

Tox Invocation Error while trying to run command 'sudo tox'

While working in an virtualenv [3.4] I was trying to run tox for running the tests when I got the error: py34 develop-inst-nodeps: /home/horcrux/dir-sub/dir py34 runtests: commands[0] | python -m nose2…
horcrux
  • 11
  • 1
  • 2
0
votes
1 answer

Project structure. Scientific Python projects

I am looking for a better way to structure my research projects. I have the following setup: There are projects a,b,c and a library lib. Each project tackles a different research question and the library carries code that is used across projects.…
bjonen
  • 1,503
  • 16
  • 24
0
votes
1 answer

Tox: cannot invoke Jython and PyPy through tox

I try to invoke Python2.7, PyPy and Jython through a tox test. The tests work perfectly with Python 2.7, however, it always raises an Import- or AssertationError for PyPy and Jython. I found a similiar error report here which states that the…
Jon
  • 11,356
  • 5
  • 40
  • 74
0
votes
3 answers

Using python tox in a continous integration solution without installing tox as root?

I do like self contained solutions and being able to run the unittests without having to install anything on the machine. This would allow me to test the python packages on several machines without having to prepare them for this. Is it possible…
sorin
  • 161,544
  • 178
  • 535
  • 806
0
votes
2 answers

Python tox error "plugin already registered"

I'm trying to run a test-suite with tox for some work I'm doing on the jedi autocomplete library and I'm getting the following: ValueError: Plugin already registered: /home/aldo/Documents/Projects/jedi/test/conftest.py=
Aldo Stracquadanio
  • 6,167
  • 1
  • 23
  • 34
-1
votes
1 answer

ImportError: cannot import name 'global_sdk_config' from 'aws_xray_sdk'

Through Tox i am trying to run a unit test in my local. The test seems to fail, giving me the following error: from aws_xray_sdk import global_sdk_config E ImportError: cannot import name 'global_sdk_config' from 'aws_xray_sdk' Looking at…
Noor
  • 126
  • 2
  • 8
-1
votes
2 answers

Tox InvocationError (exited with code 1) when running pytest

I am using Python 3.7.4, pytest 6.2.5, tox 3.24.4. Is it an expected behavior that pytest failure will cause tox command (wrap around the pytest) exited with code 1? Appreciate your insights. Command as follows indicated in Jenkins console…
CarolL
  • 59
  • 2
  • 8
-1
votes
1 answer

Flask app ignores code for a cURL request due to a sys arg param but nothing is passed in sys arg

I have a small flask app that has the code below. Please note that I have removed a great deal of code to simply my question. If anything needed re-adding or missing, let me know. 1 @app.route("/app/data/", methods=['POST']) 2 def…
Saffik
  • 911
  • 4
  • 19
  • 45
-1
votes
1 answer

tox throws and error when running nosetest command

I created this tox.ini file: [tox] envlist = py37 [testenv] commands = /bin/sh nosetests config_test.test_config_sdk:test_bucket_existing It throws this error: $ tox GLOB sdist-make: /Users/me/git/config-test/setup.py py37 create:…
runnerpaul
  • 5,942
  • 8
  • 49
  • 118
-1
votes
1 answer

Can I make tox fail when there are TODOs in the code?

Currently, I run grep -rnI "TODO" foodir and tox to check if I can commit. Is there a way to make tox fail if the grep returns something?
Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
-1
votes
1 answer

Platform specific settings in tox

I would like to specify a few additional settings in my tox configuration, but only when I'm running on a certain platform. For example, when running on windows I want an extra environment variable to be defined. I would like to do something like…
Ben Randall
  • 1,205
  • 10
  • 27
-1
votes
1 answer

Testing a 2.7-friendly Python package with one 3.x feature

I've got an intellectual quandary that I would appreciate help with. The first two sections below give some preamble; the third contains the questions. I'm open to answers to my original question and suggestions on how to do it…
ABach
  • 3,743
  • 5
  • 25
  • 33
-2
votes
1 answer

Tox can not find python interpreter

I just installed pyenv. After that I installed python 3.8.0 in the system So I have pyenv versions system * 3.8.0 (set by /home/me/.pyenv/version) I have the tox.ini [tox] envlist = py36,py38 skipsdist = True [testenv] # instsall pytest in the…
KansaiRobot
  • 7,564
  • 11
  • 71
  • 150
-2
votes
1 answer

Tox.ini does not recognize python folder?

I ran into weird issue which I have trouble solving. I have following tox.ini file: [vars] PROJECT = django_project TASKS = tasks --exclude tasks/migrations PAGES = pages -exclude pages/migrations [tox] envlist = py310, flake8, black,…
J. Donič
  • 131
  • 7
-2
votes
1 answer

How to configure tox to access environment variables?

I am using tox to run pytest. Pytest runs test cases that tests API endpoints that required crednetials. I do not want to save my credentials in the code and set is as an environment variable in azure pipelines which will then call tox to run…
Baenka
  • 243
  • 3
  • 15
1 2 3
35
36