Skip to content

setup.py's install_requires overwrites tox.ini's deps yet there is no failure :( #513

Open
@zsoldosp

Description

@zsoldosp

It would be nice to have tox verify that it got the versions that it expected from its inputs or fail running the tests, as this way I can get false confidence that it works with a given dep version, when in reality, it doesn't.

Haven't found any open github issues in this area (closest is #42, but that's quite different)

To repro

given the following tox.ini

[tox]
envlist = py{27,34}-django1{8,9}

[testenv]
commands =
    make test
setenv =
    DJANGO_SETTINGS_MODULE = settings
deps =
    django18: Django>=1.8,<1.9
    django19: Django>=1.9,<1.10
whitelist_externals = make

and in setup.py we have

...
setup(
    ....,
    install_requires=[
        'Django>=1.8,<=1.8',  # note it isn't upgraded to 1.9 'coz of developer oversight
    ]
)
...

running tox -e py27-django19 will end up with Django 1.8 installed in the virtualenv (below the test is simply checking for the correct django version (hardcoded for repro's sake) in the Makefile).

test:
        pip freeze
        pip freeze | grep "Django==1\.9"

versions

$ python --version
Python 2.7.6
$ pip freeze | grep tox
tox==2.7.0
$ lsb_version -a
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.5 LTS
Release:        14.04
Codename:       trusty

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:reportingarea:testenv-creationfeature:newsomething does not exist yet, but shouldhelp:wantedIssues that have been acknowledged, a solution determined and a PR might likely be accepted.level:hardrought estimate that this might be quite hard to implement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions