[jhbuild] tests: Use Python 3 for test_distutils()
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] tests: Use Python 3 for test_distutils()
- Date: Tue, 10 Dec 2019 23:01:40 +0000 (UTC)
commit 4969edb937046c7a442bd4afdd6c66617d24bce1
Author: Christoph Reiter <reiter christoph gmail com>
Date: Sat Dec 7 22:44:00 2019 +0100
tests: Use Python 3 for test_distutils()
It was testing building a distutils package using Python 2.
Switch it to Python 3 so our test suite doesn't depend on Python 2.
See #50
tests/distutils/hello | 4 ++--
tests/test_main.py | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/tests/distutils/hello b/tests/distutils/hello
index dfa69cdc..989c0dbf 100644
--- a/tests/distutils/hello
+++ b/tests/distutils/hello
@@ -1,3 +1,3 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
-print "Hello world (distutils)"
+print("Hello world (distutils)")
diff --git a/tests/test_main.py b/tests/test_main.py
index ff8959c9..82c20ab4 100644
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -699,6 +699,7 @@ class EndToEndTest(JhbuildConfigTestCase):
module_list = [DistutilsModule('hello',
self.make_branch(config, 'distutils'))]
module_list[0].config = self.config
+ module_list[0].python = 'python3'
build = self.make_terminal_buildscript(config, module_list)
with_stdout_hidden(build.build)
proc = subprocess.Popen(['hello'], stdout=subprocess.PIPE)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]