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

Tests from non-exposed modules can be tested if they're reexported from an exposed module #10

Closed
martijnbastiaan opened this issue Dec 29, 2021 · 0 comments · Fixed by #26
Labels
enhancement New feature or request

Comments

@martijnbastiaan
Copy link
Owner

martijnbastiaan commented Dec 29, 2021

As brought up in #6, doctest-parallel currently errors if it finds a doctest that is part of an internal module. This is usually the right thing to do: it couldn't access the function under test anyway. However, if that particular function is re-exported from an exposed module, it could technically access it. My guess is that this is currently hard-ish to implement, however, it should be easy once https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6224 is merged as we could easily compare names.

For me personally this is not a particularly high-priority issue (hence the enhancement label):

  • doctest-parallel currently errors in these cases, no tests will be silently ignored.
  • In almost all cases I consider hiding modules (and symbols) an anti-feature. If users want to use an internal symbol we (library authors) should let them. I'm therefore skeptical of the use of non-exposed modules in the first place.
@martijnbastiaan martijnbastiaan added the enhancement New feature or request label Dec 29, 2021
martijnbastiaan added a commit that referenced this issue Jan 5, 2022
Make runner omit the usual pre-test module import. This can be used to
test functions from non-exposed modules.

Closes #10
martijnbastiaan added a commit that referenced this issue Jan 5, 2022
Make runner omit the usual pre-test module import. This can be used to
test functions from non-exposed modules.

Closes #10
martijnbastiaan added a commit that referenced this issue Jan 5, 2022
Make runner omit the usual pre-test module import. This can be used to
test functions from non-exposed modules.

Closes #10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant