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 a test to line info #2947

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ Josh Shields <[email protected]>
Karan Desai <[email protected]>
Karan Desai <[email protected]> karandesai-96 <[email protected]>

Karthik Rishinarada <[email protected]>

Kaushik Varanasi <[email protected]>
Kaushik Varanasi <[email protected]> kaushik94 <[email protected]>

Expand Down
7 changes: 7 additions & 0 deletions tardis/visualization/widgets/tests/test_line_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ def test_get_species_interactions(
)
assert species_interactions_df.shape == (expected_df_length, 1)

def test_get_middle_half_edges(self, line_info_widget, wavelength_range, filter_mode):
arr = np.array([0, 1, 2, 3, 4])
res = line_info_widget.get_middle_half_edges(arr)
arr = np.sort(arr)
expected_res = [(arr[-1] - arr[0]) / 4 + arr[1], (arr[-1] - arr[0]) * 3 / 4 + arr[1]]
assert res == expected_res

@pytest.fixture
def allowed_species(self, line_info_widget, wavelength_range, filter_mode):
"""
Expand Down
Loading