diff options
Diffstat (limited to 'Lib/doctest.py')
-rw-r--r-- | Lib/doctest.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/doctest.py b/Lib/doctest.py index bcc200e..3b32004 100644 --- a/Lib/doctest.py +++ b/Lib/doctest.py @@ -1323,8 +1323,7 @@ class DocTestRunner: m = self.__LINECACHE_FILENAME_RE.match(filename) if m and m.group('name') == self.test.name: example = self.test.examples[int(m.group('examplenum'))] - source = example.source.encode('ascii', 'backslashreplace') - return source.splitlines(True) + return example.source.splitlines(True) else: return self.save_linecache_getlines(filename, module_globals) |