def _spec(lang, versions): spec_fixture = Spec('git://repository', 'git://plugin') spec_fixture.lang = lang list(map(spec_fixture.add_version, versions)) return spec_fixture
def test_spec_versions(spec_raw_object): spec = Spec.from_object(spec_raw_object) assert list(spec) == [ ('python', '2.7'), ('python', '3.4') ]