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

How to keep tests working across package versions? #144

Open
jsermeno opened this issue Nov 21, 2016 · 1 comment
Open

How to keep tests working across package versions? #144

jsermeno opened this issue Nov 21, 2016 · 1 comment

Comments

@jsermeno
Copy link

jsermeno commented Nov 21, 2016

Hi,

What's the best way to keep tests working when a package changes its Show instance? vector for example recently changed the way they display a vector. Is the only way to use cpp pre-processor statements? It might be cool if there was an "or" operator. For what's it worth it would solve my use case if ... matched the empty string as well, though it might be that the best way forward it to convert the test into a unit test.

Alternatively, is there a way to ignore a doctest? So that you could keep the test for documentation, while still running other doctests in the same file.

Thanks

@sol
Copy link
Owner

sol commented Apr 11, 2017

@jsermeno I don't have a good solution here. If you are actually testing your code (rather than using Doctest to make sure that examples in your documentation do actually work), then yes, converting to unit tests is the way to go.

On the other hand, if you actually want to test documentation, one solution may be to only run Doctest for the latest version of GHC with all the latest dependencies. Even though this is not a perfect solution, it may still give you reasonable confidence that your code examples work.

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

No branches or pull requests

2 participants