Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzaponte committed Nov 12, 2024
1 parent 4a3f708 commit 3339dec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:
- name: Warning summary
run: |
./scripts/check_warnings pytest_output.txt
echo "KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK"
python scripts/check_warnings pytest_output.txt
if [ $? ]; then
echo "::warning ::There are warnings raised in the test suite"
fi
11 changes: 8 additions & 3 deletions scripts/check_warnings
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,23 @@
import sys
import re

header = "(=+) warnings summary (=+)\n"
footer = "(=+) (.+) warnings (.+) (=+)\n"
print("DOING SOMETHING")

header = "(.*)(=+) warnings summary (=+)(.*)"
footer = "(.*)(=+) (.+) warnings (.+) (=+)(.*)"

found = False
doit = False
for line in open(sys.argv[1]):
for line in map(str.strip, open(sys.argv[1])):
if re.match(header, line): doit=True

print(doit, repr(line))
if doit:
found = True
print(line.strip())

print()

if re.match(footer, line): doit=False

sys.exit(found)

0 comments on commit 3339dec

Please sign in to comment.