Skip to content

Commit

Permalink
Test with tmpdir
Browse files Browse the repository at this point in the history
  • Loading branch information
Boris Jurič committed Sep 13, 2023
1 parent 77acd75 commit 73ed136
Show file tree
Hide file tree
Showing 3 changed files with 4,571 additions and 4 deletions.
1 change: 1 addition & 0 deletions htsinfer/mapping.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Mapping FASTQ's and managing the outputs of STAR."""

import os
import logging
import math
from pathlib import Path
Expand Down
8 changes: 4 additions & 4 deletions tests/test_get_library_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ def test_evaluate_mate_relationship_split_mates(self):
StatesTypeRelationship.split_mates
)

def test_evaluate_mate_relationship_not_mates(self):
def test_evaluate_mate_relationship_not_mates(self, tmpdir):
"""Test mate relationship evaluation logic with input files that are
not mates from a paired-end library.
"""
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.file_1.short_name = "hsapiens"
CONFIG.args.tmp_dir = tmpdir
MAPPING.paths = (FILE_IDS_NOT_MATCH_1, FILE_MATE_2)
MAPPING.transcripts_file = FILE_TRANSCRIPTS
test_instance = GetLibType(config=CONFIG,
Expand All @@ -131,13 +131,13 @@ def test_evaluate_mate_relationship_not_mates(self):
StatesTypeRelationship.not_mates
)

def test_evaluate_split_mates_not_matching_ids(self):
def test_evaluate_split_mates_not_matching_ids(self, tmpdir):
"""Test mate relationship evaluation logic with input files that are
not mates from a paired-end library.
"""
CONFIG.args.path_1_processed = FILE_IDS_NOT_MATCH_1
CONFIG.args.path_2_processed = FILE_IDS_NOT_MATCH_2
CONFIG.results.library_source.file_1.short_name = None
CONFIG.args.tmp_dir = tmpdir
MAPPING.paths = (FILE_IDS_NOT_MATCH_1, FILE_IDS_NOT_MATCH_2)
test_instance = GetLibType(config=CONFIG,
mapping=MAPPING)
Expand Down
Loading

0 comments on commit 73ed136

Please sign in to comment.