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
Switch to pytest #850
Switch to pytest #850
Conversation
08c021f
to
8f65d0a
Compare
I suspect that this relates to #838. |
I do like the approach @normanlorrain used though. I think that's based on this doc. I could adopt tests to match that in a later PR, if it makes sense? |
8f65d0a
to
d73ed9a
Compare
I just went and used the approach suggested in #838 since it was cleaner than mine. Hopefully this makes sense now. |
d73ed9a
to
cb44e77
Compare
I'm speaking at a virtual conference this weekend, so may not get to it until next weekend. |
This is great, I think people really expect to be able to type For me, the fancytitles test fails (situation normal) but all my sphinx tests also fail:
I'm not sure if this is directly linked to this PR though since my python has seemed confused about where (@akrabat can you poke travis to repeat the build? It succeeded but I don't have rights to make it go again) |
Ah, these now expect the |
As for including pytest in the requirements, sure. I only omitted it because nose wasn't included previously. I'll tackle that as a follow up PR though |
This is inspired by pytest's "Working with non-python tests" guide [1]. In short, we iterate through the 'input' directory and attempt to find either files that end in '.txt' (meaning a test that should be run through the 'rst2pdf' binary) or directories that start with 'sphinx-' and contain a 'conf.py' file (meaning a test that should be run through the 'sphinx-build' binary). In both cases, we build the PDFs and compare checksums, just as we were doing before. We *haven't* migrated a lot of the tooling to add additional checksums, but that's okay since we can still do this manually and we plan to switch to image-based comparisons in the near future. [1] https://docs.pytest.org/en/5.4.1/example/nonpython.html Signed-off-by: Stephen Finucane <stephen@that.guru> Suggested-by: Norman Lorrain <normanlorrain@gmail.com>
Expose the new shiny. Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Stephen Finucane <stephen@that.guru>
This removes a lot of the functionality that allowed us to update checksums, but we want to replace that testing style with visual diffs so this isn't a big deal. Signed-off-by: Stephen Finucane <stephen@that.guru>
cb44e77
to
10e81f7
Compare
I've rebased and force pushed this branch in the hopes of stirring Travis into action. Hopefully that does the trick. @akrabat Anything else you need from me here? EDIT Yup, Travis is happy once again 🥳 |
I had a failure on sphinx-multidoc. Manual validation shows that files produced are correct, so I've added the hash my Mac created. Good to merge once Travis passes. |
From the nose website:
pytest is a good option that gives us much nicer output and makes running individual tests significantly easier. It's also faster. Much faster. On my local machine, current test execution drops by from ~430sec to ~330sec, and if the xdist plugin is enabled this drops even further to ~130sec.