-
-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working