Skip to content

cupy wrapper hides names #398

@ev-br

Description

@ev-br
$ pwd
/home/ev-br/repos/array-api-compat
$ pytest tests/test_all.py -v

=================================================== FAILURES ====================================================
__________________________________ test_compat_doesnt_hide_names[cupy-linalg] ___________________________________



library = 'cupy', module = 'linalg'

    @pytest.mark.parametrize("module", list(NAMES))
    @pytest.mark.parametrize("library", wrapped_libraries)
    def test_compat_doesnt_hide_names(library, module):
        """The base namespace can have more names than the ones explicitly exported
        by array-api-compat. Test that we're not suppressing them.
        """
        bare_mod = get_mod(library, module, compat=False)
        compat_mod = get_mod(library, module, compat=True)
    
        missing = all_names(bare_mod) - all_names(compat_mod)
        missing = {name for name in missing if not name.startswith("_")}
>       assert not missing, f"Non-Array API names have been hidden: {missing}"
E       AssertionError: Non-Array API names have been hidden: {'lstsq', 'annotations'}
E       assert not {'annotations', 'lstsq'}

tests/test_all.py:283: AssertionError
============================================ short test summary info ============================================
FAILED tests/test_all.py::test_compat_doesnt_hide_names[cupy-linalg] - AssertionError: Non-Array API names have been hidden: {'lstsq', 'annotations'}
========================================= 1 failed, 71 passed in 1.62s ==========================================

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions