Skip to content

Commit a11f7fa

Browse files
committed
Added tests for AllowBlackbox.
1 parent dba2543 commit a11f7fa

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

doc/Installation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ Ensure :ref:`packaging requirements <DEP/packaging>` are installed.
192192
python -m pip uninstall -y pyVHDLModel
193193
194194
# Install from wheel
195-
python -m pip install ./dist/pyVHDLModel-0.30.0-py3-none-any.whl
195+
python -m pip install ./dist/pyVHDLModel-0.31.0-py3-none-any.whl
196196
197197
.. tab-item:: Windows
198198
:sync: Windows
@@ -208,4 +208,4 @@ Ensure :ref:`packaging requirements <DEP/packaging>` are installed.
208208
py -m pip uninstall -y pyVHDLModel
209209
210210
# Install from wheel
211-
py -m pip install .\dist\pyVHDLModel-0.30.0-py3-none-any.whl
211+
py -m pip install .\dist\pyVHDLModel-0.31.0-py3-none-any.whl

tests/unit/Instantiate.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,22 @@ def test_IeeeLibrary(self) -> None:
655655

656656
self.assertSetEqual(set(design.IterateDesignUnits()), set(ieeeLibrary.IterateDesignUnits()))
657657

658+
stdLogic = ieeeLibrary.Packages["std_logic_1164"]
659+
self.assertFalse(design.AllowBlackbox)
660+
self.assertFalse(ieeeLibrary.AllowBlackbox)
661+
self.assertFalse(stdLogic.AllowBlackbox)
662+
663+
ieeeLibrary.AllowBlackbox = True
664+
self.assertFalse(design.AllowBlackbox)
665+
self.assertTrue(ieeeLibrary.AllowBlackbox)
666+
self.assertTrue(stdLogic.AllowBlackbox)
667+
668+
ieeeLibrary.AllowBlackbox = None
669+
stdLogic.AllowBlackbox = True
670+
self.assertFalse(design.AllowBlackbox)
671+
self.assertFalse(ieeeLibrary.AllowBlackbox)
672+
self.assertTrue(stdLogic.AllowBlackbox)
673+
658674
def test_IeeeMentorGraphicsLibrary(self) -> None:
659675
design = Design()
660676
ieeeLibrary = design.LoadIEEELibrary(IEEEFlavor.MentorGraphics)

0 commit comments

Comments
 (0)