Skip to content
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

Test a few magics #12950

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft

Test a few magics #12950

wants to merge 14 commits into from

Conversation

illright
Copy link

@illright illright commented May 5, 2021

Here are a couple of unit tests for magics using pytest. Some of these tests are not passing yet, the relevant issues are #12946, #12947, #12948, #12949.

This PR also attempts to lay down some structure for the tests of magics by separating the tests for each magic into a class, grouping these classes into a module. This structure also allows for precise placement of test fixtures which are a very nice way of organizing setup/teardown in pytest.

Feedback would be highly appreciated, as we are new to this project and its structure.
For one, I don't think that we are able to get a fully working testing environment just by running pip install -e .[test]: we would still be missing matplotlib and pytest which we would have to install manually. I've brought up this issue in #12924 and got very comprehensive responses, but this aspect is still left unanswered. How to manage dependencies in this project?

@illright
Copy link
Author

illright commented May 5, 2021

This is currently a work-in-progress PR (forgot to mark it as one, and now I can't seem to find the button).

@ivanov ivanov marked this pull request as draft May 6, 2021 22:47
@ivanov
Copy link
Member

ivanov commented May 6, 2021

This is currently a work-in-progress PR (forgot to mark it as one, and now I can't seem to find the button).

Converted this for you - a link to convert to draft was under the "Reviewers" section.

@illright
Copy link
Author

illright commented May 7, 2021

By the way, the checks are failing because pytest tests are being run with iptest, therefore, the fixtures don't work.

@illright
Copy link
Author

Alright, we pushed our tests, now we could use some help with setting up the CI properly. Also I think the pytest tests are currently not being included in coverage.

@illright
Copy link
Author

There's one test that is failing for reasons unknown to us. It is IPython.core.tests.test_magics.test_history.TestRerun.test_no_args

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants