diff --git a/hacking/titotest-fedora-rawhide/Dockerfile b/hacking/titotest-fedora-rawhide/Dockerfile index 0fffc04..e6f3a54 100644 --- a/hacking/titotest-fedora-rawhide/Dockerfile +++ b/hacking/titotest-fedora-rawhide/Dockerfile @@ -15,7 +15,7 @@ RUN dnf -y install \ python3-mock \ python3-nose \ python3-blessed \ - python3-pep8 \ + python3-pycodestyle \ rsync \ createrepo_c diff --git a/test/unit/pep8_tests.py b/test/unit/pep8_tests.py index 05c7717..e878b42 100644 --- a/test/unit/pep8_tests.py +++ b/test/unit/pep8_tests.py @@ -21,7 +21,15 @@ Python 3 is picky about indentation: http://docs.python.org/3.3/reference/lexical_analysis.html """ -import pep8 +try: + # python-pep8 package is retired in Fedora because upstream + # moved to pycodestyle. Please see + # https://bugzilla.redhat.com/show_bug.cgi?id=1667200 + import pep8 +except ImportError: + import pycodestyle as pep8 + + from tito.compat import * # NOQA from unit.fixture import TitoUnitTestFixture, REPO_DIR