Bashcov - Does Not Work If Subprogram Is Called By Python
I have installed bashcov.. in order to measure code coverage in a bunch of bash scripts: $ bash --version
Solution 1:
Thanks to a comment, and this answer: https://stackoverflow.com/a/67108740/147356
This works:
replace:
subprocess.run(["./sub.sh"])
with
subprocess.Popen(["./sub.sh"], close_fds=False).communicate()
that feature can be turned off for Popen
but not run
with close_fds
Post a Comment for "Bashcov - Does Not Work If Subprogram Is Called By Python"