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
Embed: add more tests #7962
Embed: add more tests #7962
Conversation
- Make them more readable by splitting the html from the json file, similarly to what we do with the search tests. - Don't do two calls to storage, just open the file. - Remove unused requests adaptor (probably was something used before storage) Didn't bother to split the mkdocs json file, since that mkdocs doesn't output that kind of format anymore, we should start reading from the html file itself.
Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
- Use version.is_sphinx_type to choose between mkdocs or sphinx - Avoid nested code - Check for multiple queries inside a loop instead of several if's - Clean links only to the end result node, not to the whole body
Now is more easy to add more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a good refactor.
self.version = self.project.versions.get(slug=LATEST) | ||
|
||
settings.USE_SUBDOMAIN = True | ||
settings.PUBLIC_DOMAIN = 'readthedocs.io' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to do this here instead of @override_settings
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
override_settings doesn't work with pytest's style tests. pytest provides the settings fixture instead
Now is more easy to add more.
Based on #7955