From a4c44bf64c95aa732a1f21c9960f73e28a445a1c Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Tue, 30 Jul 2013 14:45:08 -0400 Subject: testsuite: skip pylint checks on MultiprocessingCore on py2.5 --- testsuite/Testsrc/test_code_checks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'testsuite/Testsrc/test_code_checks.py') diff --git a/testsuite/Testsrc/test_code_checks.py b/testsuite/Testsrc/test_code_checks.py index a38710fd4..255c1b81a 100644 --- a/testsuite/Testsrc/test_code_checks.py +++ b/testsuite/Testsrc/test_code_checks.py @@ -79,7 +79,9 @@ no_checks = { "TCheetah.py", "TGenshi.py"], } - +if sys.version_info > (2, 5): + # multiprocessing core requires py2.6 + no_checks['lib/Bcfg2/Server'].append('MultiprocessingCore.py') try: any -- cgit v1.2.3-1-g7c22 From 88e2f9e68f104ea3797f7a0ffaeab7171a2eb221 Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Wed, 31 Jul 2013 12:55:20 -0500 Subject: testsuite: Fix output for python3 Signed-off-by: Sol Jerome --- testsuite/Testsrc/test_code_checks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'testsuite/Testsrc/test_code_checks.py') diff --git a/testsuite/Testsrc/test_code_checks.py b/testsuite/Testsrc/test_code_checks.py index 255c1b81a..22db0b331 100644 --- a/testsuite/Testsrc/test_code_checks.py +++ b/testsuite/Testsrc/test_code_checks.py @@ -188,7 +188,7 @@ class CodeTestCase(Bcfg2TestCase): cmd = self.command + self.full_args + extra_args + \ [os.path.join(srcpath, f) for f in files] proc = Popen(cmd, stdout=PIPE, stderr=STDOUT, env=self.get_env()) - print(proc.communicate()[0]) + print(proc.communicate()[0].decode()) self.assertEqual(proc.wait(), 0) def _test_errors(self, files, extra_args=None): @@ -200,7 +200,7 @@ class CodeTestCase(Bcfg2TestCase): cmd = self.command + self.error_args + extra_args + \ [os.path.join(srcpath, f) for f in files] proc = Popen(cmd, stdout=PIPE, stderr=STDOUT, env=self.get_env()) - print(proc.communicate()[0]) + print(proc.communicate()[0].decode()) self.assertEqual(proc.wait(), 0) @skipIf(not os.path.exists(srcpath), "%s does not exist" % srcpath) @@ -323,7 +323,7 @@ class TestPylint(CodeTestCase): args = self.command + self.error_args + extra_args + \ [os.path.join(srcpath, p) for p in files] pylint = Popen(args, stdout=PIPE, stderr=STDOUT, env=self.get_env()) - output = pylint.communicate()[0] + output = pylint.communicate()[0].decode() rv = pylint.wait() for line in output.splitlines(): -- cgit v1.2.3-1-g7c22