Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
CaosDB Python Integration Tests
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
CaosDB Python Integration Tests
Commits
82e8c51c
Commit
82e8c51c
authored
Apr 5, 2024
by
Joscha Schmiedt
Browse files
Options
Downloads
Patches
Plain Diff
Remove usage of nose.tools
parent
c9698233
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!76
Resolve "Remove nose.tools dependency"
Pipeline
#49495
passed with warnings
Apr 5, 2024
Stage: info
Stage: setup
Stage: cert
Stage: style
Stage: test
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
tests/test_messages.py
+1
-1
1 addition, 1 deletion
tests/test_messages.py
tests/test_permissions.py
+14
-6
14 additions, 6 deletions
tests/test_permissions.py
tests/test_recordtypes.py
+13
-2
13 additions, 2 deletions
tests/test_recordtypes.py
tests/test_xmlparsing.py
+9
-7
9 additions, 7 deletions
tests/test_xmlparsing.py
with
37 additions
and
16 deletions
tests/test_messages.py
+
1
−
1
View file @
82e8c51c
...
...
@@ -26,7 +26,7 @@
@author: Timm Fitschen
"""
import
caosdb
as
db
import
linkahead
as
db
def
test_messages_dict_behavior
():
...
...
This diff is collapsed.
Click to expand it.
tests/test_permissions.py
+
14
−
6
View file @
82e8c51c
...
...
@@ -28,12 +28,20 @@
from
__future__
import
absolute_import
import
caosdb
as
db
from
nose.tools
import
(
assert_equal
,
assert_raises
,
assert_false
,
assert_is_none
,
assert_is_not_none
)
import
linkahead
as
db
def
assert_equal
(
a
,
b
):
assert
a
==
b
def
assert_is_not_none
(
a
):
assert
a
is
not
None
def
assert_false
(
a
):
assert
not
a
def
assert_is_none
(
a
):
assert
a
is
None
from
pytest
import
raises
,
mark
...
...
This diff is collapsed.
Click to expand it.
tests/test_recordtypes.py
+
13
−
2
View file @
82e8c51c
...
...
@@ -26,7 +26,10 @@ import caosdb
def
test_recordtypes
():
from
nose.tools
import
assert_is_not_none
# @UnresolvedImport
def
assert_is_not_none
(
obj
):
assert
obj
is
not
None
from
sys
import
hexversion
from
sys
import
maxsize
as
maxint
# @Reimport
from
random
import
randint
...
...
@@ -99,7 +102,15 @@ def test_recordtypes():
def
test_record_types_as_reference_properties
():
from
nose.tools
import
assert_is_not_none
,
assert_true
,
assert_equal
# @UnresolvedImport
def
assert_is_not_none
(
obj
):
assert
obj
is
not
None
def
assert_true
(
obj
):
assert
obj
is
True
def
assert_equal
(
obj1
,
obj2
):
assert
obj1
==
obj2
try
:
"""
recordtype without any property.
"""
...
...
This diff is collapsed.
Click to expand it.
tests/test_xmlparsing.py
+
9
−
7
View file @
82e8c51c
...
...
@@ -31,13 +31,15 @@ import pytest
@pytest.mark.local_server
def
test_parse_xml
():
from
lxml
import
etree
from
nose.tools
import
assert_equal
# @UnresolvedImport
from
caosdb.common.models
import
File
from
caosdb.common.models
import
parse_xml
from
caosdb.common.models
import
Parent
from
caosdb.common.models
import
Property
from
caosdb.common.models
import
Message
from
caosdb
import
INTEGER
from
linkahead.common.models
import
File
from
linkahead.common.models
import
parse_xml
from
linkahead.common.models
import
Parent
from
linkahead.common.models
import
Property
from
linkahead.common.models
import
Message
from
linkahead
import
INTEGER
def
assert_equal
(
a
,
b
):
assert
a
==
b
# define test file xml
tmp_name
=
'
filename
'
...
...
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