class TestDandifiedNameConvertor(object): def setup_method(self, method): self.dnc = DandifiedNameConvertor('fedora') @pytest.mark.parametrize(('pypi_name', 'version', 'expected'), [ ('Babel', '2', 'python2-babel'), ('Babel', '3', 'python3-babel'), ('MarkupSafe', '2', 'python-markupsafe'), ('MarkupSafe', '3', 'python3-markupsafe'), ('Jinja2', '2', 'python2-jinja2'), ('Jinja2', '3', 'python3-jinja2'), ('Sphinx', '2', 'python2-sphinx'), ('Sphinx', '3', 'python3-sphinx'), ('Cython', '2', 'python2-Cython'), ('Cython', '3', 'python3-Cython'), ('pytest', '2', 'python2-pytest'), ('pytest', '3', 'python3-pytest'), ('vertica', '2', 'vertica-python'), ('pycairo', '2', 'pycairo'), ('pycairo', '3', 'python3-cairo'), ('oslosphinx', '2', 'python2-oslo-sphinx'), ('oslosphinx', '3', 'python3-oslo-sphinx'), ('mock', '2', 'python2-mock'), ('mock', '3', 'python3-mock'), ]) @pytest.mark.skipif(dnf is None, reason="Optional dependency DNF required") def test_rpm_name(self, pypi_name, version, expected): assert self.dnc.rpm_name(pypi_name, version) == expected
class TestDandifiedNameConvertor(object): def setup_method(self, method): self.dnc = DandifiedNameConvertor('fedora') @pytest.mark.parametrize(('pypi_name', 'version', 'expected'), [ ('Babel', '2', 'python2-babel'), ('Babel', '3', 'python3-babel'), ('MarkupSafe', '2', 'python-markupsafe'), ('MarkupSafe', '3', 'python3-markupsafe'), ('Jinja2', '2', 'python-jinja2'), ('Jinja2', '3', 'python3-jinja2'), ('Sphinx', '2', 'python2-sphinx'), ('Sphinx', '3', 'python3-sphinx'), ('Cython', '2', 'Cython'), ('Cython', '3', 'python3-Cython'), ('pytest', '2', 'python2-pytest'), ('pytest', '3', 'python3-pytest'), ('vertica', '2', 'vertica-python'), ('pycairo', '2', 'pycairo'), ('pycairo', '3', 'python3-cairo'), ('oslosphinx', '2', 'python2-oslo-sphinx'), ('oslosphinx', '3', 'python3-oslo-sphinx'), ('mock', '2', 'python2-mock'), ('mock', '3', 'python3-mock'), ]) @pytest.mark.skipif(dnf is None, reason="Optional dependency DNF required") def test_rpm_name(self, pypi_name, version, expected): assert self.dnc.rpm_name(pypi_name, version) == expected
def setup_method(self, method): self.dnc = DandifiedNameConvertor('fedora')