mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Support .coveragerc file
This commit is contained in:
committed by
Dmitry Trofimov
parent
bfede40012
commit
02b559eed0
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user