Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
uqdwn
mjtest
Commits
793f4012
Commit
793f4012
authored
Dec 31, 2016
by
Johannes Bechberger
Browse files
Fix regression bug
parent
324ff7b8
Changes
2
Hide whitespace changes
Inline
Side-by-side
mjtest/environment.py
View file @
793f4012
...
...
@@ -168,7 +168,7 @@ class Environment:
}[
mode
]
cmd
=
[
self
.
mj_run_cmd
]
if
mode_flag
:
cmd
.
append
(
mode
)
cmd
.
append
(
mode
_flag
)
cmd
.
extend
(
list
(
args
))
return
execute
(
cmd
,
timeout
=
timeout
or
self
.
timeout
)
...
...
mjtest/test/tests.py
View file @
793f4012
...
...
@@ -339,7 +339,7 @@ class ExtensibleTestResult(TestResult):
Checks for "error" string
"""
self
.
_contains_error_str
=
self
.
_contains_error_str
and
error_output
is
not
None
and
"error"
in
error_output
self
.
messages
.
append
(
TestResultMessage
(
title
,
c
))
self
.
messages
.
append
(
TestResultMessage
(
title
,
self
.
_contains_error_str
))
def
add_long_text
(
self
,
title
:
str
,
content
:
str
,
with_line_numbers
:
bool
=
True
):
self
.
messages
.
append
(
TestResultMessage
(
title
,
content
,
multiline
=
True
,
with_line_numbers
=
with_line_numbers
))
...
...
@@ -544,8 +544,8 @@ class DiffTest(TestCase):
OUTPUT_FILE_ENDING
=
".out"
MODE
=
TestMode
.
ast
def
__init__
(
self
,
env
:
Environment
,
type
:
str
,
file
:
str
,
preprocessed_file
:
str
):
super
().
__init__
(
env
,
type
,
file
,
preprocessed_file
)
def
__init__
(
self
,
env
:
Environment
,
type
:
str
,
file
:
str
,
preprocessed_file
:
str
,
log_file_mode
):
super
().
__init__
(
env
,
type
,
file
,
preprocessed_file
,
log_file_mode
)
self
.
_should_succeed
=
not
file
.
endswith
(
".invalid.mj"
)
self
.
_expected_output_file
=
file
+
self
.
OUTPUT_FILE_ENDING
self
.
_has_expected_output_file
=
exists
(
self
.
_expected_output_file
)
...
...
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