Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sciReptor
AIRR CEF Toolbox
Commits
81a92183
Commit
81a92183
authored
Aug 06, 2021
by
Francisco Arcila Salamanca
Browse files
🎉
add end to end importer test
🎉
parent
cb13daa5
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/tests.py
View file @
81a92183
...
...
@@ -40,7 +40,6 @@ config_dic = {
"user"
:
"root"
,
"password"
:
""
,
"database"
:
"test_main"
,
"host"
:
"mariadb"
,
# gitignore
"port"
:
3306
,
}
...
...
@@ -165,7 +164,7 @@ class TestUtils(TestCase):
for
db
in
[
"test_main"
,
"test_onto"
,
"test_meta"
,
"test_receptors"
]:
execute_one_db
(
config_dic
,
db
)
def
test_end
(
self
):
def
test_
export_
end
(
self
):
this_dir
,
_
=
os
.
path
.
split
(
__file__
)
test_dir
=
os
.
path
.
join
(
this_dir
,
"tmp_path"
)
...
...
@@ -177,10 +176,15 @@ class TestUtils(TestCase):
assert
aex
.
main
()
is
True
assert
equal_dirs
(
os
.
path
.
join
(
test_dir
,
"test_main"
),
test_files
)
is
True
try
:
shutil
.
rmtree
(
test_dir
)
except
OSError
as
e
:
print
(
"Error: %s : %s"
%
(
test_dir
,
e
.
strerror
))
def
test_import_end
(
self
):
this_dir
,
_
=
os
.
path
.
split
(
__file__
)
test_files
=
os
.
path
.
join
(
this_dir
,
"data"
,
"test_data"
)
self
.
monkeypatch
.
setitem
(
aim
.
TEST_ARGS
,
"config_db"
,
config_dic
)
self
.
monkeypatch
.
setitem
(
aim
.
TEST_ARGS
,
"project_name"
,
"test_main_airr"
)
self
.
monkeypatch
.
setitem
(
aim
.
TEST_ARGS
,
"ssh_group"
,
"test"
)
self
.
monkeypatch
.
setitem
(
aim
.
TEST_ARGS
,
"input_path"
,
test_files
)
assert
aim
.
main
()
is
True
# pd.testing.assert_frame_equal(rearrangements_frame, ontologies_df) # todo test
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment