From a5c84f76643cce4193edec85367b11e1cca53a35 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Tue, 6 Mar 2018 21:12:22 +0100 Subject: Add py3 support in samples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I402be2f5921577985218306161a6efe1b9d62a48 Signed-off-by: Cédric Ollivier --- xtesting/samples/first.py | 4 +++- xtesting/samples/second.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/xtesting/samples/first.py b/xtesting/samples/first.py index 60de3dc6..b7ec8b6d 100644 --- a/xtesting/samples/first.py +++ b/xtesting/samples/first.py @@ -11,6 +11,8 @@ import time +import six + from xtesting.core import testcase @@ -18,7 +20,7 @@ class Test(testcase.TestCase): def run(self, **kwargs): self.start_time = time.time() - print "Hello World" + six.print_("Hello World") self.result = 100 self.stop_time = time.time() return testcase.TestCase.EX_OK diff --git a/xtesting/samples/second.py b/xtesting/samples/second.py index 36e1dd33..5e1b105b 100644 --- a/xtesting/samples/second.py +++ b/xtesting/samples/second.py @@ -9,11 +9,13 @@ # pylint: disable=missing-docstring +import six + from xtesting.core import feature class Test(feature.Feature): def execute(self, **kwargs): - print "Hello World" + six.print_("Hello World") return 0 -- cgit 1.2.3-korg