Skip to content

Commit 3198414

Browse files
committed
fix(test): collapse nested with into a single contextmanager group (SIM117)
1 parent af6f9e2 commit 3198414

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

cuda_core/tests/test_program_cache.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1492,9 +1492,11 @@ def test_filestream_cache_path_backed_object_code_missing_file_message(tmp_path)
14921492
path_backed = ObjectCode.from_cubin(str(src), name="gone")
14931493
src.unlink()
14941494

1495-
with FileStreamProgramCache(tmp_path / "fc-missing") as cache:
1496-
with pytest.raises(FileNotFoundError, match="path-backed ObjectCode") as excinfo:
1497-
cache[b"k"] = path_backed
1495+
with (
1496+
FileStreamProgramCache(tmp_path / "fc-missing") as cache,
1497+
pytest.raises(FileNotFoundError, match="path-backed ObjectCode") as excinfo,
1498+
):
1499+
cache[b"k"] = path_backed
14981500
assert str(src) in str(excinfo.value)
14991501

15001502

0 commit comments

Comments
 (0)