Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
force-bdss
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adham Hashibon
force-bdss
Commits
0dccd4ba
Commit
0dccd4ba
authored
6 years ago
by
Stefano Borini
Browse files
Options
Downloads
Patches
Plain Diff
Silenced all output and fixed tests
parent
ad1b4703
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!108
Introduced log file option
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
force_bdss/cli/tests/test_execution.py
+8
-10
8 additions, 10 deletions
force_bdss/cli/tests/test_execution.py
with
8 additions
and
10 deletions
force_bdss/cli/tests/test_execution.py
+
8
−
10
View file @
0dccd4ba
...
...
@@ -3,8 +3,6 @@ import subprocess
import
os
from
contextlib
import
contextmanager
import
six
from
force_bdss.tests
import
fixtures
...
...
@@ -27,8 +25,10 @@ def fixture_dir():
class
TestExecution
(
unittest
.
TestCase
):
def
test_plain_invocation_mco
(
self
):
with
cd
(
fixtures
.
dirpath
()):
out
=
subprocess
.
check_call
([
"
force_bdss
"
,
"
test_empty.json
"
])
self
.
assertEqual
(
out
,
0
)
try
:
subprocess
.
check_output
([
"
force_bdss
"
,
"
test_empty.json
"
])
except
subprocess
.
CalledProcessError
:
self
.
fail
(
"
force_bdss returned error at plain invocation.
"
)
def
test_plain_invocation_evaluate
(
self
):
with
cd
(
fixtures
.
dirpath
()):
...
...
@@ -43,18 +43,16 @@ class TestExecution(unittest.TestCase):
def
test_unsupported_file_input
(
self
):
with
cd
(
fixtures
.
dirpath
()):
with
self
.
assertRaises
(
subprocess
.
CalledProcessError
):
subprocess
.
check_
call
(
subprocess
.
check_
output
(
[
"
force_bdss
"
,
"
test_csv_v2.json
"
],
stdout
=
os
.
devnull
,
stderr
=
os
.
devnull
)
stderr
=
subprocess
.
STDOUT
)
def
test_corrupted_file_input
(
self
):
with
cd
(
fixtures
.
dirpath
()):
with
self
.
assertRaises
(
subprocess
.
CalledProcessError
):
subprocess
.
check_
call
(
subprocess
.
check_
output
(
[
"
force_bdss
"
,
"
test_csv_corrupted.json
"
],
stdout
=
os
.
devnull
,
stderr
=
os
.
devnull
)
stderr
=
subprocess
.
STDOUT
)
if
__name__
==
'
__main__
'
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment