Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add some tests functions #11

Closed
wants to merge 0 commits into from

Conversation

yucongalicechen
Copy link
Collaborator

@yucongalicechen yucongalicechen commented Apr 5, 2024

  • added test_get_grid_points.py, test_set_distances_at_angle.py
  • Slight mistake in functions.py: when we select the exit point it should be above the grid point, but when the grid point is at the bottom (0, -radius), we should compare the two roots instead of comparing with the grid point

Copy link
Contributor

@sbillinge sbillinge left a comment

Choose a reason for hiding this comment

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

good start, please see my inline comments.

def test_set_distances_at_angle():
actual_gs = Gridded_circle(radius=1, n_points_on_diameter=3, mu=1)

# tests for acute angles
Copy link
Contributor

Choose a reason for hiding this comment

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

when you do multiple tests it is better to use the @pytest.mark.paramatrize() decorator on the test function and run different examples as a list of tuples. You may be able to google how to do this.

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.

2 participants