Skip to content

Improve test coverage for dxtbx_machinery module #52

@coderabbitai

Description

@coderabbitai

Context

Test coverage is needed for the mdx2.dxtbx_machinery module to verify edge cases and improve code maintainability.

Specific Example

The calc_U_matrix_at_phi function has a potential edge case where the base index b from phi_to_base_fraction_index() may not be properly bounded by crystal.num_scan_points. This happens when crystal.num_scan_points != scan.get_num_images(), potentially causing an out-of-bounds access when calling crystal.get_U_at_scan_point(b).

Requested Action

Generate unit tests that:

  • Cover the edge case mentioned above
  • Test boundary conditions for scan-varying and non-scan-varying crystals
  • Validate behavior when crystal.num_scan_points differs from scan.get_num_images()
  • Improve overall test coverage for the dxtbx_machinery module

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions