diff --git a/.coveragerc b/.coveragerc index b05d9d8fa..5201e68e4 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,5 +1,5 @@ [run] -source = Trakttv.bundle/Contents/Libraries/Shared/plugin/* +source = Trakttv.bundle/Contents/Libraries/Shared/plugin [report] omit = Trakttv.bundle/Contents/Tests/* \ No newline at end of file diff --git a/.scrutinizer.yml b/.scrutinizer.yml index eaf206622..e6c09f691 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -7,7 +7,7 @@ build: tests: override: - - command: py.test --cov Trakttv.bundle/Contents/ Trakttv.bundle/Contents/Tests + command: ./run_tests.sh coverage: file: .coverage format: py-cc diff --git a/Trakttv.bundle/Contents/Tests/requirements.txt b/Trakttv.bundle/Contents/Tests/requirements.txt index d18eeca66..d3117f0cf 100644 --- a/Trakttv.bundle/Contents/Tests/requirements.txt +++ b/Trakttv.bundle/Contents/Tests/requirements.txt @@ -1,2 +1,2 @@ -pytest==2.7.2 -pytest-cov==1.8.1 \ No newline at end of file +coverage==3.7.1 +pytest==2.7.2 \ No newline at end of file diff --git a/run_tests.bat b/run_tests.bat new file mode 100644 index 000000000..5ff4484cf --- /dev/null +++ b/run_tests.bat @@ -0,0 +1,15 @@ +@echo off + +coverage run --rcfile .coveragerc -m py.test Trakttv.bundle\Contents\Tests + +if "%~1" == "html" ( + echo Generating html report... + + coverage html +) else ( + echo Generating simple report... + + coverage report +) + +echo Done \ No newline at end of file diff --git a/run_tests.sh b/run_tests.sh new file mode 100755 index 000000000..0e51aa699 --- /dev/null +++ b/run_tests.sh @@ -0,0 +1,13 @@ +coverage run --rcfile .coveragerc -m py.test Trakttv.bundle/Contents/Tests + +if [ "$1" = "html" ]; then + echo "Generating html report..." + + coverage html +else + echo "Generating simple report..." + + coverage report +fi + +echo "Done" \ No newline at end of file