def test_labels_until_sections(self): """We can fill in sections""" start = Label(cfr_title='11', part='222', section='33') end = Label(cfr_title='11', part='222', section='36') self.assertEqual(list(start.labels_until(end)), [Label(cfr_title='11', part='222', section='34'), Label(cfr_title='11', part='222', section='35')])
def test_labels_until_sections(self): """We can fill in sections""" start = Label(cfr_title='11', part='222', section='33') end = Label(cfr_title='11', part='222', section='36') self.assertEqual(list(start.labels_until(end)), [ Label(cfr_title='11', part='222', section='34'), Label(cfr_title='11', part='222', section='35') ])
def test_labels_until_paragraphs(self): """We can fill in paragraphs""" start = Label(cfr_title='11', part='222', section='33', p1='a', p2='2') end = Label(cfr_title='11', part='222', section='33', p1='a', p2='6') self.assertEqual(list(start.labels_until(end)), [ Label(cfr_title='11', part='222', section='33', p1='a', p2='3'), Label(cfr_title='11', part='222', section='33', p1='a', p2='4'), Label(cfr_title='11', part='222', section='33', p1='a', p2='5') ])
def test_labels_until_paragraphs(self): """We can fill in paragraphs""" start = Label(cfr_title='11', part='222', section='33', p1='a', p2='2') end = Label(cfr_title='11', part='222', section='33', p1='a', p2='6') self.assertEqual( list(start.labels_until(end)), [Label(cfr_title='11', part='222', section='33', p1='a', p2='3'), Label(cfr_title='11', part='222', section='33', p1='a', p2='4'), Label(cfr_title='11', part='222', section='33', p1='a', p2='5')])