Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MLAir
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
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
esde
machine-learning
MLAir
Commits
b96f652f
Commit
b96f652f
authored
4 years ago
by
lukas leufen
Browse files
Options
Downloads
Patches
Plain Diff
better test cleanup
parent
766f8d04
No related branches found
No related tags found
4 merge requests
!136
update release branch
,
!135
Release v0.11.0
,
!134
MLAir is decoupled from join
,
!119
Resolve "Include advanced data handling in workflow"
Pipeline
#43670
passed
4 years ago
Stage: test
Stage: docs
Stage: pages
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test_run_modules/test_partition_check.py
+4
-3
4 additions, 3 deletions
test/test_run_modules/test_partition_check.py
with
4 additions
and
3 deletions
test/test_run_modules/test_partition_check.py
+
4
−
3
View file @
b96f652f
...
@@ -5,7 +5,6 @@ import mock
...
@@ -5,7 +5,6 @@ import mock
from
mlair.run_modules.experiment_setup
import
ExperimentSetup
from
mlair.run_modules.experiment_setup
import
ExperimentSetup
from
mlair.run_modules.partition_check
import
PartitionCheck
from
mlair.run_modules.partition_check
import
PartitionCheck
from
mlair.run_modules.run_environment
import
RunEnvironment
from
mlair.run_modules.run_environment
import
RunEnvironment
from
mlair.configuration
import
get_host
class
TestPartitionCheck
:
class
TestPartitionCheck
:
...
@@ -24,6 +23,7 @@ class TestPartitionCheck:
...
@@ -24,6 +23,7 @@ class TestPartitionCheck:
@mock.patch
(
"
os.path.exists
"
,
return_value
=
False
)
@mock.patch
(
"
os.path.exists
"
,
return_value
=
False
)
@mock.patch
(
"
os.makedirs
"
,
side_effect
=
None
)
@mock.patch
(
"
os.makedirs
"
,
side_effect
=
None
)
def
obj_with_exp_setup_login
(
self
,
mock_host
,
mock_user
,
mock_path
,
mock_check
):
def
obj_with_exp_setup_login
(
self
,
mock_host
,
mock_user
,
mock_path
,
mock_check
):
RunEnvironment
().
__del__
()
ExperimentSetup
(
stations
=
[
'
DEBW107
'
,
'
DEBY081
'
,
'
DEBW013
'
,
'
DEBW076
'
,
'
DEBW087
'
,
'
DEBW001
'
],
ExperimentSetup
(
stations
=
[
'
DEBW107
'
,
'
DEBY081
'
,
'
DEBW013
'
,
'
DEBW076
'
,
'
DEBW087
'
,
'
DEBW001
'
],
statistics_per_var
=
{
'
o3
'
:
'
dma8eu
'
,
'
temp
'
:
'
maximum
'
},
station_type
=
"
background
"
)
statistics_per_var
=
{
'
o3
'
:
'
dma8eu
'
,
'
temp
'
:
'
maximum
'
},
station_type
=
"
background
"
)
pre
=
object
.
__new__
(
PartitionCheck
)
pre
=
object
.
__new__
(
PartitionCheck
)
...
@@ -37,6 +37,7 @@ class TestPartitionCheck:
...
@@ -37,6 +37,7 @@ class TestPartitionCheck:
@mock.patch
(
"
os.path.exists
"
,
return_value
=
False
)
@mock.patch
(
"
os.path.exists
"
,
return_value
=
False
)
@mock.patch
(
"
os.makedirs
"
,
side_effect
=
None
)
@mock.patch
(
"
os.makedirs
"
,
side_effect
=
None
)
def
obj_with_exp_setup_compute
(
self
,
mock_host
,
mock_user
,
mock_path
,
mock_check
):
def
obj_with_exp_setup_compute
(
self
,
mock_host
,
mock_user
,
mock_path
,
mock_check
):
RunEnvironment
().
__del__
()
ExperimentSetup
(
stations
=
[
'
DEBW107
'
,
'
DEBY081
'
,
'
DEBW013
'
,
'
DEBW076
'
,
'
DEBW087
'
,
'
DEBW001
'
],
ExperimentSetup
(
stations
=
[
'
DEBW107
'
,
'
DEBY081
'
,
'
DEBW013
'
,
'
DEBW076
'
,
'
DEBW087
'
,
'
DEBW001
'
],
statistics_per_var
=
{
'
o3
'
:
'
dma8eu
'
,
'
temp
'
:
'
maximum
'
},
station_type
=
"
background
"
)
statistics_per_var
=
{
'
o3
'
:
'
dma8eu
'
,
'
temp
'
:
'
maximum
'
},
station_type
=
"
background
"
)
pre
=
object
.
__new__
(
PartitionCheck
)
pre
=
object
.
__new__
(
PartitionCheck
)
...
@@ -71,5 +72,5 @@ class TestPartitionCheck:
...
@@ -71,5 +72,5 @@ class TestPartitionCheck:
@mock.patch
(
"
os.path.exists
"
,
return_value
=
False
)
@mock.patch
(
"
os.path.exists
"
,
return_value
=
False
)
@mock.patch
(
"
os.makedirs
"
,
side_effect
=
None
)
@mock.patch
(
"
os.makedirs
"
,
side_effect
=
None
)
def
test_run_compute
(
self
,
mock_host
,
mock_user
,
mock_path
,
mock_check
,
obj_with_exp_setup_compute
,
caplog
):
def
test_run_compute
(
self
,
mock_host
,
mock_user
,
mock_path
,
mock_check
,
obj_with_exp_setup_compute
,
caplog
):
obj
=
obj_with_exp_setup_compute
.
__next__
()
assert
obj
_with_exp_setup_compute
.
__next__
()
.
_run
()
is
None
assert
obj
.
_run
()
is
None
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