diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..fa6f16c --- /dev/null +++ b/.coveragerc @@ -0,0 +1,6 @@ +[run] +branch = True +source = Products.CMFUid + +[report] +precision = 2 diff --git a/.gitignore b/.gitignore index 9d1e9e3..cc829e3 100644 --- a/.gitignore +++ b/.gitignore @@ -3,15 +3,20 @@ *.mo *.pyc *.pyo +.coverage +.coverage.* .eggs .installed.cfg .mr.developer.cfg +.tox/ bin build +coverage.xml develop-eggs dist downloads eggs +htmlcov/ local.cfg parts var diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..d451e86 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,18 @@ +language: python +sudo: false +python: + - 2.7 +install: + - pip install zope.testrunner + - pip install coveralls coverage + - pip install -U -e . +script: + - coverage run -m zope.testrunner --path=src --all -v +after_success: + - coveralls +notifications: + email: false +cache: + pip: true + directories: + - eggs/ diff --git a/setup.py b/setup.py index b400d21..3d7ad9e 100644 --- a/setup.py +++ b/setup.py @@ -45,10 +45,16 @@ def _package_doc(name): setup_requires=['eggtestinfo', ], install_requires=[ - 'setuptools', - 'Zope2 >= 2.13.12', + 'Products.BTreeFolder2 < 4', 'Products.CMFCore', 'Products.GenericSetup', + 'Products.ZCTextIndex < 4', + 'Products.ZCatalog < 4', + 'Products.ZSQLMethods < 3', + 'Zope2 >= 2.13.12, < 4.0.dev0', + 'Products.GenericSetup < 1.10', + 'Products.MailHost < 4', + 'setuptools', ], tests_require=[ 'zope.testing >= 3.7.0', diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..31e3e29 --- /dev/null +++ b/tox.ini @@ -0,0 +1,28 @@ +[tox] +envlist = + py27, + coverage-report, + +[testenv] +usedevelop = True +commands = + coverage run {envbindir}/zope-testrunner --path=Products --all {posargs:-vc} +deps = + . + zope.testrunner + coverage +setenv = + COVERAGE_FILE=.coverage.{envname} + +[testenv:coverage-report] +basepython = python2.7 +deps = coverage +setenv = + COVERAGE_FILE=.coverage +skip_install = true +commands = + coverage erase + coverage combine + coverage html -i + coverage xml -i + coverage report -i