diff --git a/src/ms3/utils.py b/src/ms3/utils.py index d0ff283b..5a59ee14 100644 --- a/src/ms3/utils.py +++ b/src/ms3/utils.py @@ -2102,7 +2102,7 @@ def split_scale_degree(sd, count=False): count : :obj:`bool`, optional Pass True to get the accidentals as integer rather than as string. """ - m = re.match("^(#*|b*)(VII|VI|V|IV|III|II|I|vii|vi|v|iv|iii|ii|i|\d)$", str(sd)) + m = re.match(r"^(#*|b*)(VII|VI|V|IV|III|II|I|vii|vi|v|iv|iii|ii|i|\d)$", str(sd)) if m is None: logger.error(f"{sd} is not a valid scale degree.") return None, None diff --git a/tests/test_parse.py b/tests/test_parse.py index af2cb12b..05153e66 100644 --- a/tests/test_parse.py +++ b/tests/test_parse.py @@ -17,6 +17,7 @@ def test_paths_parse(): def test_json_parse(): paths = ['paths2.json', 'truth/metadata.tsv', 'paths1.json'] + os.chdir(os.path.dirname(os.path.realpath(__file__))) directory = 'test_results' goal = 72 p = Parse(directory=directory, paths=paths, key='tests', logger_cfg=dict(level='d'))