def test_merge(from_line): requirements = [ from_line('flask==1'), from_line('flask==1'), from_line('django==2') ] assert Counter(requirements[1:3]) == Counter( merge(requirements, ignore_conflicts=True))
def test_merge_detect_conflicts(from_line): requirements = [from_line('flask==1'), from_line('flask==2')] with pytest.raises(IncompatibleRequirements): merge(requirements, ignore_conflicts=False)