Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-advanced-user-tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
caosdb
Software
caosdb-advanced-user-tools
Commits
40044dff
Commit
40044dff
authored
1 year ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
imports'
parent
1c743873
No related branches found
No related tags found
No related merge requests found
Pipeline
#41174
failed
1 year ago
Stage: setup
Stage: cert
Stage: style
Stage: unittest
Stage: integrationtest
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
unittests/test_cfood.py
+1
-1
1 addition, 1 deletion
unittests/test_cfood.py
unittests/test_h5.py
+3
-2
3 additions, 2 deletions
unittests/test_h5.py
unittests/test_sss_helper.py
+3
-2
3 additions, 2 deletions
unittests/test_sss_helper.py
with
7 additions
and
5 deletions
unittests/test_cfood.py
+
1
−
1
View file @
40044dff
...
@@ -32,7 +32,7 @@ from caosadvancedtools.cfood import (AbstractCFood, AbstractFileCFood, CMeal,
...
@@ -32,7 +32,7 @@ from caosadvancedtools.cfood import (AbstractCFood, AbstractFileCFood, CMeal,
get_entity_for_path
)
get_entity_for_path
)
from
caosadvancedtools.crawler
import
FileCrawler
from
caosadvancedtools.crawler
import
FileCrawler
from
caosadvancedtools.example_cfood
import
ExampleCFood
from
caosadvancedtools.example_cfood
import
ExampleCFood
from
caosdb
.common.models
import
_parse_single_xml_element
from
linkahead
.common.models
import
_parse_single_xml_element
from
lxml
import
etree
from
lxml
import
etree
from
datetime
import
datetime
,
timezone
from
datetime
import
datetime
,
timezone
...
...
This diff is collapsed.
Click to expand it.
unittests/test_h5.py
+
3
−
2
View file @
40044dff
...
@@ -2,6 +2,7 @@ import unittest
...
@@ -2,6 +2,7 @@ import unittest
from
tempfile
import
NamedTemporaryFile
from
tempfile
import
NamedTemporaryFile
import
caosdb
as
db
import
caosdb
as
db
import
linkahead
import
caosdb.apiutils
import
caosdb.apiutils
import
h5py
import
h5py
import
numpy
as
np
import
numpy
as
np
...
@@ -77,8 +78,8 @@ class H5CFoodTest(unittest.TestCase):
...
@@ -77,8 +78,8 @@ class H5CFoodTest(unittest.TestCase):
# TODO this does probably break the code: The function will not be
# TODO this does probably break the code: The function will not be
# restored correctly.
# restored correctly.
# Change it to use the BaseMockUpTest
# Change it to use the BaseMockUpTest
real_retrieve
=
caosdb
.
apiutils
.
retrieve_entity_with_id
real_retrieve
=
linkahead
.
apiutils
.
retrieve_entity_with_id
caosdb
.
apiutils
.
retrieve_entity_with_id
=
dummy_get
linkahead
.
apiutils
.
retrieve_entity_with_id
=
dummy_get
# should run without problem
# should run without problem
h5
.
collect_existing_structure
(
db
.
Record
(),
db
.
Record
(
id
=
234
),
h5
.
EntityMapping
())
h5
.
collect_existing_structure
(
db
.
Record
(),
db
.
Record
(
id
=
234
),
h5
.
EntityMapping
())
...
...
This diff is collapsed.
Click to expand it.
unittests/test_sss_helper.py
+
3
−
2
View file @
40044dff
...
@@ -4,6 +4,7 @@ from os import listdir, remove
...
@@ -4,6 +4,7 @@ from os import listdir, remove
from
os.path
import
abspath
,
dirname
,
exists
,
isfile
,
join
from
os.path
import
abspath
,
dirname
,
exists
,
isfile
,
join
import
caosdb
as
db
import
caosdb
as
db
import
linkahead
as
la
from
caosadvancedtools.serverside.helper
import
(
NameCollector
,
get_data
,
from
caosadvancedtools.serverside.helper
import
(
NameCollector
,
get_data
,
get_file_via_download
,
get_file_via_download
,
init_data_model
,
init_data_model
,
...
@@ -110,8 +111,8 @@ def test_get_file_via_download():
...
@@ -110,8 +111,8 @@ def test_get_file_via_download():
# TODO test whether something ends up in the logger
# TODO test whether something ends up in the logger
class
NotThere
(
DummyFile
):
class
NotThere
(
DummyFile
):
def
download
(
*
args
,
**
kwargs
):
def
download
(
*
args
,
**
kwargs
):
raise
db
.
CaosDB
Exception
()
raise
la
.
LinkAhead
Exception
()
with
raises
(
db
.
CaosDB
Exception
):
with
raises
(
la
.
LinkAhead
Exception
):
get_file_via_download
(
Inconsistent
())
get_file_via_download
(
Inconsistent
())
...
...
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