Skip to content

Commit 16beb02

Browse files
committed
fix(discover): Fix pytest discovery for futurehouse structure
Revert "fix(discover): Fix pytest discovery for futurehouse structure" This reverts commit 40c48882b7413f5876af0e2e08d8f17a65bab091. Reapply "debug" This reverts commit c8297e5. Revert "not needed here" This reverts commit dd2c5cd. Revert "lower threshold and cleanup comments" This reverts commit 0e2f57e. Reapply "lower threshold and cleanup comments" This reverts commit e3b24f4a2967551eca8a19f96bf6647b23acdbbc. Reapply "not needed here" This reverts commit aec32103c931ff6d57dfa0d012113c2cec5d37a7. Revert "Reapply "debug"" This reverts commit 77ab9f34f858a17fb29764c544769a0eb72ce7f0. Reapply "fix(discover): Fix pytest discovery for futurehouse structure" This reverts commit 506b94ab4fe17a7c8e0d458253812758cced3f22. feat(futurehouse): Make futurehouse structure pytest compatible
1 parent c8297e5 commit 16beb02

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

code_to_optimize/code_directories/futurehouse_structure/src/__init__.py

Whitespace-only changes.

codeflash/discovery/discover_unit_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,8 +580,8 @@ def discover_tests_pytest(
580580
discover_only_these_tests: list[Path] | None = None,
581581
functions_to_optimize: list[FunctionToOptimize] | None = None,
582582
) -> tuple[dict[str, set[FunctionCalledInTest]], int, int]:
583-
tests_root = cfg.tests_root
584-
project_root = cfg.project_root_path
583+
tests_root = cfg.tests_project_rootdir
584+
project_root = cfg.tests_project_rootdir
585585

586586
tmp_pickle_path = get_run_tmp_file("collected_tests.pkl")
587587
with custom_addopts():

codeflash/discovery/pytest_new_process_discovery.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
collected_tests = []
1313
pytest_rootdir = None
1414
sys.path.insert(1, str(cwd))
15+
sys.path.insert(1, str(Path(cwd) / "src"))
1516

1617

1718
def parse_pytest_collection_results(pytest_tests: list[Any]) -> list[dict[str, str]]:

0 commit comments

Comments
 (0)