Notice to GitKraken users: A vulnerability has been found in the SSH key generation of GitKraken versions 7.6.0 to 8.0.0 (https://www.gitkraken.com/blog/weak-ssh-key-fix). If you use GitKraken and have generated a SSH key using one of these versions, please remove it both from your local workstation and from your LRZ GitLab profile.

21.10.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 9d0e948f authored by di68kap's avatar di68kap
Browse files

- small bugfixes in doctests and unit-tests

parent a6d83e6f
...@@ -449,7 +449,7 @@ class Node: # (collections.abc.Sized): Base class omitted for cython-compatibil ...@@ -449,7 +449,7 @@ class Node: # (collections.abc.Sized): Base class omitted for cython-compatibil
OrderedDict([('id', 'identificator')]) OrderedDict([('id', 'identificator')])
>>> node.attr['id'] >>> node.attr['id']
'identificator' 'identificator'
>>> del node['id'] >>> del node.attr['id']
>>> node.attr >>> node.attr
OrderedDict() OrderedDict()
......
...@@ -27,7 +27,7 @@ License ...@@ -27,7 +27,7 @@ License
DHParser is open source software under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0). DHParser is open source software under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0).
Copyright 2016-2018 Eckhart Arnold, Bavarian Academy of Sciences and Humanities Copyright 2016-2019 Eckhart Arnold, Bavarian Academy of Sciences and Humanities
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with 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". ...@@ -172,7 +172,10 @@ parsing process will be stored in a sub-directory named "LOG".
Introduction 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 References and Acknowledment
......
...@@ -35,6 +35,8 @@ class TestDHParserCommandLineTool: ...@@ -35,6 +35,8 @@ class TestDHParserCommandLineTool:
os.chdir(scriptdir) os.chdir(scriptdir)
if not os.path.exists('testdata'): if not os.path.exists('testdata'):
os.mkdir('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): def teardown(self):
if os.path.exists('testdata/neu') and os.path.isdir('testdata/neu'): if os.path.exists('testdata/neu') and os.path.isdir('testdata/neu'):
...@@ -44,10 +46,9 @@ class TestDHParserCommandLineTool: ...@@ -44,10 +46,9 @@ class TestDHParserCommandLineTool:
os.chdir(self.cwd) os.chdir(self.cwd)
def test_dhparser(self): def test_dhparser(self):
nulldevice = " >/dev/null" if platform.system() != "Windows" else " > NUL" os.system(self.python + '../scripts/dhparser.py testdata/neu ' + self.nulldevice)
os.system('python3 ../scripts/dhparser.py testdata/neu ' + nulldevice) os.system(self.python + 'testdata/neu/tst_neu_grammar.py ' + self.nulldevice)
os.system('python3 testdata/neu/tst_neu_grammar.py ' + nulldevice) os.system(self.python + 'testdata/neu/neuCompiler.py testdata/neu/example.dsl '
os.system('python3 testdata/neu/neuCompiler.py testdata/neu/example.dsl '
'>testdata/neu/example.xml') '>testdata/neu/example.xml')
with open('testdata/neu/example.xml', 'r', encoding='utf-8') as f: with open('testdata/neu/example.xml', 'r', encoding='utf-8') as f:
xml = f.read() xml = f.read()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment