Travis CI script for testing
This commit is contained in:
parent
662d0fede9
commit
ed1ba9e071
|
|
@ -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
|
||||
|
|
@ -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."""
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue