[hawkmoth] Re: [PATCH 3/4] test: transition directive tests to dynamically generated test methods

  • From: Jani Nikula <jani@xxxxxxxxxx>
  • To: Bruno Santos <brunomanuelsantos@xxxxxxxxxxxxxxxxxx>
  • Date: Tue, 29 Jan 2019 00:20:14 +0200

On Sun, 27 Jan 2019, Bruno Santos <brunomanuelsantos@xxxxxxxxxxxxxxxxxx> wrote:

I think you misunderstood me. I mean Sphinx's actual stdout (it doesn't
use stderr as it should), not the text/html output. This would be used
to look for build warnings and errors, which shouldn't be that hard.

Silly me, yes, we should do this. Sorry for the confusion.

I think the current output comparison is fine. Also, I still don't
understand in which cases the html comparison would be desirable. I'm
actually arguing we shouldn't care about it regardless of the
implementation being easy or not.

Two goals:

1. Ensure the directive actually does something.

2. Ensure what the directive feeds to Sphinx internals produces the same
output as Sphinx reading the rst from file.

If the expected rst contains a cross-reference, but the actual rst from
parser to Sphinx contains plain text, the Sphinx text builder loses the
distinction between the two. Both become plain text. The html build
preserves the distinction.

Of course, having the parser test should cover this case, and it's
unlikely the actual output fed to Sphinx internals would be different
from what is passed to the parser test.

BR,
Jani.

Other related posts: