Browse Source

Add code coverage info

zolfa-add_slices_loading
Ruben Verweij 8 years ago
parent
commit
630afa4926
2 changed files with 11 additions and 6 deletions
  1. +5
    -1
      .travis.yml
  2. +6
    -5
      test.py

+ 5
- 1
.travis.yml View File

@ -18,4 +18,8 @@ python:
- "nightly" # currently points to 3.7-dev
install: "pip install -r requirements.txt"
script: python ./test.py
script: python ./test.py
after_sucess:
- pip install codeclimate-test-reporter coverage
- CODECLIMATE_REPO_TOKEN=8582900c285e4da0f253555b1bac1ba501bd6ff07850b0f227166b3cdac59ecc codeclimate-test-reporter

+ 6
- 5
test.py View File

@ -1,5 +1,6 @@
import unittest
loader = unittest.TestLoader()
tests = loader.discover('tests', pattern='test_*.py', top_level_dir='.')
testRunner = unittest.TextTestRunner()
testRunner.run(tests)
import nose
from os import path
file_path = path.abspath(__file__)
tests_path = path.join(path.abspath(path.dirname(file_path)), "tests")
nose.main(argv=[path.abspath(__file__), "--with-coverage", "--cover-erase", "--cover-package=nd2reader", tests_path])

Loading…
Cancel
Save