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

Commit 8ddcb9f6 authored by di68kap's avatar di68kap

- Windows compatibility bugs in test code fixed

parent 9c105b05
......@@ -2,10 +2,12 @@
"""Runs the dhparser test-suite with several installed interpreters"""
if __name__ == "__main__":
import os
import platform
import multiprocessing
import os
import platform
import sys
if __name__ == "__main__":
scriptdir = os.path.dirname(os.path.realpath(__file__))
# if os.getcwd().endswith('test'):
......@@ -15,7 +17,7 @@ if __name__ == "__main__":
if platform.system() != "Windows":
interpreters = ['python ', 'pypy3 ', 'python37 ']
else:
interpreters = [r'C:\Users\di68kap\AppData\Local\Programs\Python\Python37-32\python.exe ']
interpreters = ['python.exe ']
cwd = os.getcwd()
......
......@@ -21,6 +21,7 @@ limitations under the License.
"""
import os
import platform
import shutil
import sys
......@@ -43,8 +44,9 @@ class TestDHParserCommandLineTool:
os.chdir(self.cwd)
def test_dhparser(self):
os.system('python ../dhparser.py testdata/neu >/dev/null')
os.system('python testdata/neu/tst_neu_grammar.py >/dev/null')
nulldevice = " >/dev/null" if platform.system() != "Windows" else " > NUL"
os.system('python ../dhparser.py testdata/neu ' + nulldevice)
os.system('python testdata/neu/tst_neu_grammar.py ' + nulldevice)
os.system('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:
......
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