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

Issues with global imports before executing a doctest #72

Open
Erotemic opened this issue Jul 6, 2020 · 0 comments
Open

Issues with global imports before executing a doctest #72

Erotemic opened this issue Jul 6, 2020 · 0 comments

Comments

@Erotemic
Copy link
Owner

Erotemic commented Jul 6, 2020

In instances where the first line of a doctest is a REQUIRES statement like a module

            >>> # xdoctest: +REQUIRES(module:kwarray)

It should check if that requirement is satisfied before doing the global import. Furthermore, it should determine if any blocks of code are satisfied before doing a global import.

This is causing an issue in netharn.examples.object_detection, where there is a global kwimage import, but we are testing in minimal dependecy mode. All of the tests are marked as requiring the kwimage module. So it would be best of none of these tests were executed.

Additionally, there should be a way to globally disable a module from being included in xdoctest.

Additionally, when the global import fails, this breaks the entire harness run, not just the single doctest. That should be fixed such that only that doctest fails.

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

No branches or pull requests

1 participant