aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests
diff options
context:
space:
mode:
authorMatthew Crymble <matthew.crymble@ni.com>2022-05-20 12:22:07 -0500
committerAaron Rossetto <aaron.rossetto@ni.com>2022-06-10 13:24:05 -0500
commit3372ca9d6880f684f6865a3e34e1317d3796ac2f (patch)
tree726e3ca020635c7f7c3482ccdea8ae88cb815aef /host/tests
parent9162e6842354d4022f7692536a888d10bee8fede (diff)
downloaduhd-3372ca9d6880f684f6865a3e34e1317d3796ac2f.tar.gz
uhd-3372ca9d6880f684f6865a3e34e1317d3796ac2f.tar.bz2
uhd-3372ca9d6880f684f6865a3e34e1317d3796ac2f.zip
tests: streaming: use assert instead of pytest.fail for underruns/overruns
When an assert statement fails, pytest will determine whether that should be a fail or an xfail. By explicitly calling pytest.fail, we were preventing pytest from doing that determination, so an individual test case that had an xfail mark would have been a hard failure.
Diffstat (limited to 'host/tests')
-rw-r--r--host/tests/pytests/test_streaming.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/host/tests/pytests/test_streaming.py b/host/tests/pytests/test_streaming.py
index f0bb6f1d2..553e7608f 100644
--- a/host/tests/pytests/test_streaming.py
+++ b/host/tests/pytests/test_streaming.py
@@ -306,7 +306,7 @@ def test_streaming(pytestconfig, dut_type, use_dpdk, dual_SFP, rate, rx_rate, rx
if not use_dpdk:
pytest.xfail(overrun_error_text)
else:
- pytest.fail(overrun_error_text)
+ assert False, overrun_error_text
if tx_channels:
assert stats.avg_vals.tx_timeouts <= tx_timeouts_threshold, \
@@ -326,7 +326,7 @@ def test_streaming(pytestconfig, dut_type, use_dpdk, dual_SFP, rate, rx_rate, rx
if not use_dpdk:
pytest.xfail(underrun_error_text)
else:
- pytest.fail(underrun_error_text)
+ assert False, underrun_error_text
assert stats.avg_vals.late_cmds <= late_cmds_threshold, \
f"""Number of late commands exceeded threshold.