python - 如何打印 Cocotb 中引发的 TestError 的内容
问题描述
如果我在 cocotb 测试协程下引发 TestError :
@cocotb.test()
def double_cmd(dut):
...
raise TestError("Wrong CRC value found")
我知道测试日志中出现了错误,但我没有看到“找到错误的 CRC 值”的消息:
12580176.01ns ERROR Test Failed: double_cmd (result was TestError)
12580176.01ns ERROR Failed 1 out of 1 tests (3 skipped)
12580176.01ns INFO ************************************************************************************
** TEST PASS/FAIL SIM TIME(NS) REAL TIME(S) RATIO(NS/S) **
************************************************************************************
** test_laser_com.simple_test N/A 0.00 0.00 0.00 **
** test_laser_com.wrong_crc N/A 0.00 0.00 0.00 **
** test_laser_com.gas_cmd N/A 0.00 0.00 0.00 **
** test_laser_com.double_cmd FAIL 12580176.01 14.41 872921.37 **
************************************************************************************
是否有正确的方法在日志中打印 TestError 消息?
解决方案
我会认为这是一个错误。也许您想在https://github.com/potentialventures/cocotb/issues报告它?
cocotb 的活动最近非常活跃,因此值得报告。
推荐阅读
- mysql - 从 3 张桌子查看
- mysql - 我需要删除低于一定数量的所有值
- r - 如何使用 dplyr::summarise “带来另一个变量”
- javascript - botConnection.activity$ node.js BOT
- r - 运行 lmer 时 R 挂起
- regex - 从 Twitter 数据集中删除或替换 URL 和 RT
- python - 通过 pyodbc (Python 3.x) 执行 SQL 脚本时,“CREATE PROCEDURE #X”失败
- ruby-on-rails - 如何将供应商资产导入 webpacker?
- highcharts - 如何在 Highcharts 中使用外部按钮导出 CSV 和 XLS
- c# - Xamarin 表单更新 UI