diff options
author | Patrick Lehmann <Patrick.Lehmann@plc2.de> | 2021-06-23 00:41:40 +0200 |
---|---|---|
committer | Patrick Lehmann <Patrick.Lehmann@plc2.de> | 2021-06-23 00:41:40 +0200 |
commit | 957566f47af6a5a10d38cc5f27551019165ea2f0 (patch) | |
tree | 1706bfb480a838067e6667d6d7b1aa6d54024cdc /testsuite/pyunit/dom/SimplePackage.py | |
parent | 513ee743a2f633ed01486621b4684c0608d34219 (diff) | |
download | ghdl-957566f47af6a5a10d38cc5f27551019165ea2f0.tar.gz ghdl-957566f47af6a5a10d38cc5f27551019165ea2f0.tar.bz2 ghdl-957566f47af6a5a10d38cc5f27551019165ea2f0.zip |
Formatted pyunit tests via black.
Diffstat (limited to 'testsuite/pyunit/dom/SimplePackage.py')
-rw-r--r-- | testsuite/pyunit/dom/SimplePackage.py | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/testsuite/pyunit/dom/SimplePackage.py b/testsuite/pyunit/dom/SimplePackage.py index e519d2fb6..399a676b4 100644 --- a/testsuite/pyunit/dom/SimplePackage.py +++ b/testsuite/pyunit/dom/SimplePackage.py @@ -30,34 +30,34 @@ # # SPDX-License-Identifier: GPL-2.0-or-later # ============================================================================ -from pathlib import Path +from pathlib import Path from unittest import TestCase -from pyGHDL.dom.NonStandard import Design, Document +from pyGHDL.dom.NonStandard import Design, Document if __name__ == "__main__": - print("ERROR: you called a testcase declaration file as an executable module.") - print("Use: 'python -m unitest <testcase module>'") - exit(1) + print("ERROR: you called a testcase declaration file as an executable module.") + print("Use: 'python -m unitest <testcase module>'") + exit(1) class SimplePackage(TestCase): - _root = Path(__file__).resolve().parent.parent - _filename : Path = _root / "SimplePackage.vhdl" + _root = Path(__file__).resolve().parent.parent + _filename: Path = _root / "SimplePackage.vhdl" - def test_Package(self): - design = Design() - document = Document(self._filename) - design.Documents.append(document) + def test_Package(self): + design = Design() + document = Document(self._filename) + design.Documents.append(document) - self.assertEqual(len(design.Documents[0].Packages), 1) - self.assertTrue(design.Documents[0].Packages[0].Name == "pack_1") + self.assertEqual(len(design.Documents[0].Packages), 1) + self.assertTrue(design.Documents[0].Packages[0].Name == "pack_1") - def test_PackageBody(self): - design = Design() - document = Document(self._filename) - design.Documents.append(document) + def test_PackageBody(self): + design = Design() + document = Document(self._filename) + design.Documents.append(document) - self.assertEqual(len(design.Documents[0].PackageBodies), 1) - self.assertTrue(design.Documents[0].PackageBodies[0].Name == "pack_1") + self.assertEqual(len(design.Documents[0].PackageBodies), 1) + self.assertTrue(design.Documents[0].PackageBodies[0].Name == "pack_1") |