-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Description
Bug 1
While running test_DFAfunctionsCython.py the test function test_computeEntMassAndForce an error is raised because the test variable areaEntrPart in line 92 mismatches the benchmark value of 1. It was found that, in the global function avaframe.tests.test_DFAfunctionsCython.pyx.computeEntMassAndForce only the data type of areaEntrPart in line 506 (and other variables) is defined. In test_computeEntMassAndForce the variable entrMassCell is set to 0 but the global function avaframe.tests.test_DFAfunctionsCython.pyx.computeEntMassAndForce is only defined for cases entrMassCell > 0. Thus, the output variable areaEntrPart is also undefined and an error is raised.
Maybe areaEntrPart (and the other variables) in avaframe.tests.test_DFAfunctionsCython.pyx.computeEntMassAndForce should be defined as cdef double areaEntrPart = 0?
Bug 2
While running test_DFAfunctionsCython.py ValueError: Buffer dtype mismatch, expected 'long' but got 'long long' is raised concerning the function test_updatePositionC.
The bug could be narrowed down to lines 541-544. It seems that the called global function DFAfuncC.updatePositionC in line 546 expects another data type than defined in line 541 cfg['GENERAL']['delStoppedParticles'] = '1'. It is assumed that this is a matter of defining the data type of the input variable.
To Reproduce
Steps to reproduce the behavior:
- Activate your AvaFrame pixi environment
- open your command prompt
- go to AvaFrame\avaframe\tests
- execute
pytest test_DFAfunctionsCython.py - See error
Expected behavior
All tests passed
Screenshots
Desktop (please complete the following information):
- OS: Windows 11 Pro
- Version 24H2