diff options
author | Patrick Lehmann <Patrick.Lehmann@plc2.de> | 2020-12-29 00:26:19 +0100 |
---|---|---|
committer | Patrick Lehmann <Patrick.Lehmann@plc2.de> | 2020-12-29 00:26:19 +0100 |
commit | 9e991938ae1f0ad188ce33f73c51b1c9d4354589 (patch) | |
tree | 07ed9a95592f0627d2784c9c77a3be94fa471094 /testsuite/pyunit/dom | |
parent | 3e6c7275d2c48e4aa56a6dc1cec536250c1e95fd (diff) | |
download | ghdl-9e991938ae1f0ad188ce33f73c51b1c9d4354589.tar.gz ghdl-9e991938ae1f0ad188ce33f73c51b1c9d4354589.tar.bz2 ghdl-9e991938ae1f0ad188ce33f73c51b1c9d4354589.zip |
Made path to VHDL files relative to the testcase.
Diffstat (limited to 'testsuite/pyunit/dom')
-rw-r--r-- | testsuite/pyunit/dom/SimpleEntity.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/testsuite/pyunit/dom/SimpleEntity.py b/testsuite/pyunit/dom/SimpleEntity.py index a8caf9e6f..2f65c9813 100644 --- a/testsuite/pyunit/dom/SimpleEntity.py +++ b/testsuite/pyunit/dom/SimpleEntity.py @@ -11,7 +11,8 @@ if __name__ == "__main__": class SimpleEntity(TestCase): - _path: Path = Path("testsuite/pyunit/SimpleEntity.vhdl") + _root = Path(__file__).resolve().parent.parent + _filename : Path = _root / "SimpleEntity.vhdl" def test_Design(self): design = Design() @@ -23,14 +24,14 @@ class SimpleEntity(TestCase): def test_Document(self): design = Design() - document = Document(self._path) + document = Document(self._filename) design.Documents.append(document) self.assertTrue(len(design.Documents) == 1) def test_Entity(self): design = Design() - document = Document(self._path) + document = Document(self._filename) design.Documents.append(document) self.assertEqual(len(design.Documents[0].Entities), 1) @@ -38,7 +39,7 @@ class SimpleEntity(TestCase): def test_Architecture(self): design = Design() - document = Document(self._path) + document = Document(self._filename) design.Documents.append(document) self.assertEqual(len(design.Documents[0].Architectures), 1) |