Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions tests/test_import_order.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import pytest


def test_wrong_import_order():
from firedrake import UnitIntervalMesh, assemble, dx
mesh = UnitIntervalMesh(2)
assemble(1*dx(domain=mesh))

# the best we can do is to check for Exception
# because we cannot import IrksomeImportOrderException
# after firedrake without raising the exception
# or before firedrake without preventing the failure.
with pytest.raises(Exception):
import irksome # noqa F401

with pytest.raises(Exception):
from irksome import Dt # noqa F401
Loading