Skip to content

Commit dbbd53a

Browse files
committed
More unit tests and some comments for traceability to Issue #618
1 parent f5bdb2d commit dbbd53a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/test_unit.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7893,16 +7893,27 @@ def testWordParseImpl(self):
78937893
custom_int.parse_string("z", parse_all=True)
78947894

78957895
def testWordCopyWhenWordCharsIncludeSpace(self):
7896+
# Issue #618 - with copy()
78967897
word_with_space = pp.Word(pp.alphas + " ")
78977898
word_with_space.parse_string("ABC")
7899+
# no longer raises exception
78987900
word_with_space.copy().parse_string("ABC")
78997901

79007902
def testWordCopyWhenWordCharsIncludeSpace2(self):
7903+
# Issue #618 - with DelimitedList()
79017904
element = pp.QuotedString('"') | pp.Combine(pp.Word(' abcdefghijklmnopqrstuvwxyz'))
79027905
element.parse_string("abc")
79037906
element_list = pp.DelimitedList(element)
7907+
# no longer raises exception
79047908
element_list.parse_string("abc")
79057909

7910+
def testWordCopyWhenWordCharsIncludeSpace3(self):
7911+
# Issue #618 - with results name
7912+
word_with_space = pp.Word(pp.alphas + " ")
7913+
word_with_space.parse_string("ABC")
7914+
# no longer raises exception
7915+
word_with_space("trouble").parse_string("ABC")
7916+
79067917
def testLiteralVsKeyword(self):
79077918
integer = ppc.integer
79087919
literal_expr = integer + pp.Literal("start") + integer

0 commit comments

Comments
 (0)