def test_intracranial_volume_file_find_pattern(root_dir_path, filename_pattern,
                                               expected_file_paths):
    volume_files_iterator = IntracranialVolumeFile.find(
        root_dir_path=root_dir_path,
        filename_regex=re.compile(filename_pattern))
    assert expected_file_paths == set(f.absolute_path
                                      for f in volume_files_iterator)
def test_intracranial_volume_file_find(root_dir_path, expected_file_paths):
    volume_files_iterator = IntracranialVolumeFile.find(
        root_dir_path=root_dir_path)
    assert expected_file_paths == set(f.absolute_path
                                      for f in volume_files_iterator)