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
462854f6
Verified
Commit
462854f6
authored
Dec 22, 2022
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
WIP: file storage refactoring: import
parent
6194b08b
No related branches found
No related tags found
1 merge request
!53
Draft: ENH: file system: import
Pipeline
#35666
failed
Apr 14, 2023
Stage: info
Stage: setup
Stage: cert
Stage: style
Stage: test
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_file.py
+46
-68
46 additions, 68 deletions
tests/test_file.py
with
46 additions
and
68 deletions
tests/test_file.py
+
46
−
68
View file @
462854f6
...
...
@@ -319,7 +319,6 @@ def test_import_checksum_mismatch():
path
=
get_config
().
get
(
"
IntegrationTests
"
,
"
test_files.test_import_files_in_dir.local
"
)
+
"
testfolder/
"
try
:
os
.
makedirs
(
path
)
os
.
makedirs
(
path
+
"
subfolder/
"
)
local_file
=
os
.
path
.
join
(
path
,
"
subfolder
"
,
"
some_data.csv
"
)
...
...
@@ -336,12 +335,6 @@ def test_import_checksum_mismatch():
errors
=
cm
.
entity
.
get_errors
()
assert
errors
[
0
].
description
==
'
Checksum test failed. File is corrupted.
'
finally
:
try
:
shutil
.
rmtree
(
path
)
except
BaseException
:
pass
def
test_import_existing
():
path
=
get_config
().
get
(
"
IntegrationTests
"
,
...
...
@@ -398,7 +391,6 @@ def test_import_directoy():
path
=
get_config
().
get
(
"
IntegrationTests
"
,
"
test_files.test_import_files_in_dir.local
"
)
+
"
testfolder/
"
try
:
os
.
makedirs
(
path
)
os
.
makedirs
(
path
+
"
subfolder/
"
)
with
open
(
path
+
"
subfolder/some_data.csv
"
,
"
w
"
)
as
test_file1
:
...
...
@@ -413,19 +405,11 @@ def test_import_directoy():
assert
re
.
role
==
"
Directory
"
assert
re
.
path
==
"
/testfolder/subfolder
"
finally
:
try
:
shutil
.
rmtree
(
path
)
except
BaseException
:
pass
@mark.xfail
(
reason
=
"
Wait for implementation in the server
"
)
def
test_import_directoy_recursively
():
path
=
get_config
().
get
(
"
IntegrationTests
"
,
"
test_files.test_import_files_in_dir.local
"
)
+
"
testfolder/
"
try
:
os
.
makedirs
(
path
)
os
.
makedirs
(
path
+
"
subfolder/
"
)
with
open
(
path
+
"
subfolder/some_data.csv
"
,
"
w
"
)
as
test_file1
:
...
...
@@ -453,12 +437,6 @@ def test_import_directoy_recursively():
assert
e
.
role
==
"
File
"
assert
e
.
path
==
"
testfolder/subfolder/some_data.csv
"
finally
:
try
:
shutil
.
rmtree
(
path
)
except
BaseException
:
pass
def
test_consistency_file_was_modified_2
():
# this test is different from test_consistency_file_was_modified in that
...
...
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