You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #28 I observed some failing tests locally that were not detected by the CI. Locally I get the following error if using e338d4b:
$ python3 setup.py test
...
ERROR: test_scalar_write (tests.integration.test_write_read.TestWriteandReadData.test_scalar_write)
Test to check if Adapter function write() passes correct parameters to the API function write_block_scalar_data()
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3.12/unittest/mock.py", line 1843, in _inner
return f(*args, **kw)
^^^^^^^^^^^^^^
File "/home/benjamin/Programming/fenicsx-adapter/tests/integration/test_write_read.py", line 67, in test_scalar_write
precice.initialize(right_boundary, self.scalar_V, self.scalar_function)
File "/home/benjamin/Programming/fenicsx-adapter/fenicsxprecice/fenicsxprecice.py", line 298, in initialize
if self._fenicsx_dims != self._participant.get_mesh_dimensions(self._config.get_coupling_mesh_name()):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Participant' object has no attribute 'get_mesh_dimensions'. Did you mean: 'get_dimensions'?
The error originates from the fact that we define a mock for get_dimensions (outdated API function) while the function initialize in fenicsxprecice.py expects get_mesh_dimensions. In bf5eda2 I fixed this issue by providing a mock for get_mesh_dimensions. Using bf5eda2 the tests work as expected locally and in the CI.
The reason for opening this issue is that (in contrast to my expectation and when running locally) the tests pass when using the CI for e338d4b.
The text was updated successfully, but these errors were encountered:
Locally I ran the tests locally the same way as specified in the CI pipeline and all tests passed. However, when calling it with python3 setup.py test I get the error Test correct checkpoint storing ... (0) 16:30:09 [xml::XMLParser]:173 in readXmlFile: ERROR: XML parser was unable to open configuration file "path/fenicsx-adapter/tests/dummy.xml"
I tried to reproduce the behavior of the CI using the following Dockerfile:
FROM dolfinx/dolfinx:v0.9.0
RUN git clone https://github.com/precice/fenicsx-adapter.git
WORKDIR fenicsx-adapter
RUN git checkout i32
RUN pip install setuptools==71.0.0
RUN mkdir -p precice
RUN echo "from setuptools import setup" >> precice/setup.py
RUN echo "setup(name='pyprecice', version='3.0.0')" >> precice/setup.py
RUN python3 -m pip install ./precice/
RUN python3 setup.py test -s tests.unit
RUN python3 setup.py test -s tests.integration
Running docker build . from the directory where the Dockerfile is stored also triggers the error from above.
In #28 I observed some failing tests locally that were not detected by the CI. Locally I get the following error if using e338d4b:
The error originates from the fact that we define a mock for
get_dimensions
(outdated API function) while the functioninitialize
infenicsxprecice.py
expectsget_mesh_dimensions
. In bf5eda2 I fixed this issue by providing a mock forget_mesh_dimensions
. Using bf5eda2 the tests work as expected locally and in the CI.The reason for opening this issue is that (in contrast to my expectation and when running locally) the tests pass when using the CI for e338d4b.
The text was updated successfully, but these errors were encountered: