Skip to content

Commit

Permalink
Fix #444: ckp
Browse files Browse the repository at this point in the history
  • Loading branch information
gurhar1133 committed Apr 2, 2024
1 parent cd1cad3 commit a212c1e
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 26 deletions.
5 changes: 1 addition & 4 deletions pykern/pkcli/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,7 @@ def _try(output, restartable):
o = pkio.read_text(output)
if m := re.findall(_COROUTINE_NEVER_AWAITED, o):
with pkio.py_path(output).open(mode="a") as f:
f.write(
'\nFAILED due to "coroutine was never awaited" warnings:\n'
+ "".join(f"ERROR: {x}\n" for x in m)
)
f.write("".join(f"ERROR: {x}\n" for x in m))
return _fail(output)
if _TEST_SKIPPED.search(o):
return "\n".join(["pass"] + _skipped(o))
Expand Down
9 changes: 0 additions & 9 deletions tests/pkcli/test2_data/1.in/coroutine_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,3 @@ async def coroutine():
asyncio.sleep(0)

asyncio.run(coroutine())


def test_subprocess():
import sys
from pykern import pksubprocess

pksubprocess.check_call_with_signals(["python", "module_with_coroutine.py"], output="o.txt")
with open("o.txt", 'r') as file:
sys.stderr.write(file.read())
12 changes: 0 additions & 12 deletions tests/pkcli/test2_data/1.in/module_with_coroutine.py

This file was deleted.

2 changes: 1 addition & 1 deletion tests/pkcli/test2_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ def test_cases(capsys):
o, e = capsys.readouterr()
pkio.write_text("stdout.txt", o)
pkio.write_text("stderr.txt", e)
pkunit.pkre("coroutine was never awaited.*Error", o)
pkunit.pkre("Error: .+ coroutine .+ was never awaited", o)

0 comments on commit a212c1e

Please sign in to comment.