summaryrefslogtreecommitdiff
path: root/testing/embedding/test_performance.py
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2016-01-08 08:17:36 +0100
committerArmin Rigo <arigo@tunes.org>2016-01-08 08:17:36 +0100
commit7fdcd73c2603b78dcc34c81251a4cc187e23ed4d (patch)
tree13f4f923a07389c5be944800e75b0705e37b4b88 /testing/embedding/test_performance.py
parent08ed5b405be38cbe5ee650a9a0dd527f02effb64 (diff)
downloadcffi-7fdcd73c2603b78dcc34c81251a4cc187e23ed4d.tar.gz
Py3 fixes. Skip the embedding tests if linking with -lpython%d.%d
fails (likely, the Python was not compiled with --enable-shared)
Diffstat (limited to 'testing/embedding/test_performance.py')
-rw-r--r--testing/embedding/test_performance.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/testing/embedding/test_performance.py b/testing/embedding/test_performance.py
index 21eae50..cb91e07 100644
--- a/testing/embedding/test_performance.py
+++ b/testing/embedding/test_performance.py
@@ -6,42 +6,42 @@ class TestPerformance(EmbeddingTests):
perf_cffi = self.prepare_module('perf')
self.compile('perf-test', [perf_cffi], opt=True)
output = self.execute('perf-test')
- print '='*79
- print output.rstrip()
- print '='*79
+ print('='*79)
+ print(output.rstrip())
+ print('='*79)
def test_perf_in_1_thread(self):
perf_cffi = self.prepare_module('perf')
self.compile('perf-test', [perf_cffi], opt=True, threads=True,
defines={'PTEST_USE_THREAD': '1'})
output = self.execute('perf-test')
- print '='*79
- print output.rstrip()
- print '='*79
+ print('='*79)
+ print(output.rstrip())
+ print('='*79)
def test_perf_in_2_threads(self):
perf_cffi = self.prepare_module('perf')
self.compile('perf-test', [perf_cffi], opt=True, threads=True,
defines={'PTEST_USE_THREAD': '2'})
output = self.execute('perf-test')
- print '='*79
- print output.rstrip()
- print '='*79
+ print('='*79)
+ print(output.rstrip())
+ print('='*79)
def test_perf_in_4_threads(self):
perf_cffi = self.prepare_module('perf')
self.compile('perf-test', [perf_cffi], opt=True, threads=True,
defines={'PTEST_USE_THREAD': '4'})
output = self.execute('perf-test')
- print '='*79
- print output.rstrip()
- print '='*79
+ print('='*79)
+ print(output.rstrip())
+ print('='*79)
def test_perf_in_8_threads(self):
perf_cffi = self.prepare_module('perf')
self.compile('perf-test', [perf_cffi], opt=True, threads=True,
defines={'PTEST_USE_THREAD': '8'})
output = self.execute('perf-test')
- print '='*79
- print output.rstrip()
- print '='*79
+ print('='*79)
+ print(output.rstrip())
+ print('='*79)