-
-
Notifications
You must be signed in to change notification settings - Fork 228
Open
Description
Summarize the issue
VTXWriter is optional (adios2 does not support 32-bit systems for instance).
PR #3375 introduced DG0 support tested by test_dg_0_data.
The test checks if adios2 is available, skips if it is not, but only after trying to import VTXWriter. i.e. the test fails (is not skipped) when adios2 (and therefore VTXWriter) is not available.
The skip check for adios2 should be performed before importing VTXWriter.
How to reproduce the bug
pytest-3 -k test_dg_0_data test/unit/io/test_adios2.py
Minimal Example (Python)
Output (Python)
____________________________ TestVTX.test_dg_0_data ____________________________
self = <test_adios2.TestVTX object at 0xeb8f2c38>
tempdir = '/build/reproducible-path/fenics-dolfinx-0.10.0.post2/.pybuild/cpython3_3.13_dolfinx-real/build/test/unit/io/test_adios2_tempdir_master/test_dg_0_data__1'
def test_dg_0_data(self, tempdir):
"""Test that we can mix DG-0 and other Lagrange functions."""
> from dolfinx.io import VTXWriter
E ImportError: cannot import name 'VTXWriter' from 'dolfinx.io' (/build/reproducible-path/fenics-dolfinx-0.10.0.post2/.pybuild/cpython3_3.13_dolfinx-real/build/dolfinx/io/__init__.py)
test/unit/io/test_adios2.py:255: ImportErrorVersion
main branch
DOLFINx git commit
No response
Installation
No response
Additional information
No response
Metadata
Metadata
Assignees
Labels
No labels