Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bilby
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
lscsoft
bilby
Commits
15754aaf
Commit
15754aaf
authored
3 years ago
by
Moritz Huebner
Browse files
Options
Downloads
Patches
Plain Diff
fixed and simplified tests
parent
18707791
No related branches found
No related tags found
1 merge request
!932
Fix pickle
Pipeline
#221160
passed
3 years ago
Stage: initial
Stage: test
Stage: docs
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/core/result_test.py
+3
-4
3 additions, 4 deletions
test/core/result_test.py
with
3 additions
and
4 deletions
test/core/result_test.py
+
3
−
4
View file @
15754aaf
...
...
@@ -230,15 +230,14 @@ class TestResult(unittest.TestCase):
def
test_save_and_dont_overwrite
(
self
):
extensions
=
[
'
json
'
,
'
pkl
'
,
'
hdf5
'
]
for
extension
in
extensions
:
shutil
.
rmtree
(
f
"
{
self
.
result
.
outdir
}
/
{
self
.
result
.
label
}
_result.
{
extension
}
.old
"
,
ignore_errors
=
True
)
self
.
result
.
save_to_file
(
overwrite
=
False
)
self
.
result
.
save_to_file
(
overwrite
=
False
)
print
(
extension
)
self
.
result
.
save_to_file
(
overwrite
=
False
,
extension
=
extension
)
self
.
result
.
save_to_file
(
overwrite
=
False
,
extension
=
extension
)
self
.
assertTrue
(
os
.
path
.
isfile
(
f
"
{
self
.
result
.
outdir
}
/
{
self
.
result
.
label
}
_result.
{
extension
}
.old
"
))
def
test_save_and_overwrite_default
(
self
):
extensions
=
[
'
json
'
,
'
pkl
'
,
'
hdf5
'
]
for
extension
in
extensions
:
shutil
.
rmtree
(
f
"
{
self
.
result
.
outdir
}
/
{
self
.
result
.
label
}
_result.
{
extension
}
.old
"
,
ignore_errors
=
True
)
self
.
result
.
save_to_file
(
overwrite
=
True
,
extension
=
extension
)
self
.
result
.
save_to_file
(
overwrite
=
True
,
extension
=
extension
)
self
.
assertFalse
(
os
.
path
.
isfile
(
f
"
{
self
.
result
.
outdir
}
/
{
self
.
result
.
label
}
_result.
{
extension
}
.old
"
))
...
...
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