simplistix / sybil

Automated testing for the examples in your documentation.
https://sybil.readthedocs.io/en/latest/
Other
74 stars 14 forks source link

`skip: next` now seems to require an empty line after it #106

Closed wRAR closed 11 months ago

wRAR commented 11 months ago

Not sure if it's intended or not, but in 6.0 this no longer works:

Let's skips some stuff:

.. skip: next
.. code-block:: python

  run.append(1)

Modifying tests/samples/skip.txt in this way gives the following error:

E       ValueError: <Region start=70 end=124 evaluator=<sybil.evaluators.skip.Skipper object at 0x7f8515d8d490>><Parsed>('next', None)</Parsed></Region> from line 7, column 1 to line 11, column 1 overlaps <Region start=84 end=124 evaluator=<sybil.evaluators.python.PythonEvaluator object at 0x7f85152ff4d0>>
E       directive: 'code-block'
E       arguments: 'python'
E       source: 'run.append(1)\n'
E       options: {}
E       <Parsed>'run.append(1)\n'</Parsed></Region> from line 8, column 1 to line 11, column 1

If you leave at least an empty line between directives it still works.

cjw296 commented 11 months ago

Fixed in 3c7e52dd052fb1083c2c6e3fc96c118ca8837484, thanks for the report!

cjw296 commented 11 months ago

Released in 6.0.1