def _init_lemmas(self): lemmas = [] for volume_str in self._registers: if Volumes.is_volume_part_of_main_volume(volume_str, self.main_issue): for lemma in self._registers[volume_str].lemmas: if lemma not in lemmas: lemmas.append(lemma) self._lemmas = lemmas
def test__volume_part_of_main_volume(self): compare(True, Volumes.is_volume_part_of_main_volume("I,1", "I")) compare(False, Volumes.is_volume_part_of_main_volume("II,1", "I")) compare(False, Volumes.is_volume_part_of_main_volume("I,1", "II")) compare(False, Volumes.is_volume_part_of_main_volume("I,1", "XI")) compare(True, Volumes.is_volume_part_of_main_volume("II,1", "II"))