def test_exhausted_list(self): path = Path([self.l1]) path.pop_next_segment() assert not bool(path)
def test_segment_getter(self): path = Path([self.l2]) assert path.pop_next_segment() == self.l2