#2776 closed task (fixed)

add `[test]` "extra" to pull in testing-only dependencies

Reported by: warner Owned by: daira
Priority: normal Milestone: undecided
Component: packaging Version: 1.11.0
Keywords: Cc:
Launchpad Bug:

Description

I'm seeing other projects declare the dependencies that they only need for testing (like py.test, coverage, and mock) by using a [test] extra. So things like .travis.yml and tox.ini will use:

deps = .[test]

I'm thinking we should add this to Tahoe.

Our docs (for setting up a virtualenv for hacking) will need to mention pip install -e .[test] instead of just pip install -e ..

This will make it easier to include modern testing facilities like mock.

Change History (3)

comment:1 Changed at 2016-04-12T19:39:01Z by warner

Implemented in PR257

comment:2 Changed at 2016-04-12T20:12:21Z by Brian Warner <warner@…>

  • Resolution set to fixed
  • Status changed from new to closed

In 23f871a/trunk:

add [test] "extra" to install testing-only dependencies

closes ticket:2776

comment:3 Changed at 2016-04-12T21:33:11Z by Brian Warner <warner@…>

In c97e852/trunk:

tox.ini: use --editable to work around old-pip bug

One of the buildslaves (Ubuntu wily 15.10) has a very old pip-1.5.6,
which doesn't know how to "pip install" a filepath+extra (like
".[test]") unless --editable is also used.

It's convenient to have --editable set anyways (so you can do subsequent
narrow testing without re-running tox, by running ".tox/py27/bin/trial
TESTCASE" or use .tox/py27/bin/activate), so changing the dependency
from ".[test]" to "--editable=.[test]" is the easiest way to work around
that older buildslave. (I could also have upgraded the buildslave to use
a newer pip, but 15.10 is pretty recent and other people will probably
hit this too, so this way it's fixed for everybody).

refs ticket:2776

Note: See TracTickets for help on using tickets.