diff --git a/ci.sh b/ci.sh index 9362dbc72..cd1ce42e8 100755 --- a/ci.sh +++ b/ci.sh @@ -58,6 +58,8 @@ else flags="" fi +python -m uv pip install https://github.com/graingert/outcome/archive/refs/heads/invalid-objects-on-unwrap.zip + # If we're testing with a LSP installed, then it might break network # stuff, so wait until after we've finished setting everything else # up. diff --git a/src/trio/_tests/test_trio.py b/src/trio/_tests/test_trio.py index 65d4ce34f..c038a2088 100644 --- a/src/trio/_tests/test_trio.py +++ b/src/trio/_tests/test_trio.py @@ -6,3 +6,15 @@ def test_trio_import() -> None: del sys.modules[module] import trio # noqa: F401 + + +def test_we_have_peek() -> None: + """ + temporary test to see if we are running on outcome v2 + """ + import outcome + + def fn() -> int: + return 1 + + assert outcome.capture(fn).peek() == 1 diff --git a/tox.ini b/tox.ini index 11bd09d0c..825e52f06 100644 --- a/tox.ini +++ b/tox.ini @@ -102,6 +102,7 @@ description = "Run type checks: mypy on all platforms, and pyright on `src/trio[ deps = -r test-requirements.txt exceptiongroup + https://github.com/graingert/outcome/archive/refs/heads/invalid-objects-on-unwrap.zip base_python = 3.10 set_env = PYRIGHT_PYTHON_IGNORE_WARNINGS=1