Skip to content

Commit

Permalink
test - try with coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel committed Feb 14, 2024
1 parent bdbbc0f commit cedbc9a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions geovita_processing_plugin/test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def _run_tests(test_suite, package_name, with_coverage=True):
if with_coverage:
cov = coverage.Coverage(
source=['/geovita_processing_plugin'],
omit=['*/test/*'],
omit=['*/test/*', '*/test_suite.py'],
)
cov.start()

Expand All @@ -53,13 +53,14 @@ def _run_tests(test_suite, package_name, with_coverage=True):
if with_coverage:
cov.stop()
cov.save()
report = tempfile.NamedTemporaryFile(delete=False) # pylint: disable=consider-using-with
#report = tempfile.NamedTemporaryFile(delete=False) # pylint: disable=consider-using-with
report = sys.stdout
cov.report(file=report)
# Produce HTML reports in the `htmlcov` folder and open index.html
# cov.html_report()
report.close()
with open(report.name, 'r', encoding='utf8') as fin:
print(fin.read())
#report.close()
#with open(report.name, 'r', encoding='utf8') as fin:
# print(fin.read())


def test_package(package='geovita_processing_plugin.test'):
Expand Down

0 comments on commit cedbc9a

Please sign in to comment.