From caaa56c99f829ec209e04247560413c7e05c0258 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Sat, 23 Jul 2022 15:04:39 +0200 Subject: [PATCH] support/testing: drop legacy python2 code Now that we only have python3, we will never have to test a python2-based build, so we can drop python2 compatibility cruft. In python3, print already is a function, we don't need to import it from the future. Signed-off-by: Yann E. MORIN Cc: Thomas Petazzoni Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- support/testing/tests/package/test_python.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/testing/tests/package/test_python.py b/support/testing/tests/package/test_python.py index f29aff6624..c4f5d66d59 100644 --- a/support/testing/tests/package/test_python.py +++ b/support/testing/tests/package/test_python.py @@ -27,7 +27,7 @@ class TestPythonBase(infra.basetest.BRTest): self.assertRunOk(cmd, timeout) def libc_time_test(self, timeout=-1): - cmd = self.interpreter + " -c 'from __future__ import print_function;" + cmd = self.interpreter + " -c '" cmd += "import ctypes;" cmd += "libc = ctypes.cdll.LoadLibrary(\"libc.so.1\");" cmd += "print(libc.time(None))'"