Skip to content

Commit ec7961d

Browse files
committed
Test cases for ints and ints
See issue #67, note line number limitation.
1 parent 17dd803 commit ec7961d

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

tests/RST214/plurals.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""Print 'Hello world' to the terminal.
2+
3+
RST uses double backticks for ``literals`` like code
4+
snippets. Surprisingly ``literal``s is not valid,
5+
something you might see in examples like ``int``s
6+
talking about plurals of a datatype.
7+
8+
That is considered to be an error, and should fail::
9+
10+
$ flake8 --select RST RST214/plurals.py
11+
RST214/plurals.py:3:1: RST214 Inline literal start-string without end-string.
12+
RST214/plurals.py:3:1: RST214 Inline literal start-string without end-string.
13+
14+
Note the line number is unfortunately given as the
15+
start of the paragraph. The same happens with single
16+
backticks, see RST215.
17+
"""
18+
19+
print("Hello world")

tests/RST215/plurals.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
"""Print 'Hello world' to the terminal.
2+
3+
RST uses single backticks for inline `interpreted text`,
4+
and like inline literals with double backticks, this is
5+
often used for code snippets. Surprisingly trying to
6+
write plurals like `int`s is not valid RST.
7+
8+
That is considered to be an error, and should fail::
9+
10+
$ flake8 --select RST RST215/plurals.py
11+
RST215/plurals.py:3:1: RST215 Inline interpreted text or phrase reference start-string without end-string.
12+
13+
Note the line number is unfortunately given as the start
14+
of the paragraph. The same happens with double backticks
15+
for in-line literals, see RST214.
16+
""" # noqa: E501
17+
18+
print("Hello world")

0 commit comments

Comments
 (0)