summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_doctest.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_doctest.py')
-rw-r--r--Lib/test/test_doctest.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/Lib/test/test_doctest.py b/Lib/test/test_doctest.py
index cb4e215..772dbd1 100644
--- a/Lib/test/test_doctest.py
+++ b/Lib/test/test_doctest.py
@@ -413,6 +413,23 @@ Compare `DocTest`:
False
>>> test != other_test
True
+ >>> test < other_test
+ False
+ >>> other_test < test
+ True
+
+Test comparison with lineno None on one side
+
+ >>> no_lineno = parser.get_doctest(docstring, globs, 'some_test',
+ ... 'some_test', None)
+ >>> test.lineno is None
+ False
+ >>> no_lineno.lineno is None
+ True
+ >>> test < no_lineno
+ False
+ >>> no_lineno < test
+ True
Compare `DocTestCase`: