From f741db8fc36fdc3681aa4246b6da71ed588a148d Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Mon, 21 Jun 2021 10:30:04 -0400 Subject: [PATCH] use .unwrap() not .value in tests This makes the error visible in cases where the outcome is not a value at all. --- qtrio/_tests/test_core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qtrio/_tests/test_core.py b/qtrio/_tests/test_core.py index fa10def0..a319949d 100644 --- a/qtrio/_tests/test_core.py +++ b/qtrio/_tests/test_core.py @@ -163,7 +163,7 @@ async def main(): runner = qtrio.Runner(application=QtWidgets.QApplication([])) outcomes = runner.run(async_fn=main) - assert outcomes.trio.value == None + assert outcomes.trio.unwrap() == None """ testdir.makepyfile(test_file) @@ -236,7 +236,7 @@ async def main(): runner = qtrio.Runner() outcomes = runner.run(main) - assert outcomes.trio.value == threading.get_ident() + assert outcomes.trio.unwrap() == threading.get_ident() """ testdir.makepyfile(test_file)