Avoid annoying SystemExit breaks in vscode
Signed-off-by: linker99 <fandehui@xfusion.com>
This commit is contained in:
parent
9aaea03625
commit
ee9bab3f17
24
Avoid-annoying-SystemExit-breaks-in-vscode.patch
Normal file
24
Avoid-annoying-SystemExit-breaks-in-vscode.patch
Normal file
@ -0,0 +1,24 @@
|
||||
From 056ef47a8797334d2af737c910527e4bdf6746ed 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:37:00 +0100
|
||||
Subject: [PATCH] Avoid annoying SystemExit breaks in vscode
|
||||
|
||||
---
|
||||
test/test.py | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/test/test.py b/test/test.py
|
||||
index 0884253..21bffd8 100644
|
||||
--- a/test/test.py
|
||||
+++ b/test/test.py
|
||||
@@ -94,4 +94,6 @@ def _main():
|
||||
return 1 if failed or not succeeded else 0
|
||||
|
||||
if __name__ == '__main__':
|
||||
- sys.exit(_main())
|
||||
+ r = _main()
|
||||
+ if r:
|
||||
+ sys.exit(r)
|
||||
--
|
||||
2.27.0
|
||||
|
||||
25
Fix-handling-of-parser-errors-in-the-test-suite.patch
Normal file
25
Fix-handling-of-parser-errors-in-the-test-suite.patch
Normal file
@ -0,0 +1,25 @@
|
||||
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
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
Name: python-%{github_name}
|
||||
Version: 0.1.18
|
||||
Release: 5
|
||||
Release: 7
|
||||
Summary: Parser for TOML
|
||||
License: MIT
|
||||
URL: https://github.com/avakar/%{github_name}
|
||||
@ -10,6 +10,7 @@ Source0: https://github.com/avakar/%{github_name}/archive/v%{version}/%{g
|
||||
Patch0: Add-.vscode-and-.pytest_cache-to-.gitignore.patch
|
||||
Patch1: Fix-datetime-serialization.patch
|
||||
Patch2: Reject-invalid-escapes-in-strings.patch
|
||||
Patch3: Avoid-annoying-SystemExit-breaks-in-vscode.patch
|
||||
BuildArch: noarch
|
||||
|
||||
%global my_description \
|
||||
@ -63,6 +64,9 @@ BuildRequires: python3-setuptools
|
||||
%{python3_sitelib}/%{github_name}/
|
||||
|
||||
%changelog
|
||||
* Mon Dec 11 2023 fandehui <fandehui@xfusion.com> - 0.1.18-6
|
||||
- Avoid annoying SystemExit breaks in vscode
|
||||
|
||||
* Fri Nov 24 2023 fandehui <fandehui@xfusion.com> - 0.1.18-5
|
||||
- Fixes `invalid-escape` test.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user