Add unit tests for MVC/Facade/Flyweight/Delegation and small fixes to enable pytest collection#464
Open
Binilkks wants to merge 1 commit intofaif:masterfrom
Open
Add unit tests for MVC/Facade/Flyweight/Delegation and small fixes to enable pytest collection#464Binilkks wants to merge 1 commit intofaif:masterfrom
Binilkks wants to merge 1 commit intofaif:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary: Add focused unit tests for several low-coverage modules and apply two minimal source fixes so the test suite can be collected and run reliably in CI/local dev.
Why: Running pytest previously failed during collection due to a missing import and missing typing names; these prevented adding tests and measuring coverage. This PR adds tests and the smallest safe changes needed to run them.
What I changed (files):
Added tests:
test_mvc.py
test_facade.py
test_flyweight.py
test_delegation.py
pytest_local.ini (temporary local pytest config to avoid project-wide doctest addopts during targeted runs)
Small source fixes:
mvc.py — removed invalid top-level from ProductModel import Price (module did not exist; file defines its own Price class).
memento.py — added missing typing imports (Any, Type) to avoid NameError during collection.