Skip to content

Commit

Permalink
use .unwrap() not .value in tests
Browse files Browse the repository at this point in the history
This makes the error visible in cases where the outcome is not a value at all.
  • Loading branch information
altendky authored Jun 21, 2021
1 parent 2814301 commit f741db8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qtrio/_tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit f741db8

Please sign in to comment.