aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/pyunit/dom/Expressions.py
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/pyunit/dom/Expressions.py')
-rw-r--r--testsuite/pyunit/dom/Expressions.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/testsuite/pyunit/dom/Expressions.py b/testsuite/pyunit/dom/Expressions.py
index fe9bf22eb..24235e1e1 100644
--- a/testsuite/pyunit/dom/Expressions.py
+++ b/testsuite/pyunit/dom/Expressions.py
@@ -34,7 +34,7 @@ import ctypes
from inspect import currentframe
from pathlib import Path
from textwrap import dedent
-from typing import TypeVar, Dict
+from typing import TypeVar, Dict, cast
from unittest import TestCase
@@ -84,12 +84,10 @@ class Expressions(TestCase):
return default
def test_NotExpression(self):
- filename: Path = self._root / "{className}_{funcName}.vhdl".format(
- className=self.__class__.__name__, funcName= currentframe().f_code.co_name[5:]
- )
+ filename: Path = self._root / f"{self.__class__.__name__}_{currentframe().f_code.co_name[5:]}.vhdl"
# Define test data
- constantDeclartion = "constant c0 : boolean := not true;"
+ constantDeclartion = "constant c0 : boolean := not True;"
# Parse in-memory
default: Expression = self.parse(filename, constantDeclartion)
@@ -97,7 +95,7 @@ class Expressions(TestCase):
# Start checks
self.assertIsInstance(default, InverseExpression)
self.assertIsInstance(default.Operand, SimpleObjectOrFunctionCallSymbol)
- self.assertEqual("true", str(default.Operand)) # .SymbolName)) # XXX: hacked
+ self.assertEqual("True", cast(SimpleObjectOrFunctionCallSymbol, default.Operand).Name.Identifier)
# def test_AbsExpression(self):
# filename: Path = self._root / "{className}_{funcName}.vhdl".format(