aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/pyunit/dom
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/pyunit/dom')
-rw-r--r--testsuite/pyunit/dom/Expressions.py2
-rw-r--r--testsuite/pyunit/dom/Literals.py12
-rw-r--r--testsuite/pyunit/dom/SimpleEntity.py10
-rw-r--r--testsuite/pyunit/dom/SimplePackage.py8
4 files changed, 16 insertions, 16 deletions
diff --git a/testsuite/pyunit/dom/Expressions.py b/testsuite/pyunit/dom/Expressions.py
index 175ff9cdd..113e541ac 100644
--- a/testsuite/pyunit/dom/Expressions.py
+++ b/testsuite/pyunit/dom/Expressions.py
@@ -89,7 +89,7 @@ class Expressions(TestCase):
# Start checks
self.assertIsInstance(default, InverseExpression)
self.assertIsInstance(default.Operand, SimpleObjectOrFunctionCallSymbol)
- self.assertEqual(str(default.Operand.SymbolName), "true")
+ self.assertEqual("true", str(default.Operand.SymbolName))
# def test_AbsExpression(self):
# filename: Path = self._root / "{className}_{funcName}.vhdl".format(
diff --git a/testsuite/pyunit/dom/Literals.py b/testsuite/pyunit/dom/Literals.py
index f54f7484b..60938c52e 100644
--- a/testsuite/pyunit/dom/Literals.py
+++ b/testsuite/pyunit/dom/Literals.py
@@ -72,14 +72,14 @@ class Literals(TestCase):
document = Document(self._filename)
design.Documents.append(document)
- self.assertEqual(len(design.Documents[0].Packages), 1)
+ self.assertEqual(1, len(design.Documents[0].Packages))
package = design.Documents[0].Packages[0]
- self.assertEqual(package.Identifier, "package_1")
- self.assertEqual(len(package.DeclaredItems), len(expected))
+ self.assertEqual("package_1", package.Identifier)
+ self.assertEqual(len(expected), len(package.DeclaredItems))
for i in range(len(expected)):
item: Constant = package.DeclaredItems[i]
self.assertIsInstance(item, Constant)
- self.assertEqual(item.Identifier, "c{}".format(i))
- self.assertEqual(str(item.SubType.SymbolName), "integer")
+ self.assertEqual("c{}".format(i), item.Identifier)
+ self.assertEqual("integer", str(item.Subtype.SymbolName))
self.assertIsInstance(item.DefaultExpression, IntegerLiteral)
- self.assertEqual(item.DefaultExpression.Value, expected[i])
+ self.assertEqual(expected[i], item.DefaultExpression.Value)
diff --git a/testsuite/pyunit/dom/SimpleEntity.py b/testsuite/pyunit/dom/SimpleEntity.py
index 657e8abeb..68f702410 100644
--- a/testsuite/pyunit/dom/SimpleEntity.py
+++ b/testsuite/pyunit/dom/SimpleEntity.py
@@ -59,20 +59,20 @@ class SimpleEntity(TestCase):
document = Document(self._filename)
design.Documents.append(document)
- self.assertEqual(len(design.Documents), 1)
+ self.assertEqual(1, len(design.Documents))
def test_Entity(self):
design = Design()
document = Document(self._filename)
design.Documents.append(document)
- self.assertEqual(len(design.Documents[0].Entities), 1)
- self.assertEqual(design.Documents[0].Entities[0].Identifier, "entity_1")
+ self.assertEqual(1, len(design.Documents[0].Entities))
+ self.assertEqual("entity_1", design.Documents[0].Entities[0].Identifier)
def test_Architecture(self):
design = Design()
document = Document(self._filename)
design.Documents.append(document)
- self.assertEqual(len(design.Documents[0].Architectures), 1)
- self.assertEqual(design.Documents[0].Architectures[0].Identifier, "behav")
+ self.assertEqual(1, len(design.Documents[0].Architectures))
+ self.assertEqual("behav", design.Documents[0].Architectures[0].Identifier)
diff --git a/testsuite/pyunit/dom/SimplePackage.py b/testsuite/pyunit/dom/SimplePackage.py
index d107d7206..9c62db4a1 100644
--- a/testsuite/pyunit/dom/SimplePackage.py
+++ b/testsuite/pyunit/dom/SimplePackage.py
@@ -51,13 +51,13 @@ class SimplePackage(TestCase):
document = Document(self._filename)
design.Documents.append(document)
- self.assertEqual(len(design.Documents[0].Packages), 1)
- self.assertEqual(design.Documents[0].Packages[0].Identifier, "pack_1")
+ self.assertEqual(1, len(design.Documents[0].Packages))
+ self.assertEqual("pack_1", design.Documents[0].Packages[0].Identifier)
def test_PackageBody(self):
design = Design()
document = Document(self._filename)
design.Documents.append(document)
- self.assertEqual(len(design.Documents[0].PackageBodies), 1)
- self.assertEqual(design.Documents[0].PackageBodies[0].Identifier, "pack_1")
+ self.assertEqual(1, len(design.Documents[0].PackageBodies))
+ self.assertEqual("pack_1", design.Documents[0].PackageBodies[0].Identifier)