hdl.ir: raise a more descriptive error on non-elaboratable object.

This commit is contained in:
whitequark 2019-02-14 20:52:42 +00:00
parent 43e4833ddb
commit 8ee6bd80ff
2 changed files with 14 additions and 3 deletions

View file

@ -7,6 +7,13 @@ from ..hdl.mem import *
from .tools import *
class FragmentGetTestCase(FHDLTestCase):
def test_get_wrong(self):
with self.assertRaises(AttributeError,
msg="Object 'None' cannot be elaborated"):
Fragment.get(None, platform=None)
class FragmentGeneratedTestCase(FHDLTestCase):
def test_find_subfragment(self):
f1 = Fragment()