Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
badw-it
DHParser
Commits
b8925e22
Commit
b8925e22
authored
Apr 11, 2019
by
di68kap
Browse files
- testing.py: detect testkeys as doublette, if only difference is
the asterix-mark '*' for concrete syntax tree output
parent
f33bf518
Changes
1
Hide whitespace changes
Inline
Side-by-side
DHParser/testing.py
View file @
b8925e22
...
...
@@ -148,7 +148,8 @@ def unit_from_config(config_str):
testcode
=
'
\n
'
.
join
(
lines
)
# unit.setdefault(symbol, OD()).setdefault(stage, OD())[testkey] = testcode
test
=
unit
.
setdefault
(
symbol
,
OD
()).
setdefault
(
stage
,
OD
())
assert
testkey
not
in
test
,
"Key %s already exists in text %s:%s !"
%
(
testkey
,
stage
,
symbol
)
assert
testkey
.
strip
(
'*'
)
not
in
test
and
(
testkey
.
strip
(
'*'
)
+
'*'
)
not
in
test
,
\
"Key %s already exists in text %s:%s !"
%
(
testkey
,
stage
,
symbol
)
test
[
testkey
]
=
testcode
pos
=
eat_comments
(
cfg
,
entry_match
.
span
()[
1
])
entry_match
=
RX_ENTRY
.
match
(
cfg
,
pos
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment