From cecca20314b253730bf16582714322746b533f06 Mon Sep 17 00:00:00 2001 From: duzumaki Date: Mon, 12 Feb 2024 01:31:47 +0000 Subject: [PATCH] Update test --- tests/functional/test_error_handling.py | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/tests/functional/test_error_handling.py b/tests/functional/test_error_handling.py index 2e0cd137..a48ad70f 100644 --- a/tests/functional/test_error_handling.py +++ b/tests/functional/test_error_handling.py @@ -1,25 +1,14 @@ -import os import re +from concurrent.futures.process import BrokenProcessPool import pytest # type: ignore - from grimp import build_graph, exceptions -def test_syntax_error_includes_module(): - dirname = os.path.dirname(__file__) - filename = os.path.abspath( - os.path.join(dirname, "..", "assets", "syntaxerrorpackage", "foo", "one.py") - ) - - with pytest.raises(exceptions.SourceSyntaxError) as excinfo: +def test_syntax_error_terminates_executor_pool(): + with pytest.raises(BrokenProcessPool): build_graph("syntaxerrorpackage", cache_dir=None) - expected_exception = exceptions.SourceSyntaxError( - filename=filename, lineno=5, text="fromb . import two\n" - ) - assert expected_exception == excinfo.value - def test_missing_root_init_file(): with pytest.raises(