-
Notifications
You must be signed in to change notification settings - Fork 904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewriting the IPython test #2046
Conversation
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests are so much cleaner and easier to follow now! Great work on refactoring them ⭐
_ProjectPipelines is supposed to be lazy-loaded, but I found out that this line of code triggers the _load_data twice for some reason. Need more investigation.
Did you already found out what's happening with the above or do we need a follow up issue for that?
PROJECT_NAME = "fake_project_name" | ||
PROJECT_VERSION = "0.1" | ||
@pytest.fixture(autouse=True) | ||
def fake_metadata(tmp_path): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice cleanup here in making this a fixture 🧹
Signed-off-by: Nok Chan [email protected]
Description
Fix #1839
Development notes
The plan is to break down
TestLoadKedroObjects
into proper unit tests. the original tests are testing many things at the same time and arguably duplicated. The e2e behaviour is tested inbehave
already, so this test should really just focus on one thing at a time. This can reduce the mocking a little bit (a few mocking are still needed), but they are now easier to reason.Main Changes:
IPython
when possible, replace with theipython
fixture insteadpipeline
are wrongpipelines
object instead of_ProjectPipelines
, previously the tests will pass/fail sometimes because of the order of instantiation of theglobal
ormocking
sometimes flipped.Notes:
kedro/kedro/framework/session/session.py
Lines 258 to 260 in 82d69f4
_ProjectPipelines
is supposed to be lazy-loaded, but I found out that this line of code triggers the_load_data
twice for some reason. Need more investigation.Checklist
RELEASE.md
file