You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2020/02/10 22:45:12 UTC
[allura] 41/41: [#8349] get syntax tests running on py3
This is an automated email from the ASF dual-hosted git repository.
brondsem pushed a commit to branch db/8349
in repository https://gitbox.apache.org/repos/asf/allura.git
commit 3b041f3beeb7c5675d6234d15a4cab1c9cdf599c
Author: Dave Brondsema <da...@brondsema.net>
AuthorDate: Mon Feb 10 17:44:01 2020 -0500
[#8349] get syntax tests running on py3
---
AlluraTest/alluratest/test_syntax.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/AlluraTest/alluratest/test_syntax.py b/AlluraTest/alluratest/test_syntax.py
index db3621c..3545641 100644
--- a/AlluraTest/alluratest/test_syntax.py
+++ b/AlluraTest/alluratest/test_syntax.py
@@ -31,8 +31,8 @@ def run(cmd):
proc = Popen(cmd, shell=True, cwd=toplevel_dir, stdout=PIPE, stderr=PIPE)
# must capture & reprint stdount, so that nosetests can capture it
(stdout, stderr) = proc.communicate()
- sys.stdout.write(stdout)
- sys.stderr.write(stderr)
+ sys.stdout.write(stdout.decode('utf-8'))
+ sys.stderr.write(stderr.decode('utf-8'))
return proc.returncode
@@ -106,6 +106,8 @@ class TestLinters(object):
def create_many_lint_methods():
proc = Popen(find_py, shell=True, cwd=toplevel_dir, stdout=PIPE, stderr=PIPE)
(find_stdout, stderr) = proc.communicate()
+ find_stdout = find_stdout.decode('utf-8')
+ stderr = stderr.decode('utf-8')
sys.stderr.write(stderr)
assert proc.returncode == 0, proc.returncode
py_files = find_stdout.split('\n')