aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/pyunit/dom/Literals.py
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-08-23 09:02:47 +0200
committerumarcor <unai.martinezcorral@ehu.eus>2021-08-23 16:35:37 +0200
commit8b98e2883b40b00922c9944c2470211ee055a9a5 (patch)
tree05a31686d247ef71cb512ac79643f3a309e72eeb /testsuite/pyunit/dom/Literals.py
parent8fb4da723067b2ff99050f9ef9fc0bbd3c835ef4 (diff)
downloadghdl-8b98e2883b40b00922c9944c2470211ee055a9a5.tar.gz
ghdl-8b98e2883b40b00922c9944c2470211ee055a9a5.tar.bz2
ghdl-8b98e2883b40b00922c9944c2470211ee055a9a5.zip
Fixes due to a bug in pyVHDLModel. Name Context was used twice.
Diffstat (limited to 'testsuite/pyunit/dom/Literals.py')
-rw-r--r--testsuite/pyunit/dom/Literals.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/testsuite/pyunit/dom/Literals.py b/testsuite/pyunit/dom/Literals.py
index febfd4294..debd401e3 100644
--- a/testsuite/pyunit/dom/Literals.py
+++ b/testsuite/pyunit/dom/Literals.py
@@ -34,7 +34,7 @@ from pathlib import Path
from textwrap import dedent
from unittest import TestCase
-from pyVHDLModel.SyntaxModel import Expression
+from pyVHDLModel.SyntaxModel import ExpressionUnion
from pyGHDL.dom.DesignUnit import Package
@@ -60,7 +60,7 @@ class Literals(TestCase):
"""
)
- def parse(self, filename: Path, code: str) -> Expression:
+ def parse(self, filename: Path, code: str) -> ExpressionUnion:
sourceCode = self._packageTemplate.format(code=code)
document = Document(filename, sourceCode)
@@ -69,7 +69,7 @@ class Literals(TestCase):
# Traverse already to default value expression
package: Package = document.Packages[0]
item: Constant = package.DeclaredItems[0]
- default: Expression = item.DefaultExpression
+ default: ExpressionUnion = item.DefaultExpression
return default
@@ -82,7 +82,7 @@ class Literals(TestCase):
expected = (0, 1, 1024, 1048576)
# Parse in-memory
- default: Expression = self.parse(_filename, constantDeclartion)
+ default: ExpressionUnion = self.parse(_filename, constantDeclartion)
self.assertIsInstance(default, IntegerLiteral)
self.assertEqual(expected[0], default.Value)