From c7ea04cbd4e1eb54e54ba4e6ad68ea474873d9f5 Mon Sep 17 00:00:00 2001 From: Kevin Ha Date: Thu, 22 Oct 2020 20:59:41 -0400 Subject: [PATCH] Update regex --- qapa/extract.py | 2 +- tests/python/test_qapa.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qapa/extract.py b/qapa/extract.py index 80e59c0..0c10e58 100644 --- a/qapa/extract.py +++ b/qapa/extract.py @@ -117,7 +117,7 @@ def _join_names(self): def get_stripped_name(name): # If Gencode tables are supplied, the Ensembl transcript ID has a # version number appended to the ID. We want to strip this out. - match = re.match('ENS\w*T\d+', name) + match = re.match(r'ENS\w*T\d+', name) if match: return match.group() return name diff --git a/tests/python/test_qapa.py b/tests/python/test_qapa.py index cb65f07..81da110 100644 --- a/tests/python/test_qapa.py +++ b/tests/python/test_qapa.py @@ -59,14 +59,14 @@ def test_fasta(self, mock_fasta): @patch('os.system') def test_quant(self, mock_sys): - # should call create_merged_data.R and compute_pau.R + # should call create_merged_data.R and compute_pau.R db = NamedTemporaryFile() args = qapa.getoptions(['quant', '--db', db.name, 'test_1.sf', 'test_2.sf']) qapa.quant(args) - self.assertRegexpMatches(mock_sys.call_args_list[0][0][0], + self.assertRegex(mock_sys.call_args_list[0][0][0], r'create_merged_data.R') - self.assertRegexpMatches(mock_sys.call_args_list[1][0][0], + self.assertRegex(mock_sys.call_args_list[1][0][0], r'compute_pau.R')