Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
balajtimate committed Jan 5, 2024
1 parent 782971a commit 28284de
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion htsinfer/get_read_orientation.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def evaluate(self) -> ResultsOrientation:

if not self.mapping.mapped \
and self.library_source.file_1.short_name is not None \
and self.library_source.file_2.short_name is not None:
or self.library_source.file_2.short_name is not None:
self.mapping.evaluate()
else:
LOGGER.warning(
Expand Down
10 changes: 10 additions & 0 deletions tests/test_get_library_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
GetFastqType,
)
from htsinfer.models import (
ResultsSource,
ResultsType,
Source,
SeqIdFormats,
StatesType,
StatesTypeRelationship,
Expand Down Expand Up @@ -147,6 +149,10 @@ def test_evaluate_mate_relationship_not_available(self, tmpdir):
CONFIG.args.path_1_processed = FILE_IDS_NOT_MATCH_1
CONFIG.args.path_2_processed = FILE_MATE_2
CONFIG.args.t_file_processed = FILE_TRANSCRIPTS
CONFIG.results.library_source = ResultsSource(
file_1=Source(short_name="hsapiens", taxon_id=9606),
file_2=Source(short_name="hsapiens", taxon_id=9606),
)
CONFIG.args.tmp_dir = tmpdir
MAPPING.paths = (FILE_IDS_NOT_MATCH_1, FILE_MATE_2)
MAPPING.transcripts_file = FILE_TRANSCRIPTS
Expand All @@ -167,6 +173,10 @@ def test_evaluate_split_mates_not_matching_ids(self, tmpdir):
"""
CONFIG.args.path_1_processed = FILE_IDS_NOT_MATCH_1
CONFIG.args.path_2_processed = FILE_IDS_NOT_MATCH_2
CONFIG.results.library_source = ResultsSource(
file_1=Source(short_name="hsapiens", taxon_id=9606),
file_2=Source(short_name="hsapiens", taxon_id=9606),
)
CONFIG.args.tmp_dir = tmpdir
MAPPING.paths = (FILE_IDS_NOT_MATCH_1, FILE_IDS_NOT_MATCH_2)
MAPPING.tmp_dir = tmpdir
Expand Down

0 comments on commit 28284de

Please sign in to comment.