bsl / oeis

Haskell interface to the Online Encyclopedia of Integer Sequences
Other
6 stars 6 forks source link

Test suite w/o network access #1

Closed peti closed 11 years ago

peti commented 11 years ago

The oeis test suite fails when run in an environment that doesn't allow network access. That is a common setup for many distributions, unfortunately, who then have to disable running the test suite altogether just to make the build succeed. Would it be possible to refactor that code so that tests which require network access can be run independently from those that do require network access?

bsl commented 11 years ago

Hi, sorry about the problem. Do you mean you're building packages for some Linux distribution?

I think it's somewhat strange to even run the unit tests in that case -- if it builds, it built. I have other packages with lots of unit tests, and perhaps 3 out of 50 fail, and the reasons for failure are out of my control, or being worked on by others, but those failing tests don't constitute a reason not to release the package. Put another way, the package is not better if I comment out the failing tests before release.

That said, I do intend to improve and refactor those tests. Like you say, they really should be independent of network access. So if you choose to keep requiring passing tests, the situation may be better soon.

Again, sorry about the trouble. Thanks for letting me know.

bsl commented 11 years ago

Hi, I refactored the tests not to require network access and uploaded oeis-0.3.3 to Hackage. Thanks again for calling this to my attention.