WorkContext in src/fromager/context.py is the central state object passed to virtually every function in the codebase. It has 67% unit test coverage with only 1 explicit test function (test_pip_constraints_args) which tests the pip_constraint_args property. The remaining public methods have no dedicated unit tests.
setup() is exercised indirectly through test fixtures (tmp_context, testdata_context) but has no dedicated test verifying its behavior. package_build_info() has ~39 callers making it the most widely used method.
Scope
| Method |
Lines |
Callers |
enable_parallel_builds() |
98 |
1 |
wheels_build (property) |
102 |
10 |
pip_wheel_server_args (property) |
113 |
1 |
uv_clean_cache() |
136 |
1 |
write_to_graph_to_file() |
156 |
1 |
package_build_info() |
160 |
43 |
setup() |
169 |
1 |
clean_build_dirs() |
189 |
2 |
Acceptance Criteria
WorkContextinsrc/fromager/context.pyis the central state object passed to virtually every function in the codebase. It has 67% unit test coverage with only 1 explicit test function (test_pip_constraints_args) which tests thepip_constraint_argsproperty. The remaining public methods have no dedicated unit tests.setup()is exercised indirectly through test fixtures (tmp_context,testdata_context) but has no dedicated test verifying its behavior.package_build_info()has ~39 callers making it the most widely used method.Scope
enable_parallel_builds()wheels_build(property)pip_wheel_server_args(property)uv_clean_cache()write_to_graph_to_file()package_build_info()setup()clean_build_dirs()Acceptance Criteria
setup()-- test directory creation and idempotencypackage_build_info()-- test settings delegation with Requirement and stringenable_parallel_builds()+wheels_build-- test thread-specific path generationwrite_to_graph_to_file()-- test file creationpip_wheel_server_args-- test HTTPS and HTTP URL handlinguv_clean_cache()-- test empty args raises, test correct command and envclean_build_dirs()-- test safety check, cleanup enabled, cleanup disabled