Skip to content

Commit

Permalink
Tox to allow testing two different environments (mozilla#453)
Browse files Browse the repository at this point in the history
Create a second tox enviroment for testing new dependencies besides the current working set of dependencies
  • Loading branch information
F3real authored and armenzg committed Apr 21, 2016
1 parent 7a2e7fc commit 86df9cc
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 17 deletions.
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ recursive-include mozci.egg-info *
recursive-include test *
include setup.py
include README.rst
include requirements.txt
9 changes: 0 additions & 9 deletions requirements.txt

This file was deleted.

15 changes: 12 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
from setuptools import setup, find_packages

with open('requirements.txt') as f:
required = f.read().splitlines()

required = [
"buildapi_client",
"ijson",
"keyring",
"progressbar",
"pushlog_client",
"requests",
"taskcluster",
"treeherder-client",
"jsonschema"
]

setup(
name='mozci',
version='0.32.1',
packages=find_packages(),
install_requires=required + ['pytest-runner'],
tests_require=required + ['mock', 'pytest'],

# Meta-data for upload to PyPI
author='Armen Zambrano G.',
author_email='[email protected]',
Expand Down
32 changes: 28 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,21 +1,45 @@
[tox]
envlist = py27
envlist = py27_new_deps

[testenv]
basepython = python

deps = -rrequirements.txt
basepython = python2.7
deps =
coverage
flake8
flake8_docstrings
mock
pytest
pytest-capturelog

[testenv:py27_current_deps]
deps =
{[testenv]deps}
buildapi_client==0.2.2
ijson==2.2
keyring==5.3
progressbar==2.3
pushlog_client==0.5.0
requests==2.8.1
taskcluster==0.3.0
treeherder-client==2.0.1
jsonschema==2.5.1


commands =
flake8 mozci test
coverage run --source=mozci -m py.test test


[testenv:py27_new_deps]
deps =
{[testenv]deps}


commands =
flake8 mozci test
coverage run --source=mozci -m py.test test


[flake8]
exclude = .tox
show-source = True
Expand Down

0 comments on commit 86df9cc

Please sign in to comment.