Navigation

It all started because I saw that pytest has options like
–doctest-glob and doctest_encoding, and I thought “Looks
promising, let’s quickly try them out…”

I try to summarize what I have been doing the last two days.

The biggest result is that the rst files under docs in The Lino Book are
now automatically being tested. We no longer need to explicitly add a
new test method when we add a new file. It is now easy to test a
single file:

The biggest work was that most of my “single-dir tutorials” have been
converted. Their index.rst file was not designed for doctest but for
lino.utils.test.DocTest. My idea with the “single-dir
tutorials” was to have everything (models, settings, a documentation
page) in one directory. But that idea turned out to be
contra-productive. I knew that one day I would have to do this
conversion, and I knew that it would be quite some work. I just didn’t
know that this day was now…

The biggest surprise was that I finally stopped using pytest for the
book project and use plain unittest now. That’s because of two
problems in pytest which seem to be show stoppers in our case:

pytest does not support unicode output.
There is still no other method than my atelier.doctest_utf8