-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest_config_files.py
32 lines (30 loc) · 1.55 KB
/
test_config_files.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import unittest
import sys
import os
import py_compile
from subprocess import check_output
import pvacseq
class ConfigFilesTests(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.python = sys.executable
base_dir = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..'))
cls.executable = os.path.dirname(pvacseq.__file__) + '/lib/' + 'config_files.py'
def test_source_compiles(self):
self.assertTrue(py_compile.compile(self.executable))
def test_pvacseq_config_files_additional_input_file_list_command(self):
output = check_output(
[self.python, self.executable, 'additional_input_file_list'],
shell = False
)
expected_output = (
"gene_expn_file: <genes.fpkm_tracking file from Cufflinks>\n"
+ "transcript_expn_file: <isoforms.fpkm_tracking file from Cufflinks>\n"
+ "normal_snvs_coverage_file: <bam-readcount output file for normal BAM and snvs>\n"
+ "normal_indels_coverage_file: <bam-readcount output file for normal BAM and indels>\n"
+ "tdna_snvs_coverage_file: <bam-readcount output file for tumor DNA BAM and snvs>\n"
+ "tdna_indels_coverage_file: <bam-readcount output file for tumor DNA BAM and indels>\n"
+ "trna_snvs_coverage_file: <bam-readcount output file for tumor RNA BAM and snvs>\n"
+ "trna_indels_coverage_file: <bam-readcount output file for tumor RNA BAM and indels>\n"
)
self.assertEqual(output.decode(), expected_output)