1
0
mirror of https://github.com/myhdl/myhdl.git synced 2024-12-14 07:44:38 +08:00

test_modbv: simplify some tests using pytest.raises

This commit is contained in:
Keerthan Jaic 2015-06-27 04:39:33 -04:00
parent d7869ddf6e
commit 168b0670c4

View File

@ -63,15 +63,9 @@ class TestModbvWrap:
def testNoWrap(self):
# Validate the base class fails for the wraps
x = intbv(0, min=-8, max=8)
try:
with pytest.raises(ValueError):
x[:] += 15
raise AssertionError
except ValueError:
pass
x = intbv(0, min=-8, max=8)
try:
with pytest.raises(ValueError):
x[:] += 15
raise AssertionError
except ValueError:
pass