Skip to content

Commit 74732d8

Browse files
committed
Improved test coverage.
1 parent 2698a5f commit 74732d8

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

tests/unit/Instantiate.py

+21-1
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
from pathlib import Path
22
from unittest import TestCase
33

4-
from pyVHDLModel.VHDLModel import Design, Library, Document, Entity
4+
from pyVHDLModel.VHDLModel import Design, Library, Document, Entity, Architecture, PackageBody, Package, Configuration, Context
55

66

77
if __name__ == "__main__":
88
print("ERROR: you called a testcase declaration file as an executable module.")
99
print("Use: 'python -m unitest <testcase module>'")
1010
exit(1)
1111

12+
1213
class Instantiate(TestCase):
1314
def test_Design(self):
1415
design = Design()
1516

17+
self.assertIsNotNone(design)
18+
self.assertTrue(len(design.Documents) == 0)
19+
self.assertTrue(len(design.Libraries) == 0)
20+
1621
def test_Library(self):
1722
library = Library()
1823

@@ -22,3 +27,18 @@ def test_Document(self):
2227

2328
def test_Entity(self):
2429
entity = Entity("entity_1")
30+
31+
def test_Architecture(self):
32+
architecture = Architecture("arch_1")
33+
34+
def test_Package(self):
35+
package = Package("pack_1")
36+
37+
def test_PackageBody(self):
38+
packageBody = PackageBody("pack_1")
39+
40+
def test_Context(self):
41+
packageBody = Context("ctx_1")
42+
43+
def test_Configuration(self):
44+
packageBody = Configuration("conf_1")

0 commit comments

Comments
 (0)