summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorptmcg <ptmcg@austin.rr.com>2021-08-16 00:56:27 -0500
committerptmcg <ptmcg@austin.rr.com>2021-08-16 00:56:27 -0500
commitda022671996878a9665fc9362d5f3ab2f3aa9f11 (patch)
tree7c391592698681518c74354636b73ce044c963e7 /tests
parentb816a806ec1dbcb7f6a1e8a0bfadd42afa9eb64b (diff)
downloadpyparsing-git-da022671996878a9665fc9362d5f3ab2f3aa9f11.tar.gz
Fix f-string 3.6 compat bug in test_unit.py; rename __versionTime__ to __version_time__; code cleanups
Diffstat (limited to 'tests')
-rw-r--r--tests/test_unit.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/test_unit.py b/tests/test_unit.py
index 1b44af9..07b1ae4 100644
--- a/tests/test_unit.py
+++ b/tests/test_unit.py
@@ -78,7 +78,7 @@ class Test01_PyparsingTestInit(TestCase):
def runTest(self):
from pyparsing import (
__version__ as pyparsing_version,
- __versionTime__ as pyparsing_version_time,
+ __version_time__ as pyparsing_version_time,
)
print(
@@ -1611,7 +1611,7 @@ class Test02_WithoutPackrat(ppt.TestParseResultsAsserts, TestCase):
print(quoteExpr.pattern)
print(quoteExpr.searchString(testString))
print(quoteExpr.searchString(testString)[0][0])
- print(f"{expected=}")
+ print(f"{expected}")
self.assertEqual(
expected,
quoteExpr.searchString(testString)[0][0],
@@ -1940,7 +1940,7 @@ class Test02_WithoutPackrat(ppt.TestParseResultsAsserts, TestCase):
return True
return False
- class BoolNot(BoolOperand):
+ class BoolNot:
def __init__(self, t):
self.arg = t[0][1]
@@ -2082,6 +2082,8 @@ class Test02_WithoutPackrat(ppt.TestParseResultsAsserts, TestCase):
return mult * self.tokens[1].eval()
class BinOp(ExprNode):
+ opn_map = {}
+
def eval(self):
ret = self.tokens[0].eval()
for op, operand in zip(self.tokens[1::2], self.tokens[2::2]):