Skip to content

Commit

Permalink
Fix #444: ckp
Browse files Browse the repository at this point in the history
  • Loading branch information
gurhar1133 committed Mar 26, 2024
1 parent 6712a6f commit d83dbf0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 2 additions & 4 deletions pykern/pkcli/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
SUITE_D = "tests"
_COROUTINE_NEVER_AWAITED = re.compile("RuntimeWarning: coroutine .+ was never awaited")
_FAILED_ON_WARNINGS = "\nFAILED due to:\n"
_PASSED_LOG_PATTERNS = (r"=+ (\d+) passed.*=+", r"PASSED")
_TEST_SKIPPED = re.compile(r"^.+\s+SKIPPED\s+\(.+\)$", flags=re.MULTILINE)
_TEST_PY = re.compile(r"_test\.py$")

Expand Down Expand Up @@ -179,10 +180,7 @@ def _fail(output):
return f"FAIL {output}"

def _remove_passing_messages(content):
for pattern in (
r"=+ (\d+) passed.*=+",
r"PASSED",
):
for pattern in _PASSED_LOG_PATTERNS:
content = re.sub(pattern, "", content)
return content

Expand Down
4 changes: 1 addition & 3 deletions tests/pkcli/test2_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,4 @@ def test_cases(capsys):
o, e = capsys.readouterr()
pkio.write_text("stdout.txt", o)
pkio.write_text("stderr.txt", e)
pkunit.pkre(
"FAILED due to:\n.*RuntimeWarning: coroutine .+ was never awaited", o
)
pkunit.pkre("FAILED due to:\nRuntimeWarning: coroutine .+ was never awaited", o)

0 comments on commit d83dbf0

Please sign in to comment.