python-pytoml/Fix-handling-of-parser-errors-in-the-test-suite.patch
linker99 ee9bab3f17 Avoid annoying SystemExit breaks in vscode
Signed-off-by: linker99 <fandehui@xfusion.com>
2023-11-01 05:30:52 +08:00

26 lines
908 B
Diff

From 611d33bf15b55f61b0806a3e234848623323a6d2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Vejn=C3=A1r?= <vejnar.martin@gmail.com>
Date: Sun, 28 Oct 2018 13:57:11 +0100
Subject: [PATCH] Fix handling of parser errors in the test suite
---
test/test.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/test.py b/test/test.py
index 21bffd8..3c3ed1e 100644
--- a/test/test.py
+++ b/test/test.py
@@ -77,7 +77,7 @@ def _main():
except IOError:
bench = None
- if parsed is None != bench is None or (parsed is not None and not is_bench_equal(parsed, bench)):
+ if (parsed is None) != (bench is None) or (parsed is not None and not is_bench_equal(parsed, bench)):
failed.append((fname, parsed, bench, parse_error))
else:
succeeded.append(fname)
--
2.27.0