]> git.parisson.com Git - timeside.git/commitdiff
Try to fix tests support in travis
authorThomas Fillon <thomas@parisson.com>
Sun, 20 Apr 2014 09:06:04 +0000 (11:06 +0200)
committerThomas Fillon <thomas@parisson.com>
Sun, 20 Apr 2014 09:06:04 +0000 (11:06 +0200)
.travis.yml
setup.py
tests/get_samples.py [new file with mode: 0644]

index b7be10f29862add13c939e73f1262d4e8af8b270..d3dbafb5c8455b085eb8ff4944bad2cd40544ac0 100644 (file)
@@ -21,6 +21,9 @@ install:
  - python setup.py install
 
 # command to run tests
+before_script:
+- python tests/get_samples.py
+
 script:
 # - py.test tests --ignore tests/sandbox
  - python setup.py test
index 68d727f898a6f62c04dd14563b378df49ed358c3..11140d6e5a0f215187fd597c287276670b544ac4 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -14,13 +14,6 @@ class PyTest(TestCommand):
     def run_tests(self):
         #import here, cause outside the eggs aren't loaded
         import pytest
-
-        import os
-        os.chdir('tests')
-        from tools import check_samples
-        check_samples()
-        os.chdir('..')
-        
         errno = pytest.main(self.test_args)
         sys.exit(errno)
 
diff --git a/tests/get_samples.py b/tests/get_samples.py
new file mode 100644 (file)
index 0000000..a4d37a8
--- /dev/null
@@ -0,0 +1,6 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+from tools import check_samples
+
+check_samples()