Permalink
Browse files

Add test-requirements.txt

The central place for all testing requirements. And use it everywhere.
  • Loading branch information...
saschpe committed Feb 2, 2014
1 parent 268d1d7 commit 3cd83f18fee784ab18761871c035585bad4653d0
Showing with 14 additions and 7 deletions.
  1. +1 −3 .travis.yml
  2. +1 −1 MANIFEST.in
  3. +8 −1 setup.py
  4. +3 −0 test-requirements.txt
  5. +1 −2 tox.ini
View
@@ -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
View
@@ -1,5 +1,5 @@
include LICENSE
include README.rst
-include requirements.txt
+include requirements.txt test-requirements.txt
include tox.ini
recursive-include test *
View
@@ -14,7 +14,12 @@
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 @@
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',
View
@@ -0,0 +1,3 @@
+-r requirements.txt
+pep8==1.4.6
+flake8
View
@@ -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]

0 comments on commit 3cd83f1

Please sign in to comment.