From 2a5c7e0febee764b6be5758c61330fa4eaed52de Mon Sep 17 00:00:00 2001 From: stdweird Date: Mon, 22 Aug 2016 12:09:26 +0200 Subject: [PATCH 1/5] remove useless suppression --- lib/vsc/install/shared_setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/vsc/install/shared_setup.py b/lib/vsc/install/shared_setup.py index 00bee24b..acc030a3 100644 --- a/lib/vsc/install/shared_setup.py +++ b/lib/vsc/install/shared_setup.py @@ -704,7 +704,6 @@ class VscScanningLoader(ScanningLoader): TEST_LOADER_MODULE = __name__ - # pylint: disable=arguments-differ def loadTestsFromModule(self, module, pattern=None): """ Support test module and function name based filtering From fb026d1c8efd505e87a39db1cde1f0423f1b77e1 Mon Sep 17 00:00:00 2001 From: stdweird Date: Mon, 22 Aug 2016 12:09:53 +0200 Subject: [PATCH 2/5] use verbose messages --- lib/vsc/install/testing.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/vsc/install/testing.py b/lib/vsc/install/testing.py index 84c40dfd..8dbe1271 100644 --- a/lib/vsc/install/testing.py +++ b/lib/vsc/install/testing.py @@ -81,6 +81,10 @@ def assertEqual(self, a, b, msg=None): def setUp(self): """Prepare test case.""" super(TestCase, self).setUp() + + self.maxDiff = None + self.longMessage = True + self.orig_sys_stdout = sys.stdout self.orig_sys_stderr = sys.stderr From 080cd0e6185eb53bfeb2c07f1f504c020c2d8e3e Mon Sep 17 00:00:00 2001 From: stdweird Date: Mon, 22 Aug 2016 12:10:04 +0200 Subject: [PATCH 3/5] more infor with import errors --- lib/vsc/install/commontest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/vsc/install/commontest.py b/lib/vsc/install/commontest.py index 6f7dee1f..1785fc0c 100644 --- a/lib/vsc/install/commontest.py +++ b/lib/vsc/install/commontest.py @@ -129,7 +129,8 @@ def _import(self, pkg): try: __import__(pkg) except ImportError as e: - self.assertFalse(e, msg='import %s'%pkg) + log.debug("__path__ %s" % (["%s = %s" % (name, getattr(mod, '__path__', 'None')) for name, mod in sys.modules.items()])) + self.assertFalse(e, msg="import %s failed sys.path %s exception %s" % (pkg, sys.path, e)) self.assertTrue(pkg in sys.modules, msg='%s in sys.modules after import' % pkg) From e4d2ef49f3a254e6c5dd15196b449e39c27d436b Mon Sep 17 00:00:00 2001 From: stdweird Date: Mon, 22 Aug 2016 12:10:56 +0200 Subject: [PATCH 4/5] bump version --- lib/vsc/install/shared_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vsc/install/shared_setup.py b/lib/vsc/install/shared_setup.py index acc030a3..c4e47b70 100644 --- a/lib/vsc/install/shared_setup.py +++ b/lib/vsc/install/shared_setup.py @@ -145,7 +145,7 @@ def _log(self, level, msg, args): RELOAD_VSC_MODS = False -VERSION = '0.10.11' +VERSION = '0.10.12' log.info('This is (based on) vsc.install.shared_setup %s' % VERSION) From 0a2da4baafba42c1bacebe7b89e6c23950755664 Mon Sep 17 00:00:00 2001 From: stdweird Date: Tue, 23 Aug 2016 17:44:19 +0200 Subject: [PATCH 5/5] Add common tests_require (auto-adding prospector/pylint) --- lib/vsc/install/shared_setup.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/vsc/install/shared_setup.py b/lib/vsc/install/shared_setup.py index c4e47b70..dbe0cf60 100644 --- a/lib/vsc/install/shared_setup.py +++ b/lib/vsc/install/shared_setup.py @@ -1114,7 +1114,7 @@ def run(self): 'url': '', 'dependency_links': [], 'install_requires': [], - 'tests_require': [], + 'tests_require': ['nose', 'mock'], 'setup_requires': [], } @@ -1217,6 +1217,15 @@ def parse_target(self, target, urltemplate=None): new_target = {} new_target.update(vsc_setup_klass.SHARED_TARGET) + if sys.version_info < (2, 7): + # py26 support dropped in 0.8, and the old versions don't detect enough + log.info('no prospector support in py26 (or older)') + else: + log.info('adding prospector to tests_require') + tests_requires = new_target.setdefault('tests_require', []) + tests_requires.extend(['prospector >= 0.12.1', 'pylint < 1.6.0']) + + # update the cmdclass with ones from vsc_setup_klass # cannot do this in one go, whne SHARED_TARGET is defined, vsc_setup doesn't exist yet for name, klass in new_target['cmdclass'].items(): @@ -1424,15 +1433,6 @@ def action_target(package, *args, **kwargs): install_requires = [ 'setuptools', ] - if sys.version_info < (2, 7): - # py26 support dropped in 0.8, and the old versions don't detect enough - log.info('no prospector support in py26 (or older)') - else: - # For now, not enforcing propspector. - # It would complicate rpm creation too much. - # Should be re-added when the testing code is moved to vsc-testing - log.info('not enforcing prospector support. run "easy_install propspector" yourself') - # install_requires.append('prospector >= 0.11.7') PACKAGE = { 'version': VERSION,