Skip to content

Commit 3482774

Browse files
committed
rp_log_batch_payload_size parameter handling
1 parent 416c717 commit 3482774

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/helpers/utils.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import os
1717
import random
1818
import time
19+
from multiprocessing.pool import ThreadPool
1920

2021
import pytest
2122

@@ -132,3 +133,17 @@ def attributes_to_tuples(attributes):
132133
else:
133134
result.add((None, attribute['value']))
134135
return result
136+
137+
138+
# noinspection PyProtectedMember
139+
def run_tests_with_client(client, tests, args=None, variables=None):
140+
def test_func():
141+
from reportportal_client._local import set_current
142+
set_current(client)
143+
return run_pytest_tests(tests, args, variables)
144+
145+
pool = ThreadPool(processes=1)
146+
async_result = pool.apply_async(test_func)
147+
result = async_result.get()
148+
pool.terminate()
149+
return result

0 commit comments

Comments
 (0)