From 4a6d76c557caf7263ab57e5fe840d28aa3356621 Mon Sep 17 00:00:00 2001 From: jaseg Date: Mon, 24 Jan 2022 11:55:19 +0100 Subject: Improve error messages --- gerbonara/gerber/tests/test_rs274x.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gerbonara/gerber/tests/test_rs274x.py') diff --git a/gerbonara/gerber/tests/test_rs274x.py b/gerbonara/gerber/tests/test_rs274x.py index 7e21d62..83148a5 100644 --- a/gerbonara/gerber/tests/test_rs274x.py +++ b/gerbonara/gerber/tests/test_rs274x.py @@ -501,3 +501,12 @@ def test_bounding_box(reference, tmpfile): assert margin_px-2 <= row_prefix <= margin_px+2 assert margin_px-2 <= row_suffix <= margin_px+2 +@filter_syntax_warnings +def test_syntax_error(): + ref = reference_path('test_syntax_error.gbr') + with pytest.raises(SyntaxError) as exc_info: + GerberFile.open(ref) + + assert 'test_syntax_error.gbr' in exc_info.value.msg + assert '7' in exc_info.value.msg # lineno + -- cgit