Issue #75 resolved

Failing tests on hg tip

Marc Abramowitz avatarMarc Abramowitz created an issue

A bunch of the failures are preceded by:

ERROR: InterpreterNotFound: python2.4

Is it because I don't have Python 2.4 installed? (a pain to build on recent versions of OS X)

marc@hyperion:~/dev/hg-repos/tox
16:58:14 $ tox -e py27
GLOB sdist-make: /Users/marc/dev/hg-repos/tox/setup.py
py27 sdist-reinst: /Users/marc/dev/hg-repos/tox/.tox/dist/tox-1.4.3.dev3.zip
py27 runtests: commands[0]
============================================================================= test session starts ==============================================================================
platform darwin -- Python 2.7.3 -- pytest-2.3.4
tox comes from: '/Users/marc/dev/hg-repos/tox/.tox/py27/lib/python2.7/site-packages/tox/__init__.pyc'
collected 133 items 

tests/test_config.py ........................F.....F.FFFFF......FF...F.FF...............
tests/test_quickstart.py .............
tests/test_venv.py .s............s..............
tests/test_z_cmdline.py ........................

=================================================================================== FAILURES ===================================================================================
______________________________________________________________ TestConfigTestEnv.test_specific_command_overrides _______________________________________________________________

self = <test_config.TestConfigTestEnv instance at 0x101812290>
tmpdir = local('/private/var/folders/EV/EVpZ2D-dFr0Q0VP8cVxFc++++TI/-Tmp-/pytest-8/test_specific_command_overrides0'), newconfig = <function newconfig at 0x1018106e0>

    def test_specific_command_overrides(self, tmpdir, newconfig):
        config = newconfig("""
                [testenv]
                commands=xyz
                [testenv:py30]
                commands=abc
            """)
>       assert len(config.envconfigs) == 1
E       assert 0 == 1
E        +  where 0 = len({})
E        +    where {} = <tox._config.Config instance at 0x101812320>.envconfigs

/Users/marc/dev/hg-repos/tox/tests/test_config.py:342: AssertionError
------------------------------------------------------------------------------- Captured stdout --------------------------------------------------------------------------------
ERROR: InterpreterNotFound: python3.0
________________________________________________________________________ TestConfigTestEnv.test_simple _________________________________________________________________________

tmpdir = <test_config.TestConfigTestEnv instance at 0x1015fe7e8>, newconfig = <function newconfig at 0x101810aa0>

    def test_simple(tmpdir, newconfig):
        config = newconfig("""
                [testenv:py24]
                basepython=python2.4
                [testenv:py25]
                basepython=python2.5
            """)
>       assert len(config.envconfigs) == 2
E       assert 0 == 2
E        +  where 0 = len({})
E        +    where {} = <tox._config.Config instance at 0x101cade18>.envconfigs

/Users/marc/dev/hg-repos/tox/tests/test_config.py:408: AssertionError
------------------------------------------------------------------------------- Captured stdout --------------------------------------------------------------------------------
ERROR: InterpreterNotFound: python2.4
_________________________________________________________________ TestConfigTestEnv.test_substitution_defaults _________________________________________________________________

tmpdir = <test_config.TestConfigTestEnv instance at 0x1018072d8>, newconfig = <function newconfig at 0x1018100c8>

    def test_substitution_defaults(tmpdir, newconfig):
        config = newconfig("""
                [testenv:py24]
                commands =
                    {toxinidir}
                    {toxworkdir}
                    {envdir}
                    {envbindir}
                    {envtmpdir}
                    {envpython}
                    {homedir}
                    {distshare}
                    {envlogdir}
            """)
>       conf = config.envconfigs['py24']
E       KeyError: 'py24'

/Users/marc/dev/hg-repos/tox/tests/test_config.py:432: KeyError
------------------------------------------------------------------------------- Captured stdout --------------------------------------------------------------------------------
ERROR: InterpreterNotFound: python2.4
________________________________________________________________ TestConfigTestEnv.test_substitution_positional ________________________________________________________________

self = <test_config.TestConfigTestEnv instance at 0x101817f38>, newconfig = <function newconfig at 0x101810500>

    def test_substitution_positional(self, newconfig):
        inisource = """
                [testenv:py24]
                commands =
                    cmd1 [hello] \
                         world
                    cmd1 {posargs:hello} \
                         world
            """
>       conf = newconfig([], inisource).envconfigs['py24']
E       KeyError: 'py24'

/Users/marc/dev/hg-repos/tox/tests/test_config.py:453: KeyError
------------------------------------------------------------------------------- Captured stdout --------------------------------------------------------------------------------
ERROR: InterpreterNotFound: python2.4
____________________________________________________________________ TestConfigTestEnv.test_rewrite_posargs ____________________________________________________________________

self = <test_config.TestConfigTestEnv instance at 0x101c708c0>, tmpdir = local('/private/var/folders/EV/EVpZ2D-dFr0Q0VP8cVxFc++++TI/-Tmp-/pytest-8/test_rewrite_posargs0')
newconfig = <function newconfig at 0x101810050>

    def test_rewrite_posargs(self, tmpdir, newconfig):
        inisource = """
                [testenv:py24]
                args_are_paths = True
                changedir = tests
                commands = cmd1 {posargs:hello}
            """
>       conf = newconfig([], inisource).envconfigs['py24']
E       KeyError: 'py24'

/Users/marc/dev/hg-repos/tox/tests/test_config.py:469: KeyError
------------------------------------------------------------------------------- Captured stdout --------------------------------------------------------------------------------
ERROR: InterpreterNotFound: python2.4
________________________________________________________________ TestConfigTestEnv.test_rewrite_simple_posargs _________________________________________________________________

self = <test_config.TestConfigTestEnv instance at 0x101c73560>
tmpdir = local('/private/var/folders/EV/EVpZ2D-dFr0Q0VP8cVxFc++++TI/-Tmp-/pytest-8/test_rewrite_simple_posargs0'), newconfig = <function newconfig at 0x1018280c8>

    def test_rewrite_simple_posargs(self, tmpdir, newconfig):
        inisource = """
                [testenv:py24]
                args_are_paths = True
                changedir = tests
                commands = cmd1 {posargs}
            """
>       conf = newconfig([], inisource).envconfigs['py24']
E       KeyError: 'py24'

/Users/marc/dev/hg-repos/tox/tests/test_config.py:489: KeyError
------------------------------------------------------------------------------- Captured stdout --------------------------------------------------------------------------------
ERROR: InterpreterNotFound: python2.4
_________________________________________________________ TestConfigTestEnv.test_take_dependencies_from_other_testenv __________________________________________________________

self = <test_config.TestConfigTestEnv instance at 0x1018210e0>, newconfig = <function newconfig at 0x101828398>

    def test_take_dependencies_from_other_testenv(self, newconfig):
        inisource="""
                [testenv]
                deps=
                    pytest
                    pytest-cov
                [testenv:py24]
                deps=
                    {[testenv]deps}
                    fun
            """
>       conf = newconfig([], inisource).envconfigs['py24']
E       KeyError: 'py24'

/Users/marc/dev/hg-repos/tox/tests/test_config.py:513: KeyError
------------------------------------------------------------------------------- Captured stdout --------------------------------------------------------------------------------
ERROR: InterpreterNotFound: python2.4
_____________________________________________________________ TestGlobalOptions.test_substitution_jenkins_default ______________________________________________________________

self = <test_config.TestGlobalOptions instance at 0x101c36488>
tmpdir = local('/private/var/folders/EV/EVpZ2D-dFr0Q0VP8cVxFc++++TI/-Tmp-/pytest-8/test_substitution_jenkins_default0')
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x101c36050>, newconfig = <function newconfig at 0x101828de8>

    def test_substitution_jenkins_default(self, tmpdir, monkeypatch, newconfig):
        monkeypatch.setenv("HUDSON_URL", "xyz")
        config = newconfig("""
                [testenv:py24]
                commands =
                    {distshare}
            """)
>       conf = config.envconfigs['py24']
E       KeyError: 'py24'

/Users/marc/dev/hg-repos/tox/tests/test_config.py:611: KeyError
------------------------------------------------------------------------------- Captured stdout --------------------------------------------------------------------------------
ERROR: InterpreterNotFound: python2.4
_____________________________________________________________ TestGlobalOptions.test_substitution_jenkins_context ______________________________________________________________

self = <test_config.TestGlobalOptions instance at 0x101c73710>
tmpdir = local('/private/var/folders/EV/EVpZ2D-dFr0Q0VP8cVxFc++++TI/-Tmp-/pytest-8/test_substitution_jenkins_context0')
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x101c73320>, newconfig = <function newconfig at 0x1018107d0>

    def test_substitution_jenkins_context(self, tmpdir, monkeypatch, newconfig):
        monkeypatch.setenv("HUDSON_URL", "xyz")
        monkeypatch.setenv("WORKSPACE", tmpdir)
        config = newconfig("""
                [tox:jenkins]
                distshare = {env:WORKSPACE}/hello
                [testenv:py24]
                commands =
                    {distshare}
            """)
>       conf = config.envconfigs['py24']
E       KeyError: 'py24'

/Users/marc/dev/hg-repos/tox/tests/test_config.py:626: KeyError
------------------------------------------------------------------------------- Captured stdout --------------------------------------------------------------------------------
ERROR: InterpreterNotFound: python2.4
_________________________________________________________________ TestGlobalOptions.test_default_environments __________________________________________________________________

self = <test_config.TestGlobalOptions instance at 0x101817b00>, tmpdir = local('/private/var/folders/EV/EVpZ2D-dFr0Q0VP8cVxFc++++TI/-Tmp-/pytest-8/test_default_environments0')
newconfig = <function newconfig at 0x101828578>, monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x10180d830>

    def test_default_environments(self, tmpdir, newconfig, monkeypatch):
        envs = "py24,py25,py26,py27,py30,py31,py32,jython,pypy"
        inisource = """
                [tox]
                envlist = %s
            """ % envs
        config = newconfig([], inisource)
        envlist = envs.split(",")
        assert config.envlist == envlist
        for name in config.envlist:
>           env = config.envconfigs[name]
E           KeyError: 'py24'

/Users/marc/dev/hg-repos/tox/tests/test_config.py:681: KeyError
------------------------------------------------------------------------------- Captured stdout --------------------------------------------------------------------------------
ERROR: InterpreterNotFound: python2.4
________________________________________________________________ TestGlobalOptions.test_defaultenv_commandline _________________________________________________________________

self = <test_config.TestGlobalOptions instance at 0x101978d88>
tmpdir = local('/private/var/folders/EV/EVpZ2D-dFr0Q0VP8cVxFc++++TI/-Tmp-/pytest-8/test_defaultenv_commandline0'), newconfig = <function newconfig at 0x101828140>
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x101cb0170>

    def test_defaultenv_commandline(self, tmpdir, newconfig, monkeypatch):
        config = newconfig(["-epy24"], "")
>       env = config.envconfigs['py24']
E       KeyError: 'py24'

/Users/marc/dev/hg-repos/tox/tests/test_config.py:701: KeyError
------------------------------------------------------------------------------- Captured stdout --------------------------------------------------------------------------------
ERROR: InterpreterNotFound: python2.4
______________________________________________________________ TestGlobalOptions.test_defaultenv_partial_override ______________________________________________________________

self = <test_config.TestGlobalOptions instance at 0x101978b90>
tmpdir = local('/private/var/folders/EV/EVpZ2D-dFr0Q0VP8cVxFc++++TI/-Tmp-/pytest-8/test_defaultenv_partial_override0'), newconfig = <function newconfig at 0x101828938>
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x101968170>

    def test_defaultenv_partial_override(self, tmpdir, newconfig, monkeypatch):
        inisource = """
                [tox]
                envlist = py24
                [testenv:py24]
                commands= xyz
            """
        config = newconfig([], inisource)
>       env = config.envconfigs['py24']
E       KeyError: 'py24'

/Users/marc/dev/hg-repos/tox/tests/test_config.py:713: KeyError
------------------------------------------------------------------------------- Captured stdout --------------------------------------------------------------------------------
ERROR: InterpreterNotFound: python2.4
------------------------------------------------ generated xml file: /Users/marc/dev/hg-repos/tox/.tox/py27/log/junit-py27.xml -------------------------------------------------
============================================================== 12 failed, 119 passed, 2 skipped in 62.97 seconds ===============================================================
ERROR: InvocationError: '/Users/marc/dev/hg-repos/tox/.tox/py27/bin/py.test --junitxml=/Users/marc/dev/hg-repos/tox/.tox/py27/log/junit-py27.xml'
___________________________________________________________________________________ summary ____________________________________________________________________________________
ERROR:   py27: commands failed

Comments (6)

  1. holger krekel

    I think this all relates to a recent change i merged: interpreter existence is now checked at config-file read time instead of at "test run" time. This is conceptually wrong and it slipped my attention on the review. We need to find and revert this change.

  2. Marc Abramowitz

    hg bisect to the rescue...

    $ hg update default
    ...
    $ tox -e py27
    ...
    (bad)
    $ hg update aaa4f2e1c7d7
    ...
    $ tox -e py27
    ...
    (good)
    $ hg update default
    ...
    $ hg bisect --bad
    $ hg bisect --good aaa4f2e1c7d7
    Testing changeset 375:d73e608cb4db (3 changesets remaining, ~1 tests)
    resolving manifests
    getting CHANGELOG
    getting tests/test_config.py
    getting tox/_pytestplugin.py
    3 files updated, 0 files merged, 0 files removed, 0 files unresolved
    $ tox -e py27
    ...
    (bad)
    $ hg bisect --bad              
    The first bad revision is:
    changeset:   375:d73e608cb4db
    user:        Gabriel <g2p.code@gmail.com>
    date:        Fri Nov 30 18:45:16 2012 +0100
    files:       CHANGELOG doc/config.txt tests/test_z_cmdline.py tox/_config.py tox/_venv.py
    description:
    Add {envsitepackagesdir} substitution. Closes #72.
    

    https://bitbucket.org/hpk42/tox/commits/d73e608cb4db9637cb734ccb2e361298b7347cc5 is where the tests started failing. Some of the changes in tox/_config.py in particular look very much like they could be related to the failing tests since it looks to be checking whether the interpreter exists.

  3. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.