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
ce8ea9af
Commit
ce8ea9af
authored
Nov 09, 2016
by
Johannes Bechberger
Browse files
Add more semantic tests and fix test runner
parent
661814a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
mjtest/test/tests.py
View file @
ce8ea9af
...
@@ -63,7 +63,7 @@ class TestSuite:
...
@@ -63,7 +63,7 @@ class TestSuite:
m
in
TestMode
.
USE_TESTS_OF_OTHER
[
self
.
env
.
mode
]:
m
in
TestMode
.
USE_TESTS_OF_OTHER
[
self
.
env
.
mode
]:
m
=
self
.
env
.
mode
m
=
self
.
env
.
mode
for
file
in
sorted
(
os
.
listdir
(
dir
)):
for
file
in
sorted
(
os
.
listdir
(
dir
)):
if
not
TestCase
.
has_valid_file_ending
(
m
,
file
):
if
not
TestCase
.
has_valid_file_ending
(
self
.
env
.
mode
,
file
):
_LOG
.
debug
(
"Skip file "
+
file
)
_LOG
.
debug
(
"Skip file "
+
file
)
elif
self
.
env
.
only_incorrect_tests
and
file
in
correct_test_cases
:
elif
self
.
env
.
only_incorrect_tests
and
file
in
correct_test_cases
:
_LOG
.
info
(
"Skip file {} as its test case was executed correctly the last run"
)
_LOG
.
info
(
"Skip file {} as its test case was executed correctly the last run"
)
...
@@ -221,8 +221,8 @@ class TestCase:
...
@@ -221,8 +221,8 @@ class TestCase:
@
classmethod
@
classmethod
def
create_from_file
(
cls
,
env
:
Environment
,
mode
:
str
,
file
:
str
)
->
Optional
[
'TestCase'
]:
def
create_from_file
(
cls
,
env
:
Environment
,
mode
:
str
,
file
:
str
)
->
Optional
[
'TestCase'
]:
if
cls
.
has_valid_file_ending
(
mode
,
file
):
if
cls
.
has_valid_file_ending
(
env
.
mode
,
file
):
return
cls
.
_test_case_class_for_file
(
mode
,
file
)(
env
,
mode
,
file
)
return
cls
.
_test_case_class_for_file
(
env
.
mode
,
file
)(
env
,
mode
,
file
)
return
None
return
None
def
name
(
self
):
def
name
(
self
):
...
...
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