MCPcopy Create free account
hub / github.com/catboost/catboost / get_test_log_file_path

Function get_test_log_file_path

library/python/pytest/yatest_tools.py:267–285  ·  view source on GitHub ↗

get test log file path, platform dependant :param output_dir: dir where log file should be placed :param class_name: test class name :param test_name: test name :return: test log file name

(output_dir, class_name, test_name, extension="log")

Source from the content-addressed store, hash-verified

265
266
267def get_test_log_file_path(output_dir, class_name, test_name, extension="log"):
268 """
269 get test log file path, platform dependant
270 :param output_dir: dir where log file should be placed
271 :param class_name: test class name
272 :param test_name: test name
273 :return: test log file name
274 """
275 if os.name == "nt":
276 # don't add class name to the log's filename
277 # to reduce it's length on windows
278 filename = test_name
279 else:
280 filename = "{}.{}".format(class_name, test_name)
281 if not filename:
282 filename = "test"
283 filename += "." + extension
284 filename = normalize_filename(filename)
285 return get_unique_file_path(output_dir, filename)
286
287
288@lazy

Callers

nothing calls this directly

Calls 3

normalize_filenameFunction · 0.70
get_unique_file_pathFunction · 0.70
formatMethod · 0.45

Tested by

no test coverage detected