Commit 5bf8acc4 authored by Jérome Perrin's avatar Jérome Perrin

test_result: py3

parent 6d23060d
......@@ -214,8 +214,8 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
# suites required
int_index = test_suite.getIntIndex()
# we divide per 3 because we have 3 cores per node
node_quantity_min = PRIORITY_MAPPING[int_index][0]/3
node_quantity_max = PRIORITY_MAPPING[int_index][1]/3
node_quantity_min = PRIORITY_MAPPING[int_index][0]//3
node_quantity_max = PRIORITY_MAPPING[int_index][1]//3
for x in range(0, node_quantity_min):
score = float(x)/(x+1)
all_test_suite_list.append((score, test_suite_url, title))
......
......@@ -15,6 +15,6 @@ if recipient_list:
mail_from='nobody@svn.erp5.org',
include_link=include_link,
include_diff=True)
print 'Successfully sent to: ', recipient_list
print 'OK'
print('Successfully sent to: %s' % recipient_list)
print('OK')
return printed
......@@ -5,7 +5,7 @@
seconds = 0.0
for obj in context.contentValues():
seconds += obj.getProperty('duration')
print '%s,%s,%s,%s,%s,%s' %( context.getProperty('status'), context.getProperty('all_tests'),
print('%s,%s,%s,%s,%s,%s' %( context.getProperty('status'), context.getProperty('all_tests'),
context.getProperty('failures'), context.getProperty('errors'),
context.getProperty('skips'), seconds)
context.getProperty('skips'), seconds))
return printed
......@@ -5,5 +5,5 @@ Multiline stdout values behaviour is undefined.
"""
for test_result_node in context.objectValues(portal_type='Test Result Node'):
if test_result_node.getCmdline() == 'LOG url':
print test_result_node.getStdout()
print(test_result_node.getStdout().decode('ascii', 'replace'))
return printed
......@@ -1676,7 +1676,7 @@ class TestGitlabRESTConnectorInterface(ERP5TypeTestCase):
self.assertEqual(
self.id(),
body['name'])
return (six.moves.http_client.CREATED, {'content-type': 'application/json'}, '{}')
return (six.moves.http_client.CREATED, {'content-type': 'application/json'}, b'{}')
return _callback
def test_start_test(self):
......@@ -1693,7 +1693,7 @@ class TestGitlabRESTConnectorInterface(ERP5TypeTestCase):
rsps.add(
responses.POST,
self.post_commit_status_url,
{})
b'{}')
self.test_result.start()
self.tic()
......@@ -1831,7 +1831,7 @@ class TestGitlabRESTConnectorInterface(ERP5TypeTestCase):
self.assertEqual(
'https://erp5js.example.com/#%s' % self.test_result.getRelativeUrl(),
body['target_url'])
return (six.moves.http_client.CREATED, {'content-type': 'application/json'}, '{}')
return (six.moves.http_client.CREATED, {'content-type': 'application/json'}, b'{}')
with responses.RequestsMock() as rsps:
rsps.add_callback(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment