diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..d79a0ed --- /dev/null +++ b/.coveragerc @@ -0,0 +1,13 @@ +[run] +branch = True +source = floweaver + +[report] +exclude_lines = + if self.debug: + pragma: no cover + raise NotImplementedError + if __name__ == .__main__.: +ignore_errors = True +omit = + test/* diff --git a/.travis.yml b/.travis.yml index 3260e0e..2b382e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,8 @@ matrix: - python: 3.6 - python: 3.5 install: - - pip install pytest matplotlib - - pip install . + - pip install '.[test]' script: - - py.test + - pytest --cov=./ +after_success: + - codecov diff --git a/setup.py b/setup.py index 6b94e3d..e6a5153 100644 --- a/setup.py +++ b/setup.py @@ -67,7 +67,7 @@ def find_version(*file_paths): ], extras_require={ 'dev': [], - 'test': ['pytest', 'matplotlib'], + 'test': ['pytest', 'matplotlib', 'codecov', 'pytest-cov'], 'docs': ['sphinx', 'nbsphinx', 'jupyter_client', 'ipykernel', 'ipysankeywidget'] }, )