##// END OF EJS Templates
contrib: fix import-checker to operate on str instead of bytes...
Augie Fackler -
r42580:04eb3c56 default
parent child Browse files
Show More
@@ -649,15 +649,15 b' def embedded(f, modname, src):'
649 649 ... print("%s %s %d" % (_forcestr(m), _forcestr(f), l))
650 650 ... print(repr(_forcestr(s)))
651 651 >>> lines = [
652 ... b'comment',
653 ... b' >>> from __future__ import print_function',
654 ... b" >>> ' multiline",
655 ... b" ... string'",
656 ... b' ',
657 ... b'comment',
658 ... b' $ cat > foo.py <<EOF',
659 ... b' > from __future__ import print_function',
660 ... b' > EOF',
652 ... 'comment',
653 ... ' >>> from __future__ import print_function',
654 ... " >>> ' multiline",
655 ... " ... string'",
656 ... ' ',
657 ... 'comment',
658 ... ' $ cat > foo.py <<EOF',
659 ... ' > from __future__ import print_function',
660 ... ' > EOF',
661 661 ... ]
662 662 >>> test(b"example.t", lines)
663 663 example[2] doctest.py 1
@@ -694,7 +694,7 b' def sources(f, modname):'
694 694 yield src.read(), modname, f, 0
695 695 py = True
696 696 if py or f.endswith('.t'):
697 with open(f, 'rb') as src:
697 with open(f, 'r') as src:
698 698 for script, modname, t, line in embedded(f, modname, src):
699 699 yield script, modname.encode('utf8'), t, line
700 700
General Comments 0
You need to be logged in to leave comments. Login now