mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-22 14:22:25 +00:00
add [test] "extra" to install testing-only dependencies
closes ticket:2776
This commit is contained in:
parent
359c233d26
commit
23f871a409
@ -13,9 +13,9 @@ before_install:
|
||||
- git fetch --depth=1000
|
||||
- python misc/build_helpers/show-tool-versions.py
|
||||
install:
|
||||
- pip install coverage coveralls
|
||||
- pip install coveralls
|
||||
before_script:
|
||||
- pip install -e .
|
||||
- pip install -e .[test]
|
||||
script:
|
||||
- coverage run --branch --source=src/allmydata `which tahoe` --version-and-path debug trial --rterrors --reporter=timing
|
||||
after_success:
|
||||
|
@ -203,7 +203,8 @@ Hacking On Tahoe-LAFS
|
||||
---------------------
|
||||
|
||||
To modify the Tahoe source code, you should get a git checkout, and install
|
||||
with the ``--editable`` flag::
|
||||
with the ``--editable`` flag. You should also use the ``[test]`` extra to get
|
||||
the additional libraries needed to run the unit tests::
|
||||
|
||||
% git clone https://github.com/tahoe-lafs/tahoe-lafs.git
|
||||
|
||||
@ -211,7 +212,7 @@ with the ``--editable`` flag::
|
||||
|
||||
% virtualenv venv
|
||||
|
||||
% venv/bin/pip install --editable .
|
||||
% venv/bin/pip install --editable .[test]
|
||||
Obtaining file::~/tahoe-lafs
|
||||
...
|
||||
Successfully installed ...
|
||||
@ -257,11 +258,11 @@ into your tahoe-specific virtualenv with ``pip install tox``.
|
||||
|
||||
Then just run ``tox``. This will create a new fresh virtualenv, install Tahoe
|
||||
(from the source tree, including any changes you have made) and all its
|
||||
dependencies into the virtualenv, then run the unit tests. This ensures that
|
||||
the tests are repeatable and match the results of other users, unaffected by
|
||||
any other Python packages installed on your machine. On a modern computer
|
||||
this will take 5-10 minutes, and should result in a "all tests passed"
|
||||
mesage::
|
||||
dependencies (including testing-only dependencies) into the virtualenv, then
|
||||
run the unit tests. This ensures that the tests are repeatable and match the
|
||||
results of other users, unaffected by any other Python packages installed on
|
||||
your machine. On a modern computer this will take 5-10 minutes, and should
|
||||
result in a "all tests passed" mesage::
|
||||
|
||||
% tox
|
||||
GLOB sdist-make: ~/tahoe-lafs/setup.py
|
||||
|
2
setup.py
2
setup.py
@ -267,6 +267,8 @@ setup(name=APPNAME,
|
||||
classifiers=trove_classifiers,
|
||||
test_suite="allmydata.test",
|
||||
install_requires=install_requires,
|
||||
extras_require={"test": ["pyflakes", "coverage"],
|
||||
},
|
||||
package_data={"allmydata.web": ["*.xhtml",
|
||||
"static/*.js", "static/*.png", "static/*.css",
|
||||
"static/img/*.png",
|
||||
|
5
topfiles/2776.change
Normal file
5
topfiles/2776.change
Normal file
@ -0,0 +1,5 @@
|
||||
Tahoe's testing-only dependencies can now be installed by asking for the
|
||||
[test] extra, so if you want to set up a virtualenv for testing, use "pip
|
||||
install -e .[test]" instead just of "pip install -e ." . At the moment this
|
||||
only includes "coverage" and "pyflakes", but in the future it might include
|
||||
"mock" and other utility libraries.
|
3
tox.ini
3
tox.ini
@ -8,6 +8,7 @@ envlist = py27
|
||||
|
||||
[testenv]
|
||||
passenv = USERPROFILE HOMEDRIVE HOMEPATH
|
||||
deps = .[test]
|
||||
commands =
|
||||
tahoe --version
|
||||
trial --rterrors {posargs:allmydata}
|
||||
@ -15,6 +16,7 @@ commands =
|
||||
[testenv:deprecations]
|
||||
basepython=python2.7
|
||||
passenv = USERPROFILE HOMEDRIVE HOMEPATH
|
||||
deps = .[test]
|
||||
setenv =
|
||||
PYTHONWARNINGS=default::DeprecationWarning
|
||||
commands =
|
||||
@ -26,6 +28,7 @@ passenv = USERPROFILE HOMEDRIVE HOMEPATH
|
||||
setenv =
|
||||
PYTHONWARNINGS=default::DeprecationWarning
|
||||
deps =
|
||||
.[test]
|
||||
git+https://github.com/twisted/twisted
|
||||
git+https://github.com/warner/foolscap
|
||||
commands =
|
||||
|
Loading…
Reference in New Issue
Block a user