Open RobertoRoos opened 1 month ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
pyads/symbol.py | 23 | 24 | 95.83% | ||
pyads/connection.py | 7 | 9 | 77.78% | ||
<!-- | Total: | 30 | 33 | 90.91% | --> |
Totals | |
---|---|
Change from base Build 10633721828: | 0.06% |
Covered Lines: | 1753 |
Relevant Lines: | 1845 |
thanks @RobertoRoos , just had a look at this, I'm generally happy with this implementation. Could you just solve the conflict, please. I've also left a comment too in the review. It may be worth a few more tests, either unit or manual, to make sure we haven't broken any other edge cases such as when the user does pass in the type, or the wrong type etc. Also, maybe when structures are passed in, I wonder how it will handle ENUMS in structures....(not sure if that is possible in the struct def actually).
Can't see any reason why it would have broken anything else but being paranoid.
+ Added exception raising for unknown types
Fixes #263 . The issue is almost three years old, but still relevant.
This allows using enums both with
plc.read_by_name()
and throughAdsSymbol.read()
.Tested the code with:
Output: