Commit 02b559ee authored by GuillaumeCisco's avatar GuillaumeCisco Committed by Dmitry Trofimov
Browse files

Support .coveragerc file

parent bfede400
Showing with 8 additions and 3 deletions
+8 -3
......@@ -46,14 +46,19 @@ sys.argv = argv
cwd = os.getcwd()
run_xml = os.getenv('PYCHARM_RUN_COVERAGE_XML')
argv = ["xml", "-o", coverage_file + ".xml", "--ignore-errors"]
rcfile = cwd + "/.coveragerc"
if os.path.exists(rcfile):
print("Loading rcfile: %s\n" % rcfile)
argv += ["--rcfile", rcfile]
if run_xml:
os.chdir(cwd)
main(["xml", "-o", coverage_file + ".xml", "--ignore-errors"])
main(argv)
else:
try:
main()
finally:
if run_cov:
os.chdir(cwd)
main(["xml", "-o", coverage_file + ".xml", "--ignore-errors"])
main(argv)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment