Skip to content

Commit

Permalink
- support test with tox
Browse files Browse the repository at this point in the history
- adjust travis.yml for working with newer versions of python
- add MANUFEST.in
  • Loading branch information
Samuel Riolo committed Apr 15, 2015
1 parent b845f86 commit c4566c9
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
bin/
develop-eggs/
eggs/
.tox

3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
language: python
python:
- 2.6
- 2.7
- 3.3
- 3.4
install:
- python bootstrap.py
- bin/buildout
Expand Down
16 changes: 7 additions & 9 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
include *.rst
global-include *.mo
include *.txt

recursive-include docs *
recursive-include src *

global-exclude *.dll
global-exclude *.pyc
global-exclude *.pyo
global-exclude *.so
include bootstrap.py
include buildout.cfg
include dev.cfg
include tox.ini
include .travis.yml
recursive-include src/martian *.zcml *.pt *.txt *.png *.dot *.ps *.po *.pot
19 changes: 19 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@
def read(*rnames):
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()

def alltests():
import os
import sys
import unittest
# use the zope.testrunner machinery to find all the
# test suites we've put under ourselves
import zope.testrunner.find
import zope.testrunner.options
here = os.path.abspath(os.path.join(os.path.dirname(__file__), 'src'))
args = sys.argv[:]
defaults = ["--test-path", here]
options = zope.testrunner.options.get_options(args, defaults)
suites = list(zope.testrunner.find.find_suites(options))
return unittest.TestSuite(suites)

long_description = (
read('README.txt')
+ '\n' +
Expand Down Expand Up @@ -41,9 +56,13 @@ def read(*rnames):
include_package_data = True,
zip_safe=False,
license='ZPL',
test_suite='__main__.alltests',
install_requires=[
'zope.interface',
'setuptools',
],
tests_require=[
'zope.testrunner',
],
extras_require = dict(test=['zope.testing']),
)
9 changes: 9 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[tox]
envlist =
py26,py27,py33,py34

[testenv]
commands =
{envpython} setup.py test
deps =

0 comments on commit c4566c9

Please sign in to comment.