fedora-python / pyp2rpm

Tool to convert a package from PyPI to RPM SPECFILE or to generate SRPM.
MIT License
127 stars 39 forks source link

DNF API name converter #46

Closed mcyprian closed 8 years ago

mcyprian commented 8 years ago

In this PR:

Tests are failing, because I haven't found the way how to get dnf into travis yet.

hroncok commented 8 years ago

Can you fix the Travis build somehow? I guess it could be quite challenging to get dnf to Ubuntu, so just disable those tests there fo now.

hroncok commented 8 years ago

DandifiedNameConvertor vs DantifiedNameConvertor (commit message)

hroncok commented 8 years ago

I know pycairo is not exactly on PyPI, but this test would not pass:


class TestDandifiedNameConvertor(object):

    def setup_method(self, method):
        self.dnc = DandifiedNameConvertor('fedora')

    @pytest.mark.parametrize(('pypi_name', 'version', 'expected'), [
        ('pycairo', '2', 'pycairo'),
        ('pycairo', '3', 'python3-cairo'),
    ])
    def test_rpm_name(self, pypi_name, version, expected):
        assert self.dnc.rpm_name(pypi_name, version) == expected
mcyprian commented 8 years ago

Tests requiring DNF are skipped if module is missing, pycairo package is now part of the unit tests, passing on my local machine.

hroncok commented 8 years ago

LGTM

mcyprian commented 8 years ago

Thanks, I think this PR is ready to be merged.