-
Notifications
You must be signed in to change notification settings - Fork 915
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
e2e-test for %load_node magic (#3528)
* e2e draft Signed-off-by: Nok <[email protected]> * Fix name collision Signed-off-by: Nok Lam Chan <[email protected]> * Add e2e test Signed-off-by: Nok Lam Chan <[email protected]> * protect script under __name__ Signed-off-by: Nok Lam Chan <[email protected]> * Fix test Signed-off-by: Nok Lam Chan <[email protected]> * remove test notebook Signed-off-by: Nok Lam Chan <[email protected]> * remove debug statement Signed-off-by: Nok Lam Chan <[email protected]> * revert changes Signed-off-by: Nok Lam Chan <[email protected]> * fix test Signed-off-by: Nok Lam Chan <[email protected]> * clean up notebook e2etest Signed-off-by: Nok <[email protected]> * fix test after node rename Signed-off-by: Nok <[email protected]> --------- Signed-off-by: Nok <[email protected]> Signed-off-by: Nok Lam Chan <[email protected]>
- Loading branch information
Showing
7 changed files
with
51 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Feature: load_node in new project | ||
|
||
Background: | ||
Given I have prepared a config file | ||
And I have run a non-interactive kedro new with starter "default" | ||
|
||
Scenario: Execute ipython load_node magic | ||
When I execute the load_node magic command | ||
Then the logs should show that load_node executed successfully |
This file contains 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
9 changes: 9 additions & 0 deletions
9
features/steps/test_starter/{{ cookiecutter.repo_name }}/ipython_script.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
if __name__ == "__main__": | ||
from IPython.testing.globalipapp import get_ipython | ||
ip = get_ipython() | ||
ip.run_line_magic("load_ext", "kedro.ipython") | ||
# Assume cwd is project root | ||
ip.run_line_magic("reload_kedro", "") | ||
ip.run_line_magic("load_node", "split_data_node") | ||
# ip.rl_next_input is what you see in the terminal input | ||
ip.run_cell(ip.rl_next_input) |
This file contains 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
This file contains 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
This file contains 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
This file contains 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