Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
IPDSnelting
mjtest
Commits
9a47ba64
Commit
9a47ba64
authored
Nov 09, 2016
by
Johannes Bechberger
Browse files
Moved some semantic test cases into syntax folder
parent
ce8ea9af
Changes
1
Hide whitespace changes
Inline
Side-by-side
mjtest/test/syntax_tests.py
View file @
9a47ba64
import
shutil
import
shutil
from
mjtest.environment
import
Environment
,
TestMode
from
mjtest.environment
import
Environment
,
TestMode
,
TEST_MODES
from
mjtest.test.tests
import
TestCase
,
BasicTestResult
from
mjtest.test.tests
import
TestCase
,
BasicTestResult
from
os
import
path
from
os
import
path
...
@@ -11,8 +11,10 @@ class BasicSyntaxTest(TestCase):
...
@@ -11,8 +11,10 @@ class BasicSyntaxTest(TestCase):
def
__init__
(
self
,
env
:
Environment
,
type
:
str
,
file
:
str
):
def
__init__
(
self
,
env
:
Environment
,
type
:
str
,
file
:
str
):
super
().
__init__
(
env
,
type
,
file
)
super
().
__init__
(
env
,
type
,
file
)
self
.
_should_succeed
=
not
file
.
endswith
(
".invalid.mj"
)
if
type
!=
self
.
MODE
and
TEST_MODES
.
index
(
type
)
>
TEST_MODES
.
index
(
self
.
MODE
):
self
.
_should_succeed
=
True
else
:
self
.
_should_succeed
=
not
file
.
endswith
(
".invalid.mj"
)
def
should_succeed
(
self
)
->
bool
:
def
should_succeed
(
self
)
->
bool
:
return
self
.
_should_succeed
return
self
.
_should_succeed
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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