init_test.py 431 B

12345678910111213
  1. import pytest
  2. import freesurfer_volume_reader
  3. @pytest.mark.parametrize(('source_pattern', 'expected_pattern'), [
  4. (r'^(?P<h>[lr])h\.hippoSfVolumes', r'^([lr])h\.hippoSfVolumes'),
  5. (r'(?P<a>a(?P<b>b))', r'(a(b))'),
  6. ])
  7. def test_remove_group_names_from_regex(source_pattern, expected_pattern):
  8. assert expected_pattern == freesurfer_volume_reader.remove_group_names_from_regex(
  9. regex_pattern=source_pattern,
  10. )