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
8a417fa2
Commit
8a417fa2
authored
7 years ago
by
martinRenou
Browse files
Options
Downloads
Patches
Plain Diff
Fix tests
parent
d58acff0
No related branches found
No related tags found
1 merge request
!101
Create probe classes for tests
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
force_bdss/tests/test_core_evaluation_driver.py
+0
-1
0 additions, 1 deletion
force_bdss/tests/test_core_evaluation_driver.py
force_bdss/tests/test_core_mco_driver.py
+8
-8
8 additions, 8 deletions
force_bdss/tests/test_core_mco_driver.py
with
8 additions
and
9 deletions
force_bdss/tests/test_core_evaluation_driver.py
+
0
−
1
View file @
8a417fa2
...
...
@@ -7,7 +7,6 @@ from force_bdss.tests.probe_classes.data_source import ProbeDataSourceFactory
from
force_bdss.tests.probe_classes.kpi_calculator
import
(
ProbeKPICalculatorFactory
)
from
force_bdss.core.input_slot_map
import
InputSlotMap
from
force_bdss.core.data_value
import
DataValue
from
force_bdss.core.slot
import
Slot
...
...
This diff is collapsed.
Click to expand it.
force_bdss/tests/test_core_mco_driver.py
+
8
−
8
View file @
8a417fa2
import
unittest
from
testfixtures
import
LogCapture
from
force_bdss.tests.probe_classes.factory_registry_plugin
import
\
ProbeFactoryRegistryPlugin
from
force_bdss.core_driver_events
import
(
MCOStartEvent
,
MCOFinishEvent
,
MCOProgressEvent
)
from
force_bdss.notification_listeners.base_notification_listener
import
\
BaseNotificationListener
from
force_bdss.tests
import
fixtures
from
force_bdss.tests.test_core_evaluation_driver
import
\
mock_factory_registry_plugin
try
:
import
mock
...
...
@@ -21,10 +21,10 @@ from force_bdss.core_mco_driver import CoreMCODriver
class
TestCoreMCODriver
(
unittest
.
TestCase
):
def
setUp
(
self
):
self
.
mock_
factory_registry_plugin
=
mock_f
actory
_r
egistry
_p
lugin
()
self
.
factory_registry_plugin
=
ProbeF
actory
R
egistry
P
lugin
()
application
=
mock
.
Mock
(
spec
=
Application
)
application
.
get_plugin
=
mock
.
Mock
(
return_value
=
self
.
mock_
factory_registry_plugin
return_value
=
self
.
factory_registry_plugin
)
application
.
workflow_filepath
=
fixtures
.
get
(
"
test_null.json
"
)
self
.
mock_application
=
application
...
...
@@ -84,7 +84,7 @@ class TestCoreMCODriver(unittest.TestCase):
driver
=
CoreMCODriver
(
application
=
self
.
mock_application
,
)
registry
=
self
.
mock_
factory_registry_plugin
registry
=
self
.
factory_registry_plugin
factory
=
registry
.
notification_listener_factories
[
0
]
mock_create_listener
=
mock
.
Mock
()
mock_listener
=
mock
.
Mock
(
spec
=
BaseNotificationListener
)
...
...
@@ -99,7 +99,7 @@ class TestCoreMCODriver(unittest.TestCase):
(
"
force_bdss.core_mco_driver
"
,
"
ERROR
"
,
"
Failed to create or initialize listener with id
"
"
force.bdss.enthought.factory.
null
_nl:
"
))
"
force.bdss.enthought.factory.
test
_nl:
"
))
self
.
assertEqual
(
len
(
listeners
),
0
)
...
...
@@ -119,7 +119,7 @@ class TestCoreMCODriver(unittest.TestCase):
(
"
force_bdss.core_mco_driver
"
,
"
ERROR
"
,
"
Exception while delivering to listener
"
"
Null
NotificationListener:
"
))
"
Probe
NotificationListener:
"
))
def
test_finalize_error
(
self
):
driver
=
CoreMCODriver
(
...
...
@@ -138,4 +138,4 @@ class TestCoreMCODriver(unittest.TestCase):
(
"
force_bdss.core_mco_driver
"
,
"
ERROR
"
,
"
Exception while finalizing listener
"
"
Null
NotificationListener:
"
))
"
Probe
NotificationListener:
"
))
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