diff options
author | Patrick Lehmann <Patrick.Lehmann@plc2.de> | 2020-12-28 19:03:39 +0100 |
---|---|---|
committer | Patrick Lehmann <Patrick.Lehmann@plc2.de> | 2020-12-28 19:03:39 +0100 |
commit | e5db6a80cf34db4b5ec84d8bd159fef837184e78 (patch) | |
tree | a0603f50f99af68dcf8d9209211c346b620fbe84 | |
parent | 42a1c81bbd4759dc50dfec089be35cb69c2ab088 (diff) | |
download | ghdl-e5db6a80cf34db4b5ec84d8bd159fef837184e78.tar.gz ghdl-e5db6a80cf34db4b5ec84d8bd159fef837184e78.tar.bz2 ghdl-e5db6a80cf34db4b5ec84d8bd159fef837184e78.zip |
Added a test for Architectures.
-rw-r--r-- | testsuite/pyunit/dom/SimpleEntity.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/testsuite/pyunit/dom/SimpleEntity.py b/testsuite/pyunit/dom/SimpleEntity.py index 046d5ceff..a8caf9e6f 100644 --- a/testsuite/pyunit/dom/SimpleEntity.py +++ b/testsuite/pyunit/dom/SimpleEntity.py @@ -2,7 +2,6 @@ from pathlib import Path from unittest import TestCase from pyGHDL.dom.Misc import Design, Library, Document -from pyGHDL.dom.DesignUnit import Entity, Architecture if __name__ == "__main__": @@ -37,3 +36,10 @@ class SimpleEntity(TestCase): self.assertEqual(len(design.Documents[0].Entities), 1) self.assertTrue(design.Documents[0].Entities[0].Name == "e1") + def test_Architecture(self): + design = Design() + document = Document(self._path) + design.Documents.append(document) + + self.assertEqual(len(design.Documents[0].Architectures), 1) + self.assertTrue(design.Documents[0].Architectures[0].Name == "behav") |