Home | History | Annotate | Download | only in test

Lines Matching defs:check

8     def check(input, expect):
10 return check
36 # the StreamReader and check that the results equal the appropriate
45 # check that there's nothing left in the buffers
50 # do the check again, this time using a incremental decoder
56 # check that there's nothing left in the buffers
60 # Check whether the reset method works properly
66 # check that there's nothing left in the buffers
70 # check iterdecode()
271 # check whether there is exactly one BOM in it
441 # check whether there is exactly one BOM in it
682 # SF bug #1601501: check that the codec works with a buffer
747 check = coding_checker(self, decode)
748 check(b"[\\\n]", b"[]")
749 check(br'[\"]', b'["]')
750 check(br"[\']", b"[']")
751 check(br"[\\]", br"[\]")
752 check(br"[\a]", b"[\x07]")
753 check(br"[\b]", b"[\x08]")
754 check(br"[\t]", b"[\x09]")
755 check(br"[\n]", b"[\x0a]")
756 check(br"[\v]", b"[\x0b]")
757 check(br"[\f]", b"[\x0c]")
758 check(br"[\r]", b"[\x0d]")
759 check(br"[\7]", b"[\x07]")
760 check(br"[\8]", br"[\8]")
761 check(br"[\78]", b"[\x078]")
762 check(br"[\41]", b"[!]")
763 check(br"[\418]", b"[!8]")
764 check(br"[\101]", b"[A]")
765 check(br"[\1010]", b"[A0]")
766 check(br"[\501]", b"[A]")
767 check(br"[\x41]", b"[A]")
768 check(br"[\X41]", br"[\X41]")
769 check(br"[\x410]", b"[A0]")
773 check('\\' + b, '\\' + b)
1484 # check stream reader/writer
1500 # check incremental decoder/encoder (fetched via the Python
1508 # check incremental decoder/encoder
1520 # check C API
1532 # check iterencode()/iterdecode()
1536 # check iterencode()/iterdecode() with empty string
1541 # check incremental decoder/encoder with errors argument
1817 check = coding_checker(self, encode)
1818 check(u'\t', r'\t')
1819 check(u'\n', r'\n')
1820 check(u'\r', r'\r')
1821 check(u'\\', r'\\')
1824 check(unichr(b), '\\x%02x' % b)
1826 check(unichr(b), '\\x%02x' % b)
1827 check(u'\u20ac', r'\u20ac')
1828 check(u'\U0001d120', r'\U0001d120')
1832 check = coding_checker(self, decode)
1833 check("[\\\n]", u"[]")
1834 check(r'[\"]', u'["]')
1835 check(r"[\']", u"[']")
1836 check(r"[\\]", ur"[\]")
1837 check(r"[\a]", u"[\x07]")
1838 check(r"[\b]", u"[\x08]")
1839 check(r"[\t]", u"[\x09]")
1840 check(r"[\n]", u"[\x0a]")
1841 check(r"[\v]", u"[\x0b]")
1842 check(r"[\f]", u"[\x0c]")
1843 check(r"[\r]", u"[\x0d]")
1844 check(r"[\7]", u"[\x07]")
1845 check(r"[\8]", ur"[\8]")
1846 check(r"[\78]", u"[\x078]")
1847 check
1848 check(r"[\418]", u"[!8]")
1849 check(r"[\101]", u"[A]")
1850 check(r"[\1010]", u"[A0]")
1851 check(r"[\x41]", u"[A]")
1852 check(r"[\x410]", u"[A0]")
1853 check(r"\u20ac", u"\u20ac")
1854 check(r"\U0001d120", u"\U0001d120")
1857 check('\\' + chr(b), u'\\' + unichr(b))
1893 check = coding_checker(self, encode)
1896 check(u'\\' + unichr(b), '\\' + chr(b))
1897 check(u'\u20ac', r'\u20ac')
1898 check(u'\U0001d120', r'\U0001d120')
1902 check = coding_checker(self, decode)
1905 check('\\' + chr(b), u'\\' + unichr(b))
1906 check(r"\u20ac", u"\u20ac")
1907 check(r"\U0001d120", u"\U0001d120")
1937 # Check if the BOM is written only once
1946 # Check that the BOM is written after a seek(0)
1955 # (StreamWriter) Check that the BOM is written after a seek(0)
1964 # Check that the BOM is not written after a seek() at a position
1973 # (StreamWriter) Check that the BOM is not written after a seek()