diff --git a/.travis.yml b/.travis.yml index d9daa5c..b2ccf98 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,8 @@ language: python python: - "3.4" - "3.5" -install: pip install . -script: py.test +install: pip install pytest-runner +script: python setup.py ptr env: global: - ASYNC_TEST_TIMEOUT=20 diff --git a/setup.py b/setup.py index 904043f..9ba8b29 100755 --- a/setup.py +++ b/setup.py @@ -11,6 +11,8 @@ setup( install_requires = ['tornado>=4.1', 'setuptools'], tests_require=[ 'pytest', + 'flaky', + 'pytest-runner', ], entry_points = { 'console_scripts': [ diff --git a/tests/test_gitcafe.py b/tests/test_gitcafe.py index 2d74a93..cfa601a 100644 --- a/tests/test_gitcafe.py +++ b/tests/test_gitcafe.py @@ -1,6 +1,8 @@ +from flaky import flaky from tests.helper import ExternalVersionTestCase class GitCafeTest(ExternalVersionTestCase): + @flaky(max_runs=3) def test_gitcafe(self): self.assertEqual(self.sync_get_version("example", {"gitcafe": "test/test"}), "20120201")