diff --git a/python_modules/dagster/dagster_tests/definitions_tests/test_composition.py b/python_modules/dagster/dagster_tests/definitions_tests/test_composition.py index 45ff4631fc055..a20b0e8814087 100644 --- a/python_modules/dagster/dagster_tests/definitions_tests/test_composition.py +++ b/python_modules/dagster/dagster_tests/definitions_tests/test_composition.py @@ -527,7 +527,8 @@ def single_input_op(): def test_collision_invocations(): - with pytest.warns(None) as record: + with warnings.catch_warnings(): + warnings.simplefilter("error") @job def _(): @@ -535,8 +536,6 @@ def _(): single_input_op() single_input_op() - assert len(record) == 0 - def test_alias_invoked(recwarn): @job