git-stacktrace icon indicating copy to clipboard operation
git-stacktrace copied to clipboard

Improve the reliability of testing by reviewing tox configuration and adding more documentation

Open joshenders opened this issue 6 years ago • 0 comments

The README is currently a little light on details around testing. It recommends running tox in the base dir of the repo to initiate testing but this is currently unreliable/not working for me on several different systems due to various inconsistent errors.

As I'm new to tox, and there is no additional documentation, it's unclear to me if this is a tox issue or an issue with my development environment. It would be great if this could be documented a little more thoughtfully or if the configuration can be updated and tested on a few different platforms to improve reliability.

Here's one example error after installing tox with pip and running tox:

jenders@dev-jenders:~/src/git-stacktrace$ tox
GLOB sdist-make: /home/jenders/src/git-stacktrace/setup.py
py27 create: /home/jenders/src/git-stacktrace/.tox/py27
py27 installdeps: -r/home/jenders/src/git-stacktrace/test-requirements.txt
ERROR: invocation failed (exit code 1), logfile: /home/jenders/src/git-stacktrace/.tox/py27/log/py27-1.log
===================================================================================================================== log start =====================================================================================================================
Collecting testtools (from -r /home/jenders/src/git-stacktrace/test-requirements.txt (line 1))
  Using cached https://pypi-pim.pinadmin.com/packages/87/74/a4d55da28d7bba6d6f49430f22a62afd8472cb24a63fa61daef80d3e821b/testtools-2.3.0-py2.py3-none-any.whl
Collecting flake8 (from -r /home/jenders/src/git-stacktrace/test-requirements.txt (line 2))
  Using cached https://pypi-pim.pinadmin.com/packages/26/de/3f815a99d86eb10464ea7bd6059c0172c7ca97d4bdcfca41051b388a653b/flake8-3.7.8-py2.py3-none-any.whl
Collecting pytest (from -r /home/jenders/src/git-stacktrace/test-requirements.txt (line 3))
  Using cached https://pypi-pim.pinadmin.com/packages/e3/89/bdc4ee34896c03e1b42f80a5e1539443df4715f96d45cd7f4118b7c30229/pytest-5.2.0.tar.gz
  Running setup.py (path:/tmp/pip-build-cKHgML/pytest/setup.py) egg_info for package pytest produced metadata for project name unknown. Fix your #egg=pytest fragments.
Collecting python-subunit (from -r /home/jenders/src/git-stacktrace/test-requirements.txt (line 4))
  Using cached https://pypi-pim.pinadmin.com/packages/ee/3a/b8a93e1f5b9a9f7e0a7630146f1c62878b6949ac5e4bac6ae2ae13fa9f83/python_subunit-1.3.0-py2.py3-none-any.whl
Collecting fixtures (from -r /home/jenders/src/git-stacktrace/test-requirements.txt (line 5))
  Using cached https://pypi-pim.pinadmin.com/packages/a8/28/7eed6bf76792f418029a18d5b2ace87ce7562927cdd00f1cefe481cd148f/fixtures-3.0.0-py2.py3-none-any.whl
Collecting mock (from -r /home/jenders/src/git-stacktrace/test-requirements.txt (line 6))
  Using cached https://pypi-pim.pinadmin.com/packages/05/d2/f94e68be6b17f46d2c353564da56e6fb89ef09faeeff3313a046cb810ca9/mock-3.0.5-py2.py3-none-any.whl
Collecting sphinx (from -r /home/jenders/src/git-stacktrace/test-requirements.txt (line 7))
  Using cached https://pypi-pim.pinadmin.com/packages/76/42/a4465a0080e545cd152f7d3f16229d5e1300183fcb1067e4ec7e639b8605/Sphinx-2.2.0.tar.gz
    Complete output from command python setup.py egg_info:
    ERROR: Sphinx requires at least Python 3.5 to run.

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-cKHgML/sphinx/
You are using pip version 8.1.2, however version 19.2.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

====================================================================================================================== log end ======================================================================================================================
ERROR: could not install deps [-r/home/jenders/src/git-stacktrace/test-requirements.txt]; v = InvocationError(u'/home/jenders/src/git-stacktrace/.tox/py27/bin/pip install -U -r/home/jenders/src/git-stacktrace/test-requirements.txt', 1)
py36 create: /home/jenders/src/git-stacktrace/.tox/py36
ERROR: InterpreterNotFound: python3.6
flake8 create: /home/jenders/src/git-stacktrace/.tox/flake8
flake8 installdeps: -r/home/jenders/src/git-stacktrace/test-requirements.txt
ERROR: invocation failed (exit code 1), logfile: /home/jenders/src/git-stacktrace/.tox/flake8/log/flake8-1.log
===================================================================================================================== log start =====================================================================================================================
Collecting testtools (from -r /home/jenders/src/git-stacktrace/test-requirements.txt (line 1))
  Using cached https://pypi-pim.pinadmin.com/packages/87/74/a4d55da28d7bba6d6f49430f22a62afd8472cb24a63fa61daef80d3e821b/testtools-2.3.0-py2.py3-none-any.whl
Collecting flake8 (from -r /home/jenders/src/git-stacktrace/test-requirements.txt (line 2))
  Using cached https://pypi-pim.pinadmin.com/packages/26/de/3f815a99d86eb10464ea7bd6059c0172c7ca97d4bdcfca41051b388a653b/flake8-3.7.8-py2.py3-none-any.whl
Collecting pytest (from -r /home/jenders/src/git-stacktrace/test-requirements.txt (line 3))
  Using cached https://pypi-pim.pinadmin.com/packages/e3/89/bdc4ee34896c03e1b42f80a5e1539443df4715f96d45cd7f4118b7c30229/pytest-5.2.0.tar.gz
  Running setup.py (path:/tmp/pip-build-CKpwth/pytest/setup.py) egg_info for package pytest produced metadata for project name unknown. Fix your #egg=pytest fragments.
Collecting python-subunit (from -r /home/jenders/src/git-stacktrace/test-requirements.txt (line 4))
  Using cached https://pypi-pim.pinadmin.com/packages/ee/3a/b8a93e1f5b9a9f7e0a7630146f1c62878b6949ac5e4bac6ae2ae13fa9f83/python_subunit-1.3.0-py2.py3-none-any.whl
Collecting fixtures (from -r /home/jenders/src/git-stacktrace/test-requirements.txt (line 5))
  Using cached https://pypi-pim.pinadmin.com/packages/a8/28/7eed6bf76792f418029a18d5b2ace87ce7562927cdd00f1cefe481cd148f/fixtures-3.0.0-py2.py3-none-any.whl
Collecting mock (from -r /home/jenders/src/git-stacktrace/test-requirements.txt (line 6))
  Using cached https://pypi-pim.pinadmin.com/packages/05/d2/f94e68be6b17f46d2c353564da56e6fb89ef09faeeff3313a046cb810ca9/mock-3.0.5-py2.py3-none-any.whl
Collecting sphinx (from -r /home/jenders/src/git-stacktrace/test-requirements.txt (line 7))
  Using cached https://pypi-pim.pinadmin.com/packages/76/42/a4465a0080e545cd152f7d3f16229d5e1300183fcb1067e4ec7e639b8605/Sphinx-2.2.0.tar.gz
    Complete output from command python setup.py egg_info:
    ERROR: Sphinx requires at least Python 3.5 to run.

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-CKpwth/sphinx/
You are using pip version 8.1.2, however version 19.2.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

====================================================================================================================== log end ======================================================================================================================
ERROR: could not install deps [-r/home/jenders/src/git-stacktrace/test-requirements.txt]; v = InvocationError(u'/home/jenders/src/git-stacktrace/.tox/flake8/bin/pip install -U -r/home/jenders/src/git-stacktrace/test-requirements.txt', 1)
docs create: /home/jenders/src/git-stacktrace/.tox/docs
docs installdeps: -r/home/jenders/src/git-stacktrace/test-requirements.txt
ERROR: invocation failed (exit code 1), logfile: /home/jenders/src/git-stacktrace/.tox/docs/log/docs-1.log
===================================================================================================================== log start =====================================================================================================================
Collecting testtools (from -r /home/jenders/src/git-stacktrace/test-requirements.txt (line 1))
  Using cached https://pypi-pim.pinadmin.com/packages/87/74/a4d55da28d7bba6d6f49430f22a62afd8472cb24a63fa61daef80d3e821b/testtools-2.3.0-py2.py3-none-any.whl
Collecting flake8 (from -r /home/jenders/src/git-stacktrace/test-requirements.txt (line 2))
  Using cached https://pypi-pim.pinadmin.com/packages/26/de/3f815a99d86eb10464ea7bd6059c0172c7ca97d4bdcfca41051b388a653b/flake8-3.7.8-py2.py3-none-any.whl
Collecting pytest (from -r /home/jenders/src/git-stacktrace/test-requirements.txt (line 3))
  Using cached https://pypi-pim.pinadmin.com/packages/e3/89/bdc4ee34896c03e1b42f80a5e1539443df4715f96d45cd7f4118b7c30229/pytest-5.2.0.tar.gz
  Running setup.py (path:/tmp/pip-build-8J4LSc/pytest/setup.py) egg_info for package pytest produced metadata for project name unknown. Fix your #egg=pytest fragments.
Collecting python-subunit (from -r /home/jenders/src/git-stacktrace/test-requirements.txt (line 4))
  Using cached https://pypi-pim.pinadmin.com/packages/ee/3a/b8a93e1f5b9a9f7e0a7630146f1c62878b6949ac5e4bac6ae2ae13fa9f83/python_subunit-1.3.0-py2.py3-none-any.whl
Collecting fixtures (from -r /home/jenders/src/git-stacktrace/test-requirements.txt (line 5))
  Using cached https://pypi-pim.pinadmin.com/packages/a8/28/7eed6bf76792f418029a18d5b2ace87ce7562927cdd00f1cefe481cd148f/fixtures-3.0.0-py2.py3-none-any.whl
Collecting mock (from -r /home/jenders/src/git-stacktrace/test-requirements.txt (line 6))
  Using cached https://pypi-pim.pinadmin.com/packages/05/d2/f94e68be6b17f46d2c353564da56e6fb89ef09faeeff3313a046cb810ca9/mock-3.0.5-py2.py3-none-any.whl
Collecting sphinx (from -r /home/jenders/src/git-stacktrace/test-requirements.txt (line 7))
  Using cached https://pypi-pim.pinadmin.com/packages/76/42/a4465a0080e545cd152f7d3f16229d5e1300183fcb1067e4ec7e639b8605/Sphinx-2.2.0.tar.gz
    Complete output from command python setup.py egg_info:
    ERROR: Sphinx requires at least Python 3.5 to run.

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-8J4LSc/sphinx/
You are using pip version 8.1.2, however version 19.2.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

====================================================================================================================== log end ======================================================================================================================
ERROR: could not install deps [-r/home/jenders/src/git-stacktrace/test-requirements.txt]; v = InvocationError(u'/home/jenders/src/git-stacktrace/.tox/docs/bin/pip install -U -r/home/jenders/src/git-stacktrace/test-requirements.txt', 1)
______________________________________________________________________________________________________________________ summary ______________________________________________________________________________________________________________________
ERROR:   py27: could not install deps [-r/home/jenders/src/git-stacktrace/test-requirements.txt]; v = InvocationError(u'/home/jenders/src/git-stacktrace/.tox/py27/bin/pip install -U -r/home/jenders/src/git-stacktrace/test-requirements.txt', 1)
ERROR:  py36: InterpreterNotFound: python3.6
ERROR:   flake8: could not install deps [-r/home/jenders/src/git-stacktrace/test-requirements.txt]; v = InvocationError(u'/home/jenders/src/git-stacktrace/.tox/flake8/bin/pip install -U -r/home/jenders/src/git-stacktrace/test-requirements.txt', 1)
ERROR:   docs: could not install deps [-r/home/jenders/src/git-stacktrace/test-requirements.txt]; v = InvocationError(u'/home/jenders/src/git-stacktrace/.tox/docs/bin/pip install -U -r/home/jenders/src/git-stacktrace/test-requirements.txt', 1)

joshenders avatar Oct 03 '19 20:10 joshenders