-
Notifications
You must be signed in to change notification settings - Fork 903
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
Rewrite IPython extension tests #1839
Comments
In #1837 we have opted to skip some IPython tests. They pass individually but not as part of the whole test suite due to some interference with other tests. @noklam and I suspect this is related to #1787. I saw the same kind of non-deterministic test behaviour working on something else before which led to me adding the bit of code given there in kedro/tests/framework/cli/conftest.py. Depending on how the rewrite of this file works, #1787 may or may not be required to complete this. Also note that the IPython extension contains a function |
Brain dumps here:
Note that I try to run in debug mode in both situations
|
I am now more certain this is related to import. If I do
|
test_ipython.py is a bit of a mess. There's way too much mocking going on and it causes quite a few problems. I strongly suspect that it's not testing what we think it tests either, e.g. in
test_load_kedro_objects
if you alter the paths fromkedro_path / ...
to something else then the test will still pass.I think we should rewrite the whole file. This isn't necessarily a huge task in terms of writing code, because I suspect that some of the tests there are basically pointless even if they worked. But it will take some careful thought.
First stage of this is to ask what do we actually want to test here?
reload_kedro
function) then which parts of that are actually valuable to test? Are those best tested through unit tests or e2ebehave
test instead?IPython.testing.globalipapp.get_ipython
to the tests, which feels like a much better solution than all the mockingSecond stage is to write the new tests! Don't be afraid to delete old tests if they are no longer valuable. A good example of tests that will no longer be valuable is those that test behaviour of
default_project_path
. The flow for this should be way simpler and easier to test (maybe not even need tests at all depending on how it works) after #1840.The text was updated successfully, but these errors were encountered: