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
906cf89a
Verified
Commit
906cf89a
authored
4 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
STY: autopep8'ed new files
parent
a66f9fe0
No related branches found
No related tags found
1 merge request
!3
F fsm
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/caosdb/common/state.py
+2
-0
2 additions, 0 deletions
src/caosdb/common/state.py
unittests/test_state.py
+2
-1
2 additions, 1 deletion
unittests/test_state.py
with
4 additions
and
1 deletion
src/caosdb/common/state.py
+
2
−
0
View file @
906cf89a
from
lxml
import
etree
from
lxml
import
etree
class
State
:
class
State
:
"""
State
"""
State
...
...
This diff is collapsed.
Click to expand it.
unittests/test_state.py
+
2
−
1
View file @
906cf89a
...
@@ -3,6 +3,7 @@ from caosdb import State
...
@@ -3,6 +3,7 @@ from caosdb import State
from
caosdb.common.models
import
parse_xml
from
caosdb.common.models
import
parse_xml
from
lxml
import
etree
from
lxml
import
etree
def
test_state_xml
():
def
test_state_xml
():
state
=
State
(
model
=
"
model1
"
,
name
=
"
state1
"
)
state
=
State
(
model
=
"
model1
"
,
name
=
"
state1
"
)
xml
=
etree
.
tostring
(
state
.
to_xml
())
xml
=
etree
.
tostring
(
state
.
to_xml
())
...
@@ -14,6 +15,7 @@ def test_state_xml():
...
@@ -14,6 +15,7 @@ def test_state_xml():
assert
xml
==
etree
.
tostring
(
state
.
to_xml
())
assert
xml
==
etree
.
tostring
(
state
.
to_xml
())
def
test_entity_xml
():
def
test_entity_xml
():
r
=
db
.
Record
()
r
=
db
.
Record
()
assert
r
.
state
is
None
assert
r
.
state
is
None
...
@@ -24,4 +26,3 @@ def test_entity_xml():
...
@@ -24,4 +26,3 @@ def test_entity_xml():
r
=
parse_xml
(
xml
)
r
=
parse_xml
(
xml
)
assert
r
.
state
==
State
(
model
=
"
model1
"
,
name
=
"
state1
"
)
assert
r
.
state
==
State
(
model
=
"
model1
"
,
name
=
"
state1
"
)
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