..
This commit is contained in:
17
tests/edit_source.py
Normal file
17
tests/edit_source.py
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
with open(file="coverage.xml") as file:
|
||||||
|
file_content = file.readlines()
|
||||||
|
|
||||||
|
|
||||||
|
for line in file_content:
|
||||||
|
try:
|
||||||
|
orig_line = file_content.index(line)
|
||||||
|
line = line.strip().split("<")[1].split(">")
|
||||||
|
if line[0] == "source":
|
||||||
|
print("FOUND")
|
||||||
|
file_content[orig_line] = "<source>src</source>\n"
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
with open(file="coverage.xml", mode="w") as file:
|
||||||
|
file.writelines(file_content)
|
||||||
@@ -5,3 +5,4 @@ sh tests/start_tests.sh
|
|||||||
|
|
||||||
cp tests/coverage/coverage.xml ./coverage.xml
|
cp tests/coverage/coverage.xml ./coverage.xml
|
||||||
cp tests/coverage/report.xml ./report.xml
|
cp tests/coverage/report.xml ./report.xml
|
||||||
|
python3.10 tests/edit_source.py
|
||||||
|
|||||||
Reference in New Issue
Block a user