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

Fix int dtype test #2533

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Fix int dtype test #2533

wants to merge 1 commit into from

Conversation

olebole
Copy link

@olebole olebole commented Mar 2, 2025

During the update of the Debian package for glue I observed one failure when the test runs on a 32-bit machine:

________________________________ test_dtype_int ________________________________
    def test_dtype_int():
        data = b'# a, b\n1, 1 \n2, 2 \n3, 3'
        with make_file(data, '.csv') as fname:
            d = df.load_data(fname)
>       assert d['a'].dtype == int
E       AssertionError: assert dtype('int64') == int
E        +  where dtype('int64') = array([1, 2, 3], dtype=int64).dtype
glue/core/data_factories/tests/test_data_factories.py:125: AssertionError

This patch fixes this by explicitly using np.int64 instead of int.

This one failed on 32 bit architectures
@dhomeier
Copy link
Collaborator

dhomeier commented Mar 3, 2025

Thanks for finding this! I suspect this has sneaked in with Numpy 2; just wondering if this still passes with Numpy 1.x on 32bit, but we don't have either in our test matrix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants