fgmacedo / python-statemachine

Python Finite State Machines made easy.
MIT License
858 stars 84 forks source link

fix: Add support for pytest-mock spy method fixing the SignatureAdapter #392

Closed fgmacedo closed 1 year ago

fgmacedo commented 1 year ago

Fixes #391 .

Changed SignatureAdapter class to fix a bug where cls.from_callable(method) would return a Signature object instead of a SignatureAdapter if the method already had a Signature. Ensures that cls.from_callable(method) always returns a SignatureAdapter.

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

ghost commented 1 year ago
👇 Click on the image for a new way to code review #### [![Review these changes using an interactive CodeSee Map](https://s3.us-east-2.amazonaws.com/maps.codesee.io/images/github/fgmacedo/python-statemachine/392/48dfd2bc/2f17db95b060d96dd62727fa9b3567307972811e.svg)](https://app.codesee.io/r/reviews?pr=392&src=https%3A%2F%2Fgithub.com%2Ffgmacedo%2Fpython-statemachine) #### Legend CodeSee Map legend
codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (b936236) 100.00% compared to head (2f17db9) 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #392 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 20 20 Lines 985 991 +6 Branches 163 165 +2 ========================================= + Hits 985 991 +6 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `100.00% <100.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Fernando+Macedo#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://app.codecov.io/gh/fgmacedo/python-statemachine/pull/392?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Fernando+Macedo) | Coverage Δ | | |---|---|---| | [statemachine/signature.py](https://app.codecov.io/gh/fgmacedo/python-statemachine/pull/392?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Fernando+Macedo#diff-c3RhdGVtYWNoaW5lL3NpZ25hdHVyZS5weQ==) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.