moin
moin copied to clipboard
Make the "rst" converter tests independent of the local Docutils configuration.
Running pytest on a recent git checkout fails due to my local Docutils configuration differing from default settings.
I suppose the reason is, that I activate the smart_quotes transform in my /etc/docutils.conf.
As a result, ASCII-Quotes are converted to typographcal quotes, e.g.:
...
src/moin/converters/_tests/test_rst_in_out.py:202:
[...]
> assert self.handle_output(out) == output
E assert '\n.. figure:...o long ago.\n' == '\n.. figure:...o long ago.\n'
E Skipping 106 identical leading characters in diff, use -v to show
E - laced the "MoinMoin Man"
E ? ^ ^
E + laced the “MoinMoin Man”
E ? ^ ^
E logo long ago.
...
In Docutils, the test-publisher is always started with the internal "_disable_config" setting, e.g.
settings_overrides = {
'_disable_config': True,
# other settings,
}
result = core.publish_string(
input_sample, writer=html5_polyglot.Writer(),
settings_overrides=settings_overrides))
But I did not find where in the moin test suite the Docutils Publisher is called.