3 from mozfile
import which
6 pytestmark
= pytest
.mark
.skipif(
7 not which("rstcheck"), reason
="rstcheck is not installed"
11 def test_basic(lint
, paths
):
12 results
= lint(paths())
13 assert len(results
) == 2
15 assert "Title underline too short" in results
[0].message
16 assert results
[0].level
== "error"
17 assert results
[0].relpath
== "bad.rst"
19 assert "Title overline & underline mismatch" in results
[1].message
20 assert results
[1].level
== "error"
21 assert results
[1].relpath
== "bad2.rst"
24 if __name__
== "__main__":