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:
Reads a script-template from a template file named `template_name`
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()
......
......@@ -32,7 +32,7 @@ def recompile_grammar(grammar_src, force):
notify=lambda: print('recompiling ' + grammar_src)):
print('\nErrors while recompiling "%s":' % grammar_src +
'\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())
sys.exit(1)
......
......@@ -60,7 +60,7 @@ class TestDHParserCommandLineTool:
os.remove('testdata/neu/example.xml')
# 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 '
'>testdata/neu/example.xml')
with open('testdata/neu/example.xml', 'r', encoding='utf-8') as f:
......@@ -68,6 +68,8 @@ class TestDHParserCommandLineTool:
assert json.find('document') >= 0, json
os.system(self.python + 'testdata/neu/neuServer.py testdata/neu/example.dsl '
'>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