0

I'm trying to integrate code coverage with Travis CI for a python repository.

In the project root, my .coveragerc looks like:

[run]
data_file = tests/coverage/.coverage
omit = data-structures/lib/*

[html]
directory = tests/coverage/html_report/

[xml]
output = tests/coverage/coverage.xml

All the attributes are reflected correctly except data_file. I see a reports file created under tests/.

I have also tried data_file = tests/coverage/, but the reports file is still created under tests/.

How do I create .coverage inside tests/coverage/?

2
  • Hmm, that seems very strange. Are you sure you are using the .coveragerc file you think you are? You can add COVERAGE_DEBUG=config,sys to your environment to get some information dumped about the configuration being used. Commented Nov 8, 2020 at 22:37
  • @NedBatchelder its working fine right now and the behavior is also as expected. But there was a reports file at some point earlier. Commented Nov 9, 2020 at 3:06

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.