def test_validate_supersedings(): supersedes = [ SectionName("foo"), SectionName("bar"), SectionName("foo"), ] with pytest.raises(ValueError, match="duplicate"): section_plugins._validate_supersedings(supersedes)
def test_validate_supersedings_raise_self_superseding(): with pytest.raises(ValueError, match="cannot supersede myself"): section_plugins._validate_supersedings(SectionName("foo"), [SectionName("foo")])