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

Try harder to implement test fixtures as regular changelog text, or clean them up #46

Open
bitprophet opened this issue Apr 28, 2016 · 1 comment
Milestone

Comments

@bitprophet
Copy link
Owner

Right now the test suite is largely hand-made, semi-internal data structures, plus various wrappers tying them into real-enough structures that the top level API calls can work with. So e.g. one instantiates Issue and Release objects (or shorthand creating them) in some order, it round-trips into a parsed set of changelog nodes, then that result is introspected and asserted about.

It's pretty thorny, involves a large amount of (kinda ugly) extra test code, many layers due to differing abstraction needs for different tests, and most importantly means test fixtures look nothing like real (or doc example) changelogs - and it'd be nice if that were the case.

IIRC this was done in part because actually rendering Sphinx/ReST text without a real set of doc files on the filesystem was impossible or very hard (and of course, truly touching the FS makes tests that much slower, as per the integration suite).

That was 2-3 years ago and I'm wondering if A) my memory is wrong or B) things have improved since then (Sphinx has seen a good speed of dev in the last year+).


If it's still not feasible to do so (or if I am misremembering re: how often we generate things programmatically in a way that a text changelog simply can't handle) we should at least examine tightening up all the generation/manipulation code so it's more consistent & easier to reason about.

@bitprophet
Copy link
Owner Author

Heck, I just ran into some wasted time tonight because of the mismatch between the fixture-generating methods & a real changelog. Real changelog sufficed for troubleshooting until implementation worked, but test continued to fail because it didn't actually match the changelog. And this is not the first time this has happened.

@bitprophet bitprophet modified the milestone: 2.0 Apr 29, 2016
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