This commit is contained in:
2023-12-12 02:14:46 +01:00
parent d67b6f5669
commit 250f7b6554
2 changed files with 18 additions and 0 deletions

17
tests/edit_source.py Normal file
View 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)