Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
update script to test readme.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Aug 11, 2015
1 parent 9cbd7bc commit 524c763
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion _unittests/ut_module/test_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,12 @@ def test_venv_docutils08_readme(self):
script = ["from docutils import core",
"import io",
'from docutils.readers.standalone import Reader',
'from docutils.parsers.rst import Parser',
'from docutils.writers.html4css1 import Writer',
"with open('{0}', 'r', encoding='utf8') as g: s = g.read()".format(
readme.replace("\\", "\\\\")),
"settings_overrides = {'output_encoding': 'unicode', 'doctitle_xform': True, 'initial_header_level': 2, 'warning_stream': io.StringIO()}",
"parts = core.publish_parts(source=s, reader=Reader(), source_path=None, destination_path=None, writer_name='html', settings_overrides=settings_overrides)",
"parts = core.publish_parts(source=s, parser=Parser(), reader=Reader(), source_path=None, destination_path=None, writer=Writer(), settings_overrides=settings_overrides)",
"with open('{0}', 'w', encoding='utf8') as f: f.write(parts['whole'])".format(
outfile.replace("\\", "\\\\")),
]
Expand Down

0 comments on commit 524c763

Please sign in to comment.