Add test-requirements.txt
The central place for all testing requirements. And use it everywhere.
This commit is contained in:
parent
268d1d78e3
commit
3cd83f18fe
@ -3,7 +3,5 @@ python:
|
||||
# - "2.6"
|
||||
- "2.7"
|
||||
- "3.3"
|
||||
# command to install dependencies
|
||||
install: "pip install -r requirements.txt --use-mirrors"
|
||||
# command to run tests
|
||||
install: "pip install --use-mirrors -r test-requirements.txt"
|
||||
script: python test/__main__.py -v
|
||||
|
@ -1,5 +1,5 @@
|
||||
include LICENSE
|
||||
include README.rst
|
||||
include requirements.txt
|
||||
include requirements.txt test-requirements.txt
|
||||
include tox.ini
|
||||
recursive-include test *
|
||||
|
9
setup.py
9
setup.py
@ -14,7 +14,12 @@ with codecs.open('README.rst', encoding='utf-8') as f:
|
||||
|
||||
with open("requirements.txt", "r") as f:
|
||||
install_requires = [str(req) for req in pkg_resources.parse_requirements(f)]
|
||||
|
||||
with open("test-requirements.txt", "r") as f:
|
||||
test_requires = []
|
||||
for line in f.readlines():
|
||||
# Skip '-r ...' includes which pkg_resources doesn't understand:
|
||||
if not line.startswith('-r '):
|
||||
test_requires.append(str(pkg_resources.Requirement.parse(line)))
|
||||
|
||||
setup(
|
||||
name='lesscpy',
|
||||
@ -28,6 +33,8 @@ setup(
|
||||
packages=find_packages(exclude=['*test*']),
|
||||
scripts=['bin/lesscpy'],
|
||||
install_requires=install_requires,
|
||||
tests_require=test_requires,
|
||||
test_suite='test',
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'Environment :: Console',
|
||||
|
3
test-requirements.txt
Normal file
3
test-requirements.txt
Normal file
@ -0,0 +1,3 @@
|
||||
-r requirements.txt
|
||||
pep8==1.4.6
|
||||
flake8
|
3
tox.ini
3
tox.ini
@ -2,11 +2,10 @@
|
||||
envlist = py26,py27,py33,pep8
|
||||
|
||||
[testenv]
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
commands = python test/__main__.py -v
|
||||
|
||||
[testenv:pep8]
|
||||
deps = pep8
|
||||
commands = pep8 --repeat --show-source --ignore=E501 --exclude=.venv,.tox,dist,doc lesscpy setup.py
|
||||
|
||||
[testenv:flake8]
|
||||
|
Loading…
Reference in New Issue
Block a user