Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
panacota
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
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
Amandine PERRIN
panacota
Commits
b5c7cd3c
Commit
b5c7cd3c
authored
5 years ago
by
Amandine PERRIN
Browse files
Options
Downloads
Patches
Plain Diff
adapt tests for protein_seq_functions
parent
f8539c42
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#17628
passed
5 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test_unit/test_pangenome/test_protseqfunc.py
+12
-12
12 additions, 12 deletions
test/test_unit/test_pangenome/test_protseqfunc.py
with
12 additions
and
12 deletions
test/test_unit/test_pangenome/test_protseqfunc.py
+
12
−
12
View file @
b5c7cd3c
...
@@ -7,7 +7,8 @@ Unit tests for the protein_seq_functions in pangenome module
...
@@ -7,7 +7,8 @@ Unit tests for the protein_seq_functions in pangenome module
import
os
import
os
import
shutil
import
shutil
import
genomeAPCAT.pangenome_module.protein_seq_functions
as
psf
import
PanACoTA.pangenome_module.protein_seq_functions
as
psf
import
test.test_unit.utilities_for_tests
as
utiltest
import
logging
import
logging
...
@@ -31,10 +32,13 @@ def test_build_bank():
...
@@ -31,10 +32,13 @@ def test_build_bank():
outfile
=
psf
.
build_prt_bank
(
lstinfo
,
dbpath
,
name
,
spedir
,
quiet
)
outfile
=
psf
.
build_prt_bank
(
lstinfo
,
dbpath
,
name
,
spedir
,
quiet
)
exp_file
=
os
.
path
.
join
(
PATH_EXP_FILES
,
"
exp_EXEM.All.prt
"
)
exp_file
=
os
.
path
.
join
(
PATH_EXP_FILES
,
"
exp_EXEM.All.prt
"
)
exp_out
=
os
.
path
.
join
(
dbpath
,
name
+
"
.All.prt
"
)
exp_out
=
os
.
path
.
join
(
dbpath
,
name
+
"
.All.prt
"
)
# Check prt bank filename
assert
outfile
==
exp_out
assert
outfile
==
exp_out
with
open
(
outfile
,
"
r
"
)
as
of
,
open
(
exp_file
,
"
r
"
)
as
ef
:
# Check content of bank created
for
l1
,
l2
in
zip
(
of
,
ef
):
assert
utiltest
.
compare_order_content
(
exp_file
,
exp_out
)
assert
l1
==
l2
# Remove tmp files
os
.
remove
(
outfile
)
os
.
remove
(
outfile
)
...
@@ -51,10 +55,7 @@ def test_build_bank_spedir():
...
@@ -51,10 +55,7 @@ def test_build_bank_spedir():
exp_file
=
os
.
path
.
join
(
PATH_EXP_FILES
,
"
exp_EXEM.All.prt
"
)
exp_file
=
os
.
path
.
join
(
PATH_EXP_FILES
,
"
exp_EXEM.All.prt
"
)
exp_out
=
os
.
path
.
join
(
spedir
,
name
+
"
.All.prt
"
)
exp_out
=
os
.
path
.
join
(
spedir
,
name
+
"
.All.prt
"
)
assert
outfile
==
exp_out
assert
outfile
==
exp_out
with
open
(
outfile
,
"
r
"
)
as
of
,
open
(
exp_file
,
"
r
"
)
as
ef
:
assert
utiltest
.
compare_order_content
(
exp_file
,
exp_out
)
for
l1
,
l2
in
zip
(
of
,
ef
):
assert
l1
==
l2
shutil
.
rmtree
(
spedir
)
shutil
.
rmtree
(
"
test_build_prt
"
)
shutil
.
rmtree
(
"
test_build_prt
"
)
...
@@ -94,9 +95,8 @@ def test_build_bank_noquiet(caplog):
...
@@ -94,9 +95,8 @@ def test_build_bank_noquiet(caplog):
exp_file
=
os
.
path
.
join
(
PATH_EXP_FILES
,
"
exp_EXEM.All.prt
"
)
exp_file
=
os
.
path
.
join
(
PATH_EXP_FILES
,
"
exp_EXEM.All.prt
"
)
exp_out
=
os
.
path
.
join
(
dbpath
,
name
+
"
.All.prt
"
)
exp_out
=
os
.
path
.
join
(
dbpath
,
name
+
"
.All.prt
"
)
assert
outfile
==
exp_out
assert
outfile
==
exp_out
with
open
(
outfile
,
"
r
"
)
as
of
,
open
(
exp_file
,
"
r
"
)
as
ef
:
assert
utiltest
.
compare_order_content
(
exp_file
,
outfile
)
for
l1
,
l2
in
zip
(
of
,
ef
):
assert
l1
==
l2
assert
"
Building bank with all proteins to EXEM.All.prt
"
in
caplog
.
text
assert
caplog
.
records
[
0
].
levelname
==
"
INFO
"
assert
caplog
.
records
[
0
].
levelname
==
"
INFO
"
assert
(
"
Building bank with all proteins to
"
"
test/data/pangenome/test_files/example_db/Proteins/EXEM.All.prt
"
)
in
caplog
.
text
os
.
remove
(
outfile
)
os
.
remove
(
outfile
)
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