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
ad1b4703
Commit
ad1b4703
authored
6 years ago
by
Stefano Borini
Browse files
Options
Downloads
Patches
Plain Diff
py27 compat
parent
481ce0b8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!108
Introduced log file option
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
force_bdss/cli/tests/test_execution.py
+6
-4
6 additions, 4 deletions
force_bdss/cli/tests/test_execution.py
force_bdss/tests/test_core_evaluation_driver.py
+15
-7
15 additions, 7 deletions
force_bdss/tests/test_core_evaluation_driver.py
with
21 additions
and
11 deletions
force_bdss/cli/tests/test_execution.py
+
6
−
4
View file @
ad1b4703
...
...
@@ -3,6 +3,8 @@ import subprocess
import
os
from
contextlib
import
contextmanager
import
six
from
force_bdss.tests
import
fixtures
...
...
@@ -43,16 +45,16 @@ class TestExecution(unittest.TestCase):
with
self
.
assertRaises
(
subprocess
.
CalledProcessError
):
subprocess
.
check_call
(
[
"
force_bdss
"
,
"
test_csv_v2.json
"
],
stdout
=
subprocess
.
DEVNULL
,
stderr
=
subprocess
.
DEVNULL
)
stdout
=
os
.
devnull
,
stderr
=
os
.
devnull
)
def
test_corrupted_file_input
(
self
):
with
cd
(
fixtures
.
dirpath
()):
with
self
.
assertRaises
(
subprocess
.
CalledProcessError
):
subprocess
.
check_call
(
[
"
force_bdss
"
,
"
test_csv_corrupted.json
"
],
stdout
=
subprocess
.
DEVNULL
,
stderr
=
subprocess
.
DEVNULL
)
stdout
=
os
.
devnull
,
stderr
=
os
.
devnull
)
if
__name__
==
'
__main__
'
:
...
...
This diff is collapsed.
Click to expand it.
force_bdss/tests/test_core_evaluation_driver.py
+
15
−
7
View file @
ad1b4703
import
unittest
import
testfixtures
import
six
from
force_bdss.tests.probe_classes.factory_registry_plugin
import
\
ProbeFactoryRegistryPlugin
...
...
@@ -49,7 +50,8 @@ class TestCoreEvaluationDriver(unittest.TestCase):
driver
=
CoreEvaluationDriver
(
application
=
self
.
mock_application
)
with
testfixtures
.
LogCapture
():
with
self
.
assertRaisesRegex
(
with
six
.
assertRaisesRegex
(
self
,
RuntimeError
,
"
The number of data values returned by the MCO
"
):
driver
.
application_started
()
...
...
@@ -66,7 +68,8 @@ class TestCoreEvaluationDriver(unittest.TestCase):
driver
=
CoreEvaluationDriver
(
application
=
self
.
mock_application
)
with
testfixtures
.
LogCapture
():
with
self
.
assertRaisesRegex
(
with
six
.
assertRaisesRegex
(
self
,
RuntimeError
,
"
The number of data values \(1 values\)
"
"
returned by
'
test_data_source
'
does not match
"
...
...
@@ -87,7 +90,8 @@ class TestCoreEvaluationDriver(unittest.TestCase):
application
=
self
.
mock_application
,
)
with
testfixtures
.
LogCapture
():
with
self
.
assertRaisesRegex
(
with
six
.
assertRaisesRegex
(
self
,
RuntimeError
,
"
The number of data values \(1 values\)
"
"
returned by
'
test_data_source
'
does not match
"
...
...
@@ -107,7 +111,8 @@ class TestCoreEvaluationDriver(unittest.TestCase):
application
=
self
.
mock_application
,
)
with
testfixtures
.
LogCapture
():
with
self
.
assertRaisesRegex
(
with
six
.
assertRaisesRegex
(
self
,
RuntimeError
,
"
The number of data values \(1 values\)
"
"
returned by
'
test_kpi_calculator
'
does not match
"
...
...
@@ -130,7 +135,8 @@ class TestCoreEvaluationDriver(unittest.TestCase):
)
with
testfixtures
.
LogCapture
():
with
self
.
assertRaisesRegex
(
with
six
.
assertRaisesRegex
(
self
,
RuntimeError
,
"
The number of data values \(1 values\)
"
"
returned by
'
test_kpi_calculator
'
does not match
"
...
...
@@ -164,7 +170,8 @@ class TestCoreEvaluationDriver(unittest.TestCase):
)
with
testfixtures
.
LogCapture
():
with
self
.
assertRaisesRegex
(
with
six
.
assertRaisesRegex
(
self
,
RuntimeError
,
"
The length of the slots is not equal to the length of
"
"
the slot map
"
):
...
...
@@ -177,7 +184,8 @@ class TestCoreEvaluationDriver(unittest.TestCase):
)
with
testfixtures
.
LogCapture
():
with
self
.
assertRaisesRegex
(
with
six
.
assertRaisesRegex
(
self
,
RuntimeError
,
"
Unable to find requested name
'
blap
'
in available
"
"
data values.
"
):
...
...
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