Show More
@@ -33,6 +33,8 b' from testpath import modified_env' | |||
|
33 | 33 | |
|
34 | 34 | from inspect import getmodule |
|
35 | 35 | |
|
36 | from pathlib import Path, PurePath | |
|
37 | ||
|
36 | 38 | # We are overriding the default doctest runner, so we need to import a few |
|
37 | 39 | # things from doctest directly |
|
38 | 40 | from doctest import (REPORTING_FLAGS, REPORT_ONLY_FIRST_FAILURE, |
@@ -687,9 +689,8 b' class ExtensionDoctest(doctests.Doctest):' | |||
|
687 | 689 | yield t |
|
688 | 690 | else: |
|
689 | 691 | if self.extension and anyp(filename.endswith, self.extension): |
|
690 |
name = |
|
|
691 |
|
|
|
692 | doc = dh.read() | |
|
692 | name = PurePath(filename).name | |
|
693 | doc = Path(filename).read_text() | |
|
693 | 694 | test = self.parser.get_doctest( |
|
694 | 695 | doc, globs={'__file__': filename}, name=name, |
|
695 | 696 | filename=filename, lineno=0) |
General Comments 0
You need to be logged in to leave comments.
Login now