removed support for multiple interpreters

This commit is contained in:
Dirk Alders 2025-08-17 14:34:38 +02:00
parent 2739e4ce18
commit ebe59a7b6e

43
run.py
View File

@ -257,29 +257,26 @@ def unittest_testrun(ut_folder, options):
# #
execution_level = report.TCEL_REVERSE_NAMED.get(options.execution_level, report.TCEL_FULL) execution_level = report.TCEL_REVERSE_NAMED.get(options.execution_level, report.TCEL_FULL)
# #
if sys.version_info.major in config.lib.__INTERPRETER__: output.print_header("Running \"%s\" Unittest with %s" % (options.execution_level, interpreter_version))
output.print_header("Running \"%s\" Unittest with %s" % (options.execution_level, interpreter_version)) with open(testresults_filename(ut_folder, FN_DATA_COLLECTION), 'r') as fh:
with open(testresults_filename(ut_folder, FN_DATA_COLLECTION), 'r') as fh: data_collection = json.loads(fh.read())
data_collection = json.loads(fh.read()) output.print_action('Executing Testcases')
output.print_action('Executing Testcases') heading_dict = {}
heading_dict = {} for key in data_collection[jsonlog.MAIN_KEY_SPECIFICATION].get(jsonlog.SPEC_ITEM_DICT, {}):
for key in data_collection[jsonlog.MAIN_KEY_SPECIFICATION].get(jsonlog.SPEC_ITEM_DICT, {}): heading_dict[key] = data_collection[jsonlog.MAIN_KEY_SPECIFICATION][jsonlog.SPEC_ITEM_DICT][key]['Heading']
heading_dict[key] = data_collection[jsonlog.MAIN_KEY_SPECIFICATION][jsonlog.SPEC_ITEM_DICT][key]['Heading'] test_session = report.testSession(
test_session = report.testSession( ['__unittest__', 'root', config.lib.__name__],
['__unittest__', 'root', config.lib.__name__], interpreter=interpreter_version,
interpreter=interpreter_version, testcase_execution_level=execution_level,
testcase_execution_level=execution_level, testrun_id='p%d' % sys.version_info[0],
testrun_id='p%d' % sys.version_info[0], heading_dict=heading_dict
heading_dict=heading_dict )
) tests.testrun(test_session)
tests.testrun(test_session) #
# output.print_action('Adding Testrun data to %s' % testresults_filename(ut_folder, FN_DATA_COLLECTION))
output.print_action('Adding Testrun data to %s' % testresults_filename(ut_folder, FN_DATA_COLLECTION)) data_collection[jsonlog.MAIN_KEY_TESTRUNS].append(test_session)
data_collection[jsonlog.MAIN_KEY_TESTRUNS].append(test_session) with open(testresults_filename(ut_folder, FN_DATA_COLLECTION), 'w') as fh:
with open(testresults_filename(ut_folder, FN_DATA_COLLECTION), 'w') as fh: fh.write(json.dumps(data_collection, indent=4, sort_keys=True))
fh.write(json.dumps(data_collection, indent=4, sort_keys=True))
else:
output.print_header("Library does not support %s." % interpreter_version)
def unittest_finalise(ut_folder): def unittest_finalise(ut_folder):