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

Readability changes to constants tests #27

Closed
wants to merge 6 commits into from

Conversation

sakchal
Copy link
Contributor

@sakchal sakchal commented Mar 12, 2024

This PR introduces a suite of unit tests for the constants.py located within the within the create_array directory. The primary function in this file facilitate the creation of an array with specified dimensions and a constant value.

Dtype Parameterization: Made this parametrization more readable for viewers.


dtype = dtypes.c32
dtype = c32
Copy link
Member

Choose a reason for hiding this comment

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

redundant?

"""Test if constant creates an array with the correct dtype."""
if dtype_index in [1, 3] or (dtype_index == 2 and not wrapper.get_dbl_support()):
if dtype in [c32, c64] or (dtype == f64 and not wrapper.get_dbl_support()):
Copy link
Member

Choose a reason for hiding this comment

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

could be reused in other places. maybe rip it out and make it a function

tests/test_constants.py Outdated Show resolved Hide resolved
@syurkevi
Copy link
Contributor

Can you rebase please?

@syurkevi syurkevi closed this Apr 12, 2024
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.

3 participants