Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
badw-it
DHParser
Commits
9d0e948f
Commit
9d0e948f
authored
Apr 02, 2019
by
di68kap
Browse files
- small bugfixes in doctests and unit-tests
parent
a6d83e6f
Changes
3
Hide whitespace changes
Inline
Side-by-side
DHParser/syntaxtree.py
View file @
9d0e948f
...
...
@@ -449,7 +449,7 @@ class Node: # (collections.abc.Sized): Base class omitted for cython-compatibil
OrderedDict([('id', 'identificator')])
>>> node.attr['id']
'identificator'
>>> del node['id']
>>> del node
.attr
['id']
>>> node.attr
OrderedDict()
...
...
README.md
View file @
9d0e948f
...
...
@@ -27,7 +27,7 @@ License
DHParser is open source software under the
[
Apache 2.0 License
](
https://www.apache.org/licenses/LICENSE-2.0
)
.
Copyright 2016-201
8
Eckhart Arnold, Bavarian Academy of Sciences and Humanities
Copyright 2016-201
9
Eckhart Arnold, Bavarian Academy of Sciences and Humanities
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
...
...
@@ -172,7 +172,10 @@ parsing process will be stored in a sub-directory named "LOG".
Introduction
------------
see
[
Introduction.md
](
https://gitlab.lrz.de/badw-it/DHParser/blob/master/Introduction.md
)
See
[
Introduction.md
](
https://gitlab.lrz.de/badw-it/DHParser/blob/master/Introduction.md
)
for the
motivation and an overview how DHParser works or jump right into the
[
Step by Step Guide
](
https://gitlab.lrz.de/badw-it/DHParser/blob/master/documentation_src/StepByStepGuide.rst
)
to
learn how to setup and use DHParser.
References and Acknowledment
...
...
test/test_dhparser.py
View file @
9d0e948f
...
...
@@ -35,6 +35,8 @@ class TestDHParserCommandLineTool:
os
.
chdir
(
scriptdir
)
if
not
os
.
path
.
exists
(
'testdata'
):
os
.
mkdir
(
'testdata'
)
self
.
nulldevice
=
" >/dev/null"
if
platform
.
system
()
!=
"Windows"
else
" > NUL"
self
.
python
=
'python3 '
if
os
.
system
(
'python3 -V'
+
self
.
nulldevice
)
==
0
else
'python '
def
teardown
(
self
):
if
os
.
path
.
exists
(
'testdata/neu'
)
and
os
.
path
.
isdir
(
'testdata/neu'
):
...
...
@@ -44,10 +46,9 @@ class TestDHParserCommandLineTool:
os
.
chdir
(
self
.
cwd
)
def
test_dhparser
(
self
):
nulldevice
=
" >/dev/null"
if
platform
.
system
()
!=
"Windows"
else
" > NUL"
os
.
system
(
'python3 ../scripts/dhparser.py testdata/neu '
+
nulldevice
)
os
.
system
(
'python3 testdata/neu/tst_neu_grammar.py '
+
nulldevice
)
os
.
system
(
'python3 testdata/neu/neuCompiler.py testdata/neu/example.dsl '
os
.
system
(
self
.
python
+
'../scripts/dhparser.py testdata/neu '
+
self
.
nulldevice
)
os
.
system
(
self
.
python
+
'testdata/neu/tst_neu_grammar.py '
+
self
.
nulldevice
)
os
.
system
(
self
.
python
+
'testdata/neu/neuCompiler.py testdata/neu/example.dsl '
'>testdata/neu/example.xml'
)
with
open
(
'testdata/neu/example.xml'
,
'r'
,
encoding
=
'utf-8'
)
as
f
:
xml
=
f
.
read
()
...
...
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