uncscode / particula

a simple, fast, and powerful particle simulator
https://uncscode.github.io/particula
MIT License
6 stars 9 forks source link

**suggestion (testing):** Consider adding tests for edge cases #501

Open mahf708 opened 1 month ago

mahf708 commented 1 month ago
          **suggestion (testing):** Consider adding tests for edge cases

With the removal of edge case values (0.1 and 0.0) from the test arrays, it might be beneficial to add separate unit tests that specifically target these edge cases to ensure the numerical issue is properly addressed.

    np.testing.assert_almost_equal(result_single, expected_single, decimal=4)

    # Test edge cases
    edge_case_input = np.array([0.1, 0.0])
    edge_case_result = transition_regime_coagulation(edge_case_input)
    edge_case_expected = np.array([0.0, 0.0])  # Adjust expected values as needed
    np.testing.assert_almost_equal(edge_case_result, edge_case_expected, decimal=4)

_Originally posted by @sourcery-ai[bot] in https://github.com/uncscode/particula/pull/500#discussion_r1799725572_