Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-pylib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
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
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-pylib
Commits
15b7ecf7
Commit
15b7ecf7
authored
2 years ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
TST: allow tests to be called from src dir; import pytest
parent
6c1d336e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!57
RELEASE 0.7.3
,
!52
F refactor high level api
Pipeline
#21941
passed with warnings
2 years ago
Stage: code_style
Stage: linting
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
unittests/test_apiutils.py
+1
-0
1 addition, 0 deletions
unittests/test_apiutils.py
unittests/test_entity.py
+4
-1
4 additions, 1 deletion
unittests/test_entity.py
with
5 additions
and
1 deletion
unittests/test_apiutils.py
+
1
−
0
View file @
15b7ecf7
...
...
@@ -26,6 +26,7 @@
# A. Schlemmer, 02/2018
import
pytest
import
caosdb
as
db
import
caosdb.apiutils
from
caosdb.apiutils
import
(
apply_to_ids
,
compare_entities
,
create_id_query
,
...
...
This diff is collapsed.
Click to expand it.
unittests/test_entity.py
+
4
−
1
View file @
15b7ecf7
...
...
@@ -26,10 +26,13 @@
import
unittest
from
lxml
import
etree
import
os
from
caosdb
import
(
INTEGER
,
Entity
,
Property
,
Record
,
RecordType
,
configure_connection
)
from
caosdb.connection.mockup
import
MockUpServerConnection
UNITTESTDIR
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
class
TestEntity
(
unittest
.
TestCase
):
...
...
@@ -87,7 +90,7 @@ class TestEntity(unittest.TestCase):
"""
parser
=
etree
.
XMLParser
(
remove_comments
=
True
)
entity
=
Entity
.
_from_xml
(
Entity
(),
etree
.
parse
(
"
unittests/
test_record.xml
"
,
etree
.
parse
(
os
.
path
.
join
(
UNITTESTDIR
,
"
test_record.xml
"
)
,
parser
).
getroot
())
self
.
assertEqual
(
entity
.
role
,
"
Record
"
)
...
...
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