1 Star 0 Fork 12

starlet_dx/fprintd

forked from src-openEuler/fprintd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0004-tests-Hide-intermediate-error-in-output-checker.patch 1.76 KB
一键复制 编辑 原始数据 按行查看 历史
xuxinyu 提交于 2023-01-05 20:54 +08:00 . tests: Hide intermediate error in output checker
From 27b618a93ede3df5224d5d7f90155d901029953b Mon Sep 17 00:00:00 2001
From: Benjamin Berg <[email protected]>
Date: Tue, 10 May 2022 09:50:10 +0200
Subject: [PATCH 04/14] tests: Hide intermediate error in output checker
The output checker raises from an exception handler. Add the appropriate
"from None" to hide that intermediate exception.
---
tests/output_checker.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/output_checker.py b/tests/output_checker.py
index 265e323..d1a8c4c 100644
--- a/tests/output_checker.py
+++ b/tests/output_checker.py
@@ -98,16 +98,16 @@ class OutputChecker(object):
# EOF, throw error
if self._pipe_fd_r == -1:
if failmsg:
- raise AssertionError("No further messages: " % failmsg)
+ raise AssertionError("No further messages: " % failmsg) from None
else:
- raise AssertionError('No client waiting for needle %s' % (str(needle_re)))
+ raise AssertionError('No client waiting for needle %s' % (str(needle_re))) from None
# Check if should wake up
if not self._lines_sem.acquire(timeout = deadline - time.time()):
if failmsg:
- raise AssertionError(failmsg)
+ raise AssertionError(failmsg) from None
else:
- raise AssertionError('Timed out waiting for needle %s (timeout: %0.2f)' % (str(needle_re), timeout))
+ raise AssertionError('Timed out waiting for needle %s (timeout: %0.2f)' % (str(needle_re), timeout)) from None
continue
ret.append(l)
--
2.37.1.windows.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/starlet-dx/fprintd.git
[email protected]:starlet-dx/fprintd.git
starlet-dx
fprintd
fprintd
master

搜索帮助