Skip to content

Conversation

@harryswift01
Copy link
Contributor

Summary

This PR aims to improve the test coverage of the levels.py module by implementing atomic tests for its classes and functions. The goal is to ensure the correctness of logic and numerical computations throughout the module.


Changes

Restructured Testing Order

  • Adopted a class-based structure for test cases, aligning with the format used in other parts of the codebase.
  • Improved readability and maintainability by grouping related tests.

Expanded Unit Tests for Core Functions

  • Added atomic tests for all major functions and classes in levels.py.
  • Included tests for the retrival of MDAnalysis Universes as well as geometric calculations.
  • In places where it is mathematically improbable to achieve, and difficult to test cases for # pragma: no cover has been utilised to signal this is the case

Impact

  • Significantly increases test coverage for levels.py, improving confidence in the module’s reliability.
  • Helps catch regressions and logic errors early in development.
  • Aligns testing practices with the rest of the codebase for consistency.

@harryswift01 harryswift01 added this to the 1.0.0 release milestone Jun 18, 2025
@harryswift01 harryswift01 requested a review from jimboid June 18, 2025 13:08
@harryswift01 harryswift01 self-assigned this Jun 18, 2025
@harryswift01 harryswift01 linked an issue Jun 18, 2025 that may be closed by this pull request
Copy link
Member

@jimboid jimboid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great PR, I see you solve the pragmas! Tests look comprehensive

@harryswift01 harryswift01 merged commit 572e5ed into main Jun 23, 2025
7 checks passed
@harryswift01 harryswift01 deleted the 94-improve-test-coverage-for-levels branch June 23, 2025 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Test Coverage for levels.py

3 participants