Aaron Whitehouse has proposed merging lp:~aaron-whitehouse/duplicity/tox_pylint_fixes into lp:duplicity.
Commit message: Changes needed to run-tests without pylint E0401(import-error) errors Requested reviews: duplicity-team (duplicity-team) For more details, see: https://code.launchpad.net/~aaron-whitehouse/duplicity/tox_pylint_fixes/+merge/323996 If I run run-tests on the current trunk, I get the following errors: Pylint test (requires pylint to be installed to pass) ... FAIL ====================================================================== FAIL: test_pylint (testing.test_code.CodeTest) Pylint test (requires pylint to be installed to pass) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/aaron/Programming/duplicity/20170512_trunk/testing/test_code.py", line 86, in test_pylint [0, 32]) File "/home/aaron/Programming/duplicity/20170512_trunk/testing/test_code.py", line 40, in run_checker self.assertTrue(process.returncode in returncodes, output) AssertionError: ************* Module duplicity.compilec /home/aaron/Programming/duplicity/20170512_trunk/duplicity/compilec.py:25: [E0401(import-error), ] Unable to import 'distutils.core' ************* Module duplicity.backends._boto_single /home/aaron/Programming/duplicity/20170512_trunk/duplicity/backends/_boto_single.py:131: [E0401(import-error), BotoBackend.__init__] Unable to import 'boto.s3.connection' ************* Module duplicity.backends.pydrivebackend /home/aaron/Programming/duplicity/20170512_trunk/duplicity/backends/pydrivebackend.py:115: [E0401(import-error), PyDriveBackend.file_by_name] Unable to import 'pydrive.files' /home/aaron/Programming/duplicity/20170512_trunk/duplicity/backends/pydrivebackend.py:210: [E0401(import-error), PyDriveBackend._error_code] Unable to import 'pydrive.files' ************* Module duplicity.backends._cf_cloudfiles /home/aaron/Programming/duplicity/20170512_trunk/duplicity/backends/_cf_cloudfiles.py:72: [E0401(import-error), CloudFilesBackend._error_code] Unable to import 'cloudfiles.errors' ************* Module duplicity.backends.pyrax_identity.hubic /home/aaron/Programming/duplicity/20170512_trunk/duplicity/backends/pyrax_identity/hubic.py:14: [E0401(import-error), ] Unable to import 'pyrax.base_identity' With the changes proposed, run-test completes for me without errors. Presumably these errors do not happen (except perhaps the distutils one?) if all requirements are installed, but if adding them to tox.ini can sort them out (and therefore lower the bar for people to get testing working properly), why not do so? -- Your team duplicity-team is requested to review the proposed merge of lp:~aaron-whitehouse/duplicity/tox_pylint_fixes into lp:duplicity.
=== modified file 'duplicity/compilec.py' --- duplicity/compilec.py 2015-02-01 17:37:37 +0000 +++ duplicity/compilec.py 2017-05-12 17:06:16 +0000 @@ -22,7 +22,9 @@ import sys import os -from distutils.core import setup, Extension + +# https://github.com/PyCQA/pylint/issues/73 +from distutils.core import setup, Extension # pylint: disable=import-error,no-name-in-module assert len(sys.argv) == 1 sys.argv.append("build") === modified file 'tox.ini' --- tox.ini 2017-05-11 21:01:48 +0000 +++ tox.ini 2017-05-12 17:06:16 +0000 @@ -5,12 +5,16 @@ setenv= RUN_CODE_TESTS=1 deps= + boto + coverage + jottalib mock pexpect - jottalib pycodestyle + pydrive pylint - coverage + pyrax + python-cloudfiles [testenv] commands=
_______________________________________________ Mailing list: https://launchpad.net/~duplicity-team Post to : [email protected] Unsubscribe : https://launchpad.net/~duplicity-team More help : https://help.launchpad.net/ListHelp

