Skip to content

[BUG] Testing skip not working properly for xdsl #8503

@dime10

Description

@dime10

Maybe someone can correct me here, but I don't think the pattern used here works as expected:

xdsl = pytest.importorskip("xdsl")
from xdsl.dialects.builtin import AnyAttr, TensorType, f32, i32, i64
from xdsl.ir import Attribute

Even with the tests skipped, the module would still run the import statements and run into an error when xdsl is not installed.

I get the following when running pytest:

tests/python_compiler/xdsl_extras/test_traits.py:26: in <module>
    from xdsl.dialects.builtin import AnyAttr, TensorType, f32, i32, i64
E   ModuleNotFoundError: No module named 'xdsl.dialects'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions