示例#1
0
    def test_should_add_statement(self):
        group = RemainderGroup()

        self.assertTrue(group.should_add_statement(ImportStatement([], '.a')))
示例#2
0
    def test_add_statement_priority(self) -> None:
        groups = ImportGroups([RemainderGroup(), LocalGroup()])
        groups.add_statement(ImportStatement(".a"))

        assert groups.groups[0].statements == []
        assert groups.groups[1].statements == [ImportStatement(".a")]