Travis CI script for testing

This commit is contained in:
Ben Vanik 2012-04-09 15:33:44 -07:00
parent 662d0fede9
commit ed1ba9e071
3 changed files with 26 additions and 7 deletions

13
.travis.yml Normal file
View File

@ -0,0 +1,13 @@
# Copyright 2012 Google Inc. All Rights Reserved.
# Travis CI script
# http://travis-ci.org/#!/benvanik/anvil-build
language: python
python:
- 2.6
- 2.7
install: python setup.py -q install
script: python setup.py test

View File

@ -19,18 +19,24 @@ import util
def main():
"""Entry point for running tests.
"""
# Only find test_*.py files under anvil/
loader = unittest2.TestLoader()
tests = loader.discover('anvil',
pattern='*_test.py',
top_level_dir='.')
# Collect tests
tests = collector()
# Run the tests in the default runner
test_runner = unittest2.runner.TextTestRunner(verbosity=2)
test_runner.run(tests)
def collector():
"""Collects test for the setuptools test_suite command.
"""
# Only find test_*.py files under anvil/
loader = unittest2.TestLoader()
return loader.discover('anvil',
pattern='*_test.py',
top_level_dir='.')
class AsyncTestCase(unittest2.TestCase):
"""Test case adding additional asserts for async results."""

View File

@ -44,7 +44,7 @@ setup(
'unittest2>=0.5.1',
],
packages=['anvil',],
test_suite='anvil.test',
test_suite='anvil.test.collector',
include_package_data=True,
zip_safe=True,
entry_points = {