squishykid / solax

🌞 Solax Inverter API Wrapper
MIT License
100 stars 57 forks source link

Discovery non deterministic results #143

Open VadimKraus opened 6 months ago

VadimKraus commented 6 months ago

As discussed in #68, the discovery test will occasionally fail. This may result in an incorrect discovery. This issue is mainly related to following inverters and their similar schema:

<class 'solax.inverters.x1_boost.X1Boost'> <class 'solax.inverters.x1_mini_v34.X1MiniV34'>

Steps to reproduce:

pytest --count=10 tests/test_discovery.py::test_discovery

Actual result:

============================================== short test summary info ==============================================
FAILED tests/test_discovery.py::test_discovery[inverters_fixture4-1-10] - AssertionError: assert <class 'solax.inverters.x1_boost.X1Boost'> == <class 'solax.inverters.x1_mini_v34.X1MiniV34'>
FAILED tests/test_discovery.py::test_discovery[inverters_fixture4-2-10] - AssertionError: assert <class 'solax.inverters.x1_boost.X1Boost'> == <class 'solax.inverters.x1_mini_v34.X1MiniV34'>
FAILED tests/test_discovery.py::test_discovery[inverters_fixture4-6-10] - AssertionError: assert <class 'solax.inverters.x1_boost.X1Boost'> == <class 'solax.inverters.x1_mini_v34.X1MiniV34'>
FAILED tests/test_discovery.py::test_discovery[inverters_fixture4-9-10] - AssertionError: assert <class 'solax.inverters.x1_boost.X1Boost'> == <class 'solax.inverters.x1_mini_v34.X1MiniV34'>
===================================== 4 failed, 196 passed in 101.80s (0:01:41) =====================================

Expected result: No test failures