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:
parent
d7869ddf6e
commit
168b0670c4
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user