Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
8a0bfd11
Commit
8a0bfd11
authored
8 years ago
by
Swen Vermeul
Browse files
Options
Downloads
Patches
Plain Diff
some more tests
parent
b2aaafb2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/python/pybis/tests/test_openbis.py
+29
-1
29 additions, 1 deletion
src/python/pybis/tests/test_openbis.py
with
29 additions
and
1 deletion
src/python/pybis/tests/test_openbis.py
+
29
−
1
View file @
8a0bfd11
import
json
from
pybis
import
DataSet
from
pybis
import
Openbis
from
pybis
import
DataSetUpload
def
test_token
(
openbis_instance
):
assert
openbis_instance
.
hostname
is
not
None
...
...
@@ -39,6 +40,7 @@ def test_get_sample_parents(openbis_instance):
assert
isinstance
(
parents
,
list
)
assert
parents
[
0
].
ident
==
'
/TEST/TEST-SAMPLE-2-PARENT
'
def
test_get_sample_children
(
openbis_instance
):
id
=
'
/TEST/TEST-SAMPLE-2
'
sample
=
openbis_instance
.
get_sample
(
id
)
...
...
@@ -86,4 +88,30 @@ def test_get_dataset_by_permid(openbis_instance):
assert
file_list
is
not
None
assert
len
(
file_list
)
>
10
def
test_dataset_upload
(
openbis_instance
):
datastores
=
openbis_instance
.
get_datastores
()
assert
datastores
is
not
None
assert
isinstance
(
datastores
,
list
)
filename
=
'
testfile.txt
'
with
open
(
filename
,
'
w
'
)
as
f
:
f
.
write
(
'
test-data
'
)
# parents are optional
my_dataset
.
upload_analysis
(
name
=
"
My analysis
"
,
# !mandatory; name of the container
description
=
"
a description
"
,
# optional
sample
=
sample
,
# optional, my_dataset.sample is the default
result_files
=
"
~/my_wonderful_results/
"
,
# !mandatory; path of my results
# result_files = ["~/my_result.csv"], # !mandatory, if no path was given
result_recursive
=
True
,
# default; recursive search if a path was given
result_file_match
=
"
*
"
,
# default; match any file if a path was given
notebook_files
=
"
~/notebooks/
"
,
# optional,
# notebook_files = ["notebook.ipynb"], # optional, specify a specific notebook
# notebook_files = "~/notebooks" # one single path instead of a list
parents
=
[
parent_dataset1
],
# other parents are optional, my_dataset is the default parent
)
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