How to import all the environment variables in tox

You can use passenv. If you pass the catch all wildcard * you have access to all environment variables from the parent environment: passenv=SPACE-SEPARATED-GLOBNAMES New in version 2.0. A list of wildcard environment variable names which shall be copied from the tox invocation environment to the test environment when executing test commands. If a specified … Read more

How to run only one test in tox?

As written by jason meridth: $ tox -e py35 — project/tests/test_file.py::TestClassName::test_method But the fine grain is mentioned by beluga.me in the comments: If you have a tox.ini file you might need to add the {posargs} to pytest in tox.ini: [tox] envlist = py35 [testenv] deps = pytest pytest-cov pytest-pep8 commands = pip install -e . … Read more

pip install test dependencies for tox from setup.py

I’ve achieved this by committing a slight abuse of extra requirements. You were almost there trying the extras syntax, just that tests_require deps aren’t automatically available that way. With a setup.py like this: from setuptools import setup test_deps = [ ‘coverage’, ‘pytest’, ] extras = { ‘test’: test_deps, } setup( # Other metadata… tests_require=test_deps, extras_require=extras, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)