Side by Side Diff

Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Keyboard Shortcuts

File
u :up to issue
m :publish + mail comments
M :edit review message
j / k :jump to file after / before current file
J / K :jump to next file with a comment after / before current file
Side-by-side diff
i :toggle intra-line diffs
e :expand all comments
c :collapse all comments
s :toggle showing all comments
n / p :next / previous diff chunk or comment
N / P :next / previous comment
<Up> / <Down> :next / previous line
<Enter> :respond to / edit current comment
d :mark current comment as done
Issue
u :up to list of issues
m :publish + mail comments
j / k :jump to patch after / before current patch
o / <Enter> :open current patch in side-by-side view
i :open current patch in unified diff view
Issue List
j / k :jump to issue after / before current issue
o / <Enter> :open current issue
# : close issue
Comment/message editing
<Ctrl> + s or <Ctrl> + Enter :save comment
<Esc> :cancel edit
Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(546)
Issues Repositories Search
Open Issues | Closed Issues | All Issues | Sign in with your Google Account to create issues and add comments

Side by Side Diff: Lib/test/test_codecs.py

Issue 3004: (not quite finished) memoryview implementation (Closed) Base URL: http://svn.python.org/view/*checkout*/python/branches/py3k/
Patch Set: New patch after cosmetic changes suggested by Benjamin & GvR Created 17 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Lib/test/test_memoryview.py » ('j') | no next file with comments »
('i') | ('e') | ('c') | ('s')
OLDNEW
1 from test import support 1 from test import support
2 import unittest 2 import unittest
3 import codecs 3 import codecs
4 import sys, _testcapi, io 4 import sys, _testcapi, io
5 5
6 class Queue(object): 6 class Queue(object):
7 """ 7 """
8 queue: write bytes at one end, read bytes from the other end 8 queue: write bytes at one end, read bytes from the other end
9 """ 9 """
10 def __init__(self, buffer): 10 def __init__(self, buffer):
(...skipping 603 matching lines...) | | Loading...
614 "\ufeff\x00\xff\u07ff", 614 "\ufeff\x00\xff\u07ff",
615 "\ufeff\x00\xff\u07ff\u0800", 615 "\ufeff\x00\xff\u07ff\u0800",
616 "\ufeff\x00\xff\u07ff\u0800", 616 "\ufeff\x00\xff\u07ff\u0800",
617 "\ufeff\x00\xff\u07ff\u0800", 617 "\ufeff\x00\xff\u07ff\u0800",
618 "\ufeff\x00\xff\u07ff\u0800\uffff", 618 "\ufeff\x00\xff\u07ff\u0800\uffff",
619 ] 619 ]
620 ) 620 )
621 621
622 def test_bug1601501(self): 622 def test_bug1601501(self):
623 # SF bug #1601501: check that the codec works with a buffer 623 # SF bug #1601501: check that the codec works with a buffer
624 str(b"\xef\xbb\xbf", "utf-8-sig") 624 self.assertEquals(str(b"\xef\xbb\xbf", "utf-8-sig"), "")
625 625
626 def test_bom(self): 626 def test_bom(self):
627 d = codecs.getincrementaldecoder("utf-8-sig")() 627 d = codecs.getincrementaldecoder("utf-8-sig")()
628 s = "spam" 628 s = "spam"
629 self.assertEqual(d.decode(s.encode("utf-8-sig")), s) 629 self.assertEqual(d.decode(s.encode("utf-8-sig")), s)
630 630
631 def test_stream_bom(self): 631 def test_stream_bom(self):
632 unistring = "ABC\u00A1\u2200XYZ" 632 unistring = "ABC\u00A1\u2200XYZ"
633 bytestring = codecs.BOM_UTF8 + b"ABC\xC2\xA1\xE2\x88\x80XYZ" 633 bytestring = codecs.BOM_UTF8 + b"ABC\xC2\xA1\xE2\x88\x80XYZ"
634 634
(...skipping 864 matching lines...) | | Loading...
1499 StreamReaderTest, 1499 StreamReaderTest,
1500 EncodedFileTest, 1500 EncodedFileTest,
1501 BasicUnicodeTest, 1501 BasicUnicodeTest,
1502 CharmapTest, 1502 CharmapTest,
1503 WithStmtTest, 1503 WithStmtTest,
1504 ) 1504 )
1505 1505
1506 1506
1507 if __name__ == "__main__": 1507 if __name__ == "__main__":
1508 test_main() 1508 test_main()
OLDNEW
« no previous file with comments | « no previous file | Lib/test/test_memoryview.py » ('j') | no next file with comments »
Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b

AltStyle によって変換されたページ (->オリジナル) /