Skip to content

Tidy NDCube tests #844

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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Tidy NDCube tests #844

wants to merge 11 commits into from

Conversation

DanRyanIrish
Copy link
Member

@DanRyanIrish DanRyanIrish commented May 27, 2025

PR Description

This PR breaks test_ndcube.py into multiple files based on the functionalities being tested, as the file was becoming unwieldy.

DO NOT merge until after #840

To Do

@DanRyanIrish DanRyanIrish marked this pull request as draft May 27, 2025 13:34
@DanRyanIrish DanRyanIrish added this to the 2.4.0 milestone May 27, 2025
@DanRyanIrish DanRyanIrish marked this pull request as ready for review May 30, 2025 16:18
@DanRyanIrish
Copy link
Member Author

@nabobalis or @Cadair: Any objection to splitting up the NDCube tests like this?

ndc + value


@pytest.mark.parametrize(("ndc", "value", "expected_kwargs"),
Copy link
Member Author

Choose a reason for hiding this comment

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

@PCJY Will you give this function and the multiply test below a quick review? Just take a look and ask questions about anything you don't understand. If you happen to find any problems, please point those out too.

In summary, I replaced all the __add__ tests (except test_arithmetic_add_one_unit) with this one, which is similar to your multiply test below. That's because the code and logic tree is much simpler than when you first wrote the tests.

I also added an extra case in the parameterizations of your multiply test to catch all the cases.

@nabobalis
Copy link
Member

I see no issue with splitting up test files to make it clear what each file is testing.

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