From e5db6a80cf34db4b5ec84d8bd159fef837184e78 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Mon, 28 Dec 2020 19:03:39 +0100 Subject: Added a test for Architectures. --- testsuite/pyunit/dom/SimpleEntity.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'testsuite') 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") -- cgit v1.2.3