-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from pheuer/coverage_improvements
Coverage improvements
- Loading branch information
Showing
12 changed files
with
285 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
"""_ | ||
This file contains tests for the etch/tools.py file. | ||
""" | ||
|
||
import numpy as np | ||
import pytest | ||
|
||
from cr39py.etch.tools import goal_diameter | ||
|
||
cases = [ | ||
(1e5, 0.05, 20, 4.06), | ||
# Extremely low fluence and high F2 to test max goal diameter | ||
(1e2, 0.2, 5, 5), | ||
] | ||
|
||
|
||
@pytest.mark.parametrize("fluence, desired_F2, max_goal, expected", cases) | ||
def test_goal_diameter(fluence, desired_F2, max_goal, expected): | ||
assert np.isclose(goal_diameter(fluence, desired_F2, max_goal), expected, rtol=0.03) | ||
|
||
|
||
def test_goal_diameter_raises(): | ||
""" | ||
Raise an exception if F2 > 0.3 | ||
""" | ||
with pytest.raises(ValueError): | ||
goal_diameter(1e5, 0.4, 20) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.