mirror of
https://github.com/codeflash-ai/codeflash-internal.git
synced 2026-05-04 18:25:18 +00:00
Merge pull request #1412 from codeflash-ai/minor-fixes-investigating-langflow
minor improvements when investigating langflow
This commit is contained in:
commit
31b4028ff2
2 changed files with 3 additions and 7 deletions
|
|
@ -70,8 +70,7 @@ def discover_tests_pytest(
|
|||
logger.exception(f"Failed to discover tests: {e}")
|
||||
exitcode = -1
|
||||
finally:
|
||||
with Path.open(tmp_pickle_path, "w") as f:
|
||||
pass
|
||||
tmp_pickle_path.unlink(missing_ok=True)
|
||||
if exitcode != 0:
|
||||
if exitcode == 2 and "ERROR collecting" in result.stdout:
|
||||
# Pattern matches "===== ERRORS =====" (any number of =) and captures everything after
|
||||
|
|
@ -102,7 +101,7 @@ def discover_tests_pytest(
|
|||
test_type = TestType.EXISTING_UNIT_TEST
|
||||
|
||||
test_obj = TestsInFile(
|
||||
test_file=test["test_file"],
|
||||
test_file=Path(test["test_file"]),
|
||||
test_class=test["test_class"],
|
||||
test_function=test["test_function"],
|
||||
test_type=test_type,
|
||||
|
|
@ -278,7 +277,7 @@ def process_test_files(
|
|||
try:
|
||||
definition = name.goto(follow_imports=True, follow_builtin_imports=False)
|
||||
except Exception as e:
|
||||
logger.exception(str(e))
|
||||
logger.debug(str(e))
|
||||
continue
|
||||
if definition and definition[0].type == "function":
|
||||
definition_path = str(definition[0].module_path)
|
||||
|
|
|
|||
|
|
@ -201,9 +201,6 @@ def get_functions_to_optimize(
|
|||
filtered_modified_functions, functions_count = filter_functions(
|
||||
functions, test_cfg.tests_root, ignore_paths, project_root, module_root
|
||||
)
|
||||
filtered_modified_functions, functions_count = filter_functions(
|
||||
functions, test_cfg.tests_root, ignore_paths, project_root, module_root
|
||||
)
|
||||
logger.info(f"Found {functions_count} function{'s' if functions_count > 1 else ''} to optimize")
|
||||
return filtered_modified_functions, functions_count
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue