Fix #45
Run tox to run tests with Python 2.7, 3.5 and 3.6. An known issue is rpm-py-installer does not work Python 2.6. It will be fixed. So, Test env 2.6 is not included in this PR.
tox
rpm-py-installer
The code change looks good to me. Trying to run the tox tests locally I'm however getting errors on Python 3 (both versions).
… File "/home/lsedlar/repos/rpkg/tests/test_cli.py", line 34, in <module> import utils ModuleNotFoundError: No module named 'utils' … File "/home/lsedlar/repos/rpkg/tests/test_commands.py", line 22, in <module> from utils import CommandTestCase ModuleNotFoundError: No module named 'utils' …
I'm running tox from the root of the repository, but switching to tests/ does not seem to help.
tests/
Changing the import lines to from . import utils fixes the tests on my machine.
from . import utils
ModuleNotFoundError: No module named 'utils'
I cannot reproduce this error. Is there a __init__.py in tests directory? from . import utils will cause error ImportError: attempted relative import with no known parent package.
__init__.py
tests
ImportError: attempted relative import with no known parent package
Ah, you're right, I had tests/__init__.py there. :thumbsup:
tests/__init__.py
pretty please pagure-ci rebuild
Tests fails because of an known issue of rpm-py-installer https://github.com/junaruga/rpm-py-installer/issues/104, which impacts a few projects that require rpm-py-installer.
1 new commit added
Added a new commit to allow adding dependent py26 packages easily. This was detected while trying to configure Jenkins job to workaround rpm-py-installer issue.
So far, job fails in EL6 because of missing rpm-devel in slave. fedora-infra #6624 was filed for this issue. Job fails in EL7 because of package version conflict when installing a newer version of flake8, that can be fixed in job configuration in Jenkins.
rpm-devel
Just tried to switch Jenkins job to run tests by tox. Luckily, all required Python version interpreter are installed in F25 slave, and job in F25 succeeded. So, going to merge this PR. :tada:
F25
Commit ac377516 fixes this pull-request
Pull-Request has been merged by cqi
Fix #45
Run
toxto run tests with Python 2.7, 3.5 and 3.6. An known issue isrpm-py-installerdoes not work Python 2.6. It will be fixed. So, Test env 2.6 is not included in this PR.