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
e5c3a696
Commit
e5c3a696
authored
Nov 02, 2017
by
di68kap
Browse files
- test_toolkit.py: 'tmp' directory is not assumed to exist already
parent
990282ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/test_dsl.py
View file @
e5c3a696
...
...
@@ -61,7 +61,7 @@ class TestCompilerGeneration:
word = /\w+/
WSPC = /\s+/
"""
tmp
=
'tmp/'
if
os
.
path
.
isdir
(
'tmp'
)
else
(
'
test/
tmp/'
)
tmp
=
'
test/
tmp/'
if
os
.
path
.
isdir
(
'
test/
tmp
/
'
)
else
(
'tmp/'
)
trivial_text
=
u
"""Es war ein Koenig in Thule.
\n
"""
grammar_name
=
tmp
+
"TestCompilerGeneration.ebnf"
compiler_name
=
tmp
+
"TestCompilerGenerationCompiler.py"
...
...
@@ -69,6 +69,8 @@ class TestCompilerGeneration:
result_name
=
tmp
+
"TestCompilerGeneration_text.xml"
def
setup
(
self
):
if
not
os
.
path
.
exists
(
self
.
tmp
):
os
.
mkdir
(
self
.
tmp
)
with
open
(
self
.
grammar_name
,
"w"
)
as
f
:
f
.
write
(
self
.
trivial_lang
)
with
open
(
self
.
text_name
,
"w"
)
as
f
:
...
...
@@ -88,6 +90,8 @@ class TestCompilerGeneration:
flag
=
True
if
not
flag
:
os
.
rmdir
(
'LOGS'
)
if
os
.
path
.
exists
(
self
.
tmp
):
os
.
rmdir
(
self
.
tmp
)
def
test_load_compiler_suite
(
self
):
...
...
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