In January 2021 we will introduce a 10 GB quota for project repositories. Higher limits for individual projects will be available on request. Please see https://doku.lrz.de/display/PUBLIC/GitLab for more information.

Commit 8e138c75 authored by di68kap's avatar di68kap

- test_dhparser.py: windows bugfix

parent 060c83bb
...@@ -48,7 +48,7 @@ def read_template(template_name: str) -> str: ...@@ -48,7 +48,7 @@ def read_template(template_name: str) -> str:
Reads a script-template from a template file named `template_name` Reads a script-template from a template file named `template_name`
in the template-directory and returns it as a string. in the template-directory and returns it as a string.
""" """
with open(os.path.join(templatedir, template_name), 'r') as f: with open(os.path.join(templatedir, template_name), 'r', encoding='utf-8') as f:
return f.read() return f.read()
......
...@@ -32,7 +32,7 @@ def recompile_grammar(grammar_src, force): ...@@ -32,7 +32,7 @@ def recompile_grammar(grammar_src, force):
notify=lambda: print('recompiling ' + grammar_src)): notify=lambda: print('recompiling ' + grammar_src)):
print('\nErrors while recompiling "%s":' % grammar_src + print('\nErrors while recompiling "%s":' % grammar_src +
'\n--------------------------------------\n\n') '\n--------------------------------------\n\n')
with open('{name}_ebnf_ERRORS.txt') as f: with open('{name}_ebnf_ERRORS.txt', encoding='utf-8') as f:
print(f.read()) print(f.read())
sys.exit(1) sys.exit(1)
......
...@@ -60,7 +60,7 @@ class TestDHParserCommandLineTool: ...@@ -60,7 +60,7 @@ class TestDHParserCommandLineTool:
os.remove('testdata/neu/example.xml') os.remove('testdata/neu/example.xml')
# test server # test server
os.system(self.python + 'testdata/neu/neuServer.py --stopserver') os.system(self.python + 'testdata/neu/neuServer.py --stopserver' + self.nulldevice)
os.system(self.python + 'testdata/neu/neuServer.py testdata/neu/example.dsl ' os.system(self.python + 'testdata/neu/neuServer.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:
...@@ -68,6 +68,8 @@ class TestDHParserCommandLineTool: ...@@ -68,6 +68,8 @@ class TestDHParserCommandLineTool:
assert json.find('document') >= 0, json assert json.find('document') >= 0, json
os.system(self.python + 'testdata/neu/neuServer.py testdata/neu/example.dsl ' os.system(self.python + 'testdata/neu/neuServer.py testdata/neu/example.dsl '
'>testdata/neu/example.xml') '>testdata/neu/example.xml')
os.system(self.python + 'testdata/neu/neuServer.py --stopserver' + self.nulldevice)
pass
......
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