path
stringlengths 14
112
| content
stringlengths 0
6.32M
| size
int64 0
6.32M
| max_lines
int64 1
100k
| repo_name
stringclasses 2
values | autogenerated
bool 1
class |
---|---|---|---|---|---|
cosmopolitan/third_party/python/Lib/test/test_sax.py | # regression test for SAX 2.0
# $Id$
from xml.sax import make_parser, ContentHandler, \
SAXException, SAXReaderNotAvailable, SAXParseException
import unittest
from unittest import mock
try:
make_parser()
except SAXReaderNotAvailable:
# don't try to test this module if we cannot create a parser
raise unittest.SkipTest("no XML parsers available")
from xml.sax.saxutils import XMLGenerator, escape, unescape, quoteattr, \
XMLFilterBase, prepare_input_source
from xml.sax.expatreader import create_parser
from xml.sax.handler import feature_namespaces, feature_external_ges
from xml.sax.xmlreader import InputSource, AttributesImpl, AttributesNSImpl
from io import BytesIO, StringIO
import codecs
import gc
import os.path
import shutil
from urllib.error import URLError
from test import support
from test.support import findfile, run_unittest, TESTFN
from encodings import (
utf_8_sig,
utf_16,
utf_16_be,
utf_16_le,
utf_32,
utf_32_be,
utf_32_le,
)
TEST_XMLFILE = "/zip/.python/test/xmltestdata/test.xml"
TEST_XMLFILE_OUT = "/zip/.python/test/xmltestdata/test.xml.out"
try:
TEST_XMLFILE.encode("utf-8")
TEST_XMLFILE_OUT.encode("utf-8")
except UnicodeEncodeError:
raise unittest.SkipTest("filename is not encodable to utf8")
supports_nonascii_filenames = True
if not os.path.supports_unicode_filenames:
try:
support.TESTFN_UNICODE.encode(support.TESTFN_ENCODING)
except (UnicodeError, TypeError):
# Either the file system encoding is None, or the file name
# cannot be encoded in the file system encoding.
supports_nonascii_filenames = False
requires_nonascii_filenames = unittest.skipUnless(
supports_nonascii_filenames,
'Requires non-ascii filenames support')
ns_uri = "http://www.python.org/xml-ns/saxtest/"
class XmlTestBase(unittest.TestCase):
def verify_empty_attrs(self, attrs):
self.assertRaises(KeyError, attrs.getValue, "attr")
self.assertRaises(KeyError, attrs.getValueByQName, "attr")
self.assertRaises(KeyError, attrs.getNameByQName, "attr")
self.assertRaises(KeyError, attrs.getQNameByName, "attr")
self.assertRaises(KeyError, attrs.__getitem__, "attr")
self.assertEqual(attrs.getLength(), 0)
self.assertEqual(attrs.getNames(), [])
self.assertEqual(attrs.getQNames(), [])
self.assertEqual(len(attrs), 0)
self.assertNotIn("attr", attrs)
self.assertEqual(list(attrs.keys()), [])
self.assertEqual(attrs.get("attrs"), None)
self.assertEqual(attrs.get("attrs", 25), 25)
self.assertEqual(list(attrs.items()), [])
self.assertEqual(list(attrs.values()), [])
def verify_empty_nsattrs(self, attrs):
self.assertRaises(KeyError, attrs.getValue, (ns_uri, "attr"))
self.assertRaises(KeyError, attrs.getValueByQName, "ns:attr")
self.assertRaises(KeyError, attrs.getNameByQName, "ns:attr")
self.assertRaises(KeyError, attrs.getQNameByName, (ns_uri, "attr"))
self.assertRaises(KeyError, attrs.__getitem__, (ns_uri, "attr"))
self.assertEqual(attrs.getLength(), 0)
self.assertEqual(attrs.getNames(), [])
self.assertEqual(attrs.getQNames(), [])
self.assertEqual(len(attrs), 0)
self.assertNotIn((ns_uri, "attr"), attrs)
self.assertEqual(list(attrs.keys()), [])
self.assertEqual(attrs.get((ns_uri, "attr")), None)
self.assertEqual(attrs.get((ns_uri, "attr"), 25), 25)
self.assertEqual(list(attrs.items()), [])
self.assertEqual(list(attrs.values()), [])
def verify_attrs_wattr(self, attrs):
self.assertEqual(attrs.getLength(), 1)
self.assertEqual(attrs.getNames(), ["attr"])
self.assertEqual(attrs.getQNames(), ["attr"])
self.assertEqual(len(attrs), 1)
self.assertIn("attr", attrs)
self.assertEqual(list(attrs.keys()), ["attr"])
self.assertEqual(attrs.get("attr"), "val")
self.assertEqual(attrs.get("attr", 25), "val")
self.assertEqual(list(attrs.items()), [("attr", "val")])
self.assertEqual(list(attrs.values()), ["val"])
self.assertEqual(attrs.getValue("attr"), "val")
self.assertEqual(attrs.getValueByQName("attr"), "val")
self.assertEqual(attrs.getNameByQName("attr"), "attr")
self.assertEqual(attrs["attr"], "val")
self.assertEqual(attrs.getQNameByName("attr"), "attr")
def xml_str(doc, encoding=None):
if encoding is None:
return doc
return '<?xml version="1.0" encoding="%s"?>\n%s' % (encoding, doc)
def xml_bytes(doc, encoding, decl_encoding=...):
if decl_encoding is ...:
decl_encoding = encoding
return xml_str(doc, decl_encoding).encode(encoding, 'xmlcharrefreplace')
def make_xml_file(doc, encoding, decl_encoding=...):
if decl_encoding is ...:
decl_encoding = encoding
with open(TESTFN, 'w', encoding=encoding, errors='xmlcharrefreplace') as f:
f.write(xml_str(doc, decl_encoding))
class ParseTest(unittest.TestCase):
data = '<money value="$\xa3\u20ac\U0001017b">$\xa3\u20ac\U0001017b</money>'
def tearDown(self):
support.unlink(TESTFN)
def check_parse(self, f):
from xml.sax import parse
result = StringIO()
parse(f, XMLGenerator(result, 'utf-8'))
self.assertEqual(result.getvalue(), xml_str(self.data, 'utf-8'))
def test_parse_text(self):
encodings = ('us-ascii', 'iso-8859-1', 'utf-8',
'utf-16', 'utf-16le', 'utf-16be')
for encoding in encodings:
self.check_parse(StringIO(xml_str(self.data, encoding)))
make_xml_file(self.data, encoding)
with open(TESTFN, 'r', encoding=encoding) as f:
self.check_parse(f)
self.check_parse(StringIO(self.data))
make_xml_file(self.data, encoding, None)
with open(TESTFN, 'r', encoding=encoding) as f:
self.check_parse(f)
def test_parse_bytes(self):
# UTF-8 is default encoding, US-ASCII is compatible with UTF-8,
# UTF-16 is autodetected
encodings = ('us-ascii', 'utf-8', 'utf-16', 'utf-16le', 'utf-16be')
for encoding in encodings:
self.check_parse(BytesIO(xml_bytes(self.data, encoding)))
make_xml_file(self.data, encoding)
self.check_parse(TESTFN)
with open(TESTFN, 'rb') as f:
self.check_parse(f)
self.check_parse(BytesIO(xml_bytes(self.data, encoding, None)))
make_xml_file(self.data, encoding, None)
self.check_parse(TESTFN)
with open(TESTFN, 'rb') as f:
self.check_parse(f)
# accept UTF-8 with BOM
self.check_parse(BytesIO(xml_bytes(self.data, 'utf-8-sig', 'utf-8')))
make_xml_file(self.data, 'utf-8-sig', 'utf-8')
self.check_parse(TESTFN)
with open(TESTFN, 'rb') as f:
self.check_parse(f)
self.check_parse(BytesIO(xml_bytes(self.data, 'utf-8-sig', None)))
make_xml_file(self.data, 'utf-8-sig', None)
self.check_parse(TESTFN)
with open(TESTFN, 'rb') as f:
self.check_parse(f)
# accept data with declared encoding
self.check_parse(BytesIO(xml_bytes(self.data, 'iso-8859-1')))
make_xml_file(self.data, 'iso-8859-1')
self.check_parse(TESTFN)
with open(TESTFN, 'rb') as f:
self.check_parse(f)
# fail on non-UTF-8 incompatible data without declared encoding
with self.assertRaises(SAXException):
self.check_parse(BytesIO(xml_bytes(self.data, 'iso-8859-1', None)))
make_xml_file(self.data, 'iso-8859-1', None)
with self.assertRaises(SAXException):
self.check_parse(TESTFN)
with open(TESTFN, 'rb') as f:
with self.assertRaises(SAXException):
self.check_parse(f)
def test_parse_InputSource(self):
# accept data without declared but with explicitly specified encoding
make_xml_file(self.data, 'iso-8859-1', None)
with open(TESTFN, 'rb') as f:
input = InputSource()
input.setByteStream(f)
input.setEncoding('iso-8859-1')
self.check_parse(input)
def test_parse_close_source(self):
builtin_open = open
fileobj = None
def mock_open(*args):
nonlocal fileobj
fileobj = builtin_open(*args)
return fileobj
with mock.patch('xml.sax.saxutils.open', side_effect=mock_open):
make_xml_file(self.data, 'iso-8859-1', None)
with self.assertRaises(SAXException):
self.check_parse(TESTFN)
self.assertTrue(fileobj.closed)
def check_parseString(self, s):
from xml.sax import parseString
result = StringIO()
parseString(s, XMLGenerator(result, 'utf-8'))
self.assertEqual(result.getvalue(), xml_str(self.data, 'utf-8'))
def test_parseString_text(self):
encodings = ('us-ascii', 'iso-8859-1', 'utf-8',
'utf-16', 'utf-16le', 'utf-16be')
for encoding in encodings:
self.check_parseString(xml_str(self.data, encoding))
self.check_parseString(self.data)
def test_parseString_bytes(self):
# UTF-8 is default encoding, US-ASCII is compatible with UTF-8,
# UTF-16 is autodetected
encodings = ('us-ascii', 'utf-8', 'utf-16', 'utf-16le', 'utf-16be')
for encoding in encodings:
self.check_parseString(xml_bytes(self.data, encoding))
self.check_parseString(xml_bytes(self.data, encoding, None))
# accept UTF-8 with BOM
self.check_parseString(xml_bytes(self.data, 'utf-8-sig', 'utf-8'))
self.check_parseString(xml_bytes(self.data, 'utf-8-sig', None))
# accept data with declared encoding
self.check_parseString(xml_bytes(self.data, 'iso-8859-1'))
# fail on non-UTF-8 incompatible data without declared encoding
with self.assertRaises(SAXException):
self.check_parseString(xml_bytes(self.data, 'iso-8859-1', None))
class MakeParserTest(unittest.TestCase):
def test_make_parser2(self):
# Creating parsers several times in a row should succeed.
# Testing this because there have been failures of this kind
# before.
from xml.sax import make_parser
p = make_parser()
from xml.sax import make_parser
p = make_parser()
from xml.sax import make_parser
p = make_parser()
from xml.sax import make_parser
p = make_parser()
from xml.sax import make_parser
p = make_parser()
from xml.sax import make_parser
p = make_parser()
# ===========================================================================
#
# saxutils tests
#
# ===========================================================================
class SaxutilsTest(unittest.TestCase):
# ===== escape
def test_escape_basic(self):
self.assertEqual(escape("Donald Duck & Co"), "Donald Duck & Co")
def test_escape_all(self):
self.assertEqual(escape("<Donald Duck & Co>"),
"<Donald Duck & Co>")
def test_escape_extra(self):
self.assertEqual(escape("Hei pÃ¥ deg", {"Ã¥" : "å"}),
"Hei på deg")
# ===== unescape
def test_unescape_basic(self):
self.assertEqual(unescape("Donald Duck & Co"), "Donald Duck & Co")
def test_unescape_all(self):
self.assertEqual(unescape("<Donald Duck & Co>"),
"<Donald Duck & Co>")
def test_unescape_extra(self):
self.assertEqual(unescape("Hei pÃ¥ deg", {"Ã¥" : "å"}),
"Hei på deg")
def test_unescape_amp_extra(self):
self.assertEqual(unescape("&foo;", {"&foo;": "splat"}), "&foo;")
# ===== quoteattr
def test_quoteattr_basic(self):
self.assertEqual(quoteattr("Donald Duck & Co"),
'"Donald Duck & Co"')
def test_single_quoteattr(self):
self.assertEqual(quoteattr('Includes "double" quotes'),
'\'Includes "double" quotes\'')
def test_double_quoteattr(self):
self.assertEqual(quoteattr("Includes 'single' quotes"),
"\"Includes 'single' quotes\"")
def test_single_double_quoteattr(self):
self.assertEqual(quoteattr("Includes 'single' and \"double\" quotes"),
"\"Includes 'single' and "double" quotes\"")
# ===== make_parser
def test_make_parser(self):
# Creating a parser should succeed - it should fall back
# to the expatreader
p = make_parser(['xml.parsers.no_such_parser'])
class PrepareInputSourceTest(unittest.TestCase):
def setUp(self):
self.file = support.TESTFN
with open(self.file, "w") as tmp:
tmp.write("This was read from a file.")
def tearDown(self):
support.unlink(self.file)
def make_byte_stream(self):
return BytesIO(b"This is a byte stream.")
def make_character_stream(self):
return StringIO("This is a character stream.")
def checkContent(self, stream, content):
self.assertIsNotNone(stream)
self.assertEqual(stream.read(), content)
stream.close()
def test_character_stream(self):
# If the source is an InputSource with a character stream, use it.
src = InputSource(self.file)
src.setCharacterStream(self.make_character_stream())
prep = prepare_input_source(src)
self.assertIsNone(prep.getByteStream())
self.checkContent(prep.getCharacterStream(),
"This is a character stream.")
def test_byte_stream(self):
# If the source is an InputSource that does not have a character
# stream but does have a byte stream, use the byte stream.
src = InputSource(self.file)
src.setByteStream(self.make_byte_stream())
prep = prepare_input_source(src)
self.assertIsNone(prep.getCharacterStream())
self.checkContent(prep.getByteStream(),
b"This is a byte stream.")
def test_system_id(self):
# If the source is an InputSource that has neither a character
# stream nor a byte stream, open the system ID.
src = InputSource(self.file)
prep = prepare_input_source(src)
self.assertIsNone(prep.getCharacterStream())
self.checkContent(prep.getByteStream(),
b"This was read from a file.")
def test_string(self):
# If the source is a string, use it as a system ID and open it.
prep = prepare_input_source(self.file)
self.assertIsNone(prep.getCharacterStream())
self.checkContent(prep.getByteStream(),
b"This was read from a file.")
def test_binary_file(self):
# If the source is a binary file-like object, use it as a byte
# stream.
prep = prepare_input_source(self.make_byte_stream())
self.assertIsNone(prep.getCharacterStream())
self.checkContent(prep.getByteStream(),
b"This is a byte stream.")
def test_text_file(self):
# If the source is a text file-like object, use it as a character
# stream.
prep = prepare_input_source(self.make_character_stream())
self.assertIsNone(prep.getByteStream())
self.checkContent(prep.getCharacterStream(),
"This is a character stream.")
# ===== XMLGenerator
class XmlgenTest:
def test_xmlgen_basic(self):
result = self.ioclass()
gen = XMLGenerator(result)
gen.startDocument()
gen.startElement("doc", {})
gen.endElement("doc")
gen.endDocument()
self.assertEqual(result.getvalue(), self.xml("<doc></doc>"))
def test_xmlgen_basic_empty(self):
result = self.ioclass()
gen = XMLGenerator(result, short_empty_elements=True)
gen.startDocument()
gen.startElement("doc", {})
gen.endElement("doc")
gen.endDocument()
self.assertEqual(result.getvalue(), self.xml("<doc/>"))
def test_xmlgen_content(self):
result = self.ioclass()
gen = XMLGenerator(result)
gen.startDocument()
gen.startElement("doc", {})
gen.characters("huhei")
gen.endElement("doc")
gen.endDocument()
self.assertEqual(result.getvalue(), self.xml("<doc>huhei</doc>"))
def test_xmlgen_content_empty(self):
result = self.ioclass()
gen = XMLGenerator(result, short_empty_elements=True)
gen.startDocument()
gen.startElement("doc", {})
gen.characters("huhei")
gen.endElement("doc")
gen.endDocument()
self.assertEqual(result.getvalue(), self.xml("<doc>huhei</doc>"))
def test_xmlgen_pi(self):
result = self.ioclass()
gen = XMLGenerator(result)
gen.startDocument()
gen.processingInstruction("test", "data")
gen.startElement("doc", {})
gen.endElement("doc")
gen.endDocument()
self.assertEqual(result.getvalue(),
self.xml("<?test data?><doc></doc>"))
def test_xmlgen_content_escape(self):
result = self.ioclass()
gen = XMLGenerator(result)
gen.startDocument()
gen.startElement("doc", {})
gen.characters("<huhei&")
gen.endElement("doc")
gen.endDocument()
self.assertEqual(result.getvalue(),
self.xml("<doc><huhei&</doc>"))
def test_xmlgen_attr_escape(self):
result = self.ioclass()
gen = XMLGenerator(result)
gen.startDocument()
gen.startElement("doc", {"a": '"'})
gen.startElement("e", {"a": "'"})
gen.endElement("e")
gen.startElement("e", {"a": "'\""})
gen.endElement("e")
gen.startElement("e", {"a": "\n\r\t"})
gen.endElement("e")
gen.endElement("doc")
gen.endDocument()
self.assertEqual(result.getvalue(), self.xml(
"<doc a='\"'><e a=\"'\"></e>"
"<e a=\"'"\"></e>"
"<e a=\" 	\"></e></doc>"))
def test_xmlgen_encoding(self):
encodings = ('iso-8859-15', 'utf-8', 'utf-8-sig',
'utf-16', 'utf-16be', 'utf-16le',
'utf-32', 'utf-32be', 'utf-32le')
for encoding in encodings:
result = self.ioclass()
gen = XMLGenerator(result, encoding=encoding)
gen.startDocument()
gen.startElement("doc", {"a": '\u20ac'})
gen.characters("\u20ac")
gen.endElement("doc")
gen.endDocument()
self.assertEqual(result.getvalue(),
self.xml('<doc a="\u20ac">\u20ac</doc>', encoding=encoding))
def test_xmlgen_unencodable(self):
result = self.ioclass()
gen = XMLGenerator(result, encoding='ascii')
gen.startDocument()
gen.startElement("doc", {"a": '\u20ac'})
gen.characters("\u20ac")
gen.endElement("doc")
gen.endDocument()
self.assertEqual(result.getvalue(),
self.xml('<doc a="€">€</doc>', encoding='ascii'))
def test_xmlgen_ignorable(self):
result = self.ioclass()
gen = XMLGenerator(result)
gen.startDocument()
gen.startElement("doc", {})
gen.ignorableWhitespace(" ")
gen.endElement("doc")
gen.endDocument()
self.assertEqual(result.getvalue(), self.xml("<doc> </doc>"))
def test_xmlgen_ignorable_empty(self):
result = self.ioclass()
gen = XMLGenerator(result, short_empty_elements=True)
gen.startDocument()
gen.startElement("doc", {})
gen.ignorableWhitespace(" ")
gen.endElement("doc")
gen.endDocument()
self.assertEqual(result.getvalue(), self.xml("<doc> </doc>"))
def test_xmlgen_encoding_bytes(self):
encodings = ('iso-8859-15', 'utf-8', 'utf-8-sig',
'utf-16', 'utf-16be', 'utf-16le',
'utf-32', 'utf-32be', 'utf-32le')
for encoding in encodings:
result = self.ioclass()
gen = XMLGenerator(result, encoding=encoding)
gen.startDocument()
gen.startElement("doc", {"a": '\u20ac'})
gen.characters("\u20ac".encode(encoding))
gen.ignorableWhitespace(" ".encode(encoding))
gen.endElement("doc")
gen.endDocument()
self.assertEqual(result.getvalue(),
self.xml('<doc a="\u20ac">\u20ac </doc>', encoding=encoding))
def test_xmlgen_ns(self):
result = self.ioclass()
gen = XMLGenerator(result)
gen.startDocument()
gen.startPrefixMapping("ns1", ns_uri)
gen.startElementNS((ns_uri, "doc"), "ns1:doc", {})
# add an unqualified name
gen.startElementNS((None, "udoc"), None, {})
gen.endElementNS((None, "udoc"), None)
gen.endElementNS((ns_uri, "doc"), "ns1:doc")
gen.endPrefixMapping("ns1")
gen.endDocument()
self.assertEqual(result.getvalue(), self.xml(
'<ns1:doc xmlns:ns1="%s"><udoc></udoc></ns1:doc>' %
ns_uri))
def test_xmlgen_ns_empty(self):
result = self.ioclass()
gen = XMLGenerator(result, short_empty_elements=True)
gen.startDocument()
gen.startPrefixMapping("ns1", ns_uri)
gen.startElementNS((ns_uri, "doc"), "ns1:doc", {})
# add an unqualified name
gen.startElementNS((None, "udoc"), None, {})
gen.endElementNS((None, "udoc"), None)
gen.endElementNS((ns_uri, "doc"), "ns1:doc")
gen.endPrefixMapping("ns1")
gen.endDocument()
self.assertEqual(result.getvalue(), self.xml(
'<ns1:doc xmlns:ns1="%s"><udoc/></ns1:doc>' %
ns_uri))
def test_1463026_1(self):
result = self.ioclass()
gen = XMLGenerator(result)
gen.startDocument()
gen.startElementNS((None, 'a'), 'a', {(None, 'b'):'c'})
gen.endElementNS((None, 'a'), 'a')
gen.endDocument()
self.assertEqual(result.getvalue(), self.xml('<a b="c"></a>'))
def test_1463026_1_empty(self):
result = self.ioclass()
gen = XMLGenerator(result, short_empty_elements=True)
gen.startDocument()
gen.startElementNS((None, 'a'), 'a', {(None, 'b'):'c'})
gen.endElementNS((None, 'a'), 'a')
gen.endDocument()
self.assertEqual(result.getvalue(), self.xml('<a b="c"/>'))
def test_1463026_2(self):
result = self.ioclass()
gen = XMLGenerator(result)
gen.startDocument()
gen.startPrefixMapping(None, 'qux')
gen.startElementNS(('qux', 'a'), 'a', {})
gen.endElementNS(('qux', 'a'), 'a')
gen.endPrefixMapping(None)
gen.endDocument()
self.assertEqual(result.getvalue(), self.xml('<a xmlns="qux"></a>'))
def test_1463026_2_empty(self):
result = self.ioclass()
gen = XMLGenerator(result, short_empty_elements=True)
gen.startDocument()
gen.startPrefixMapping(None, 'qux')
gen.startElementNS(('qux', 'a'), 'a', {})
gen.endElementNS(('qux', 'a'), 'a')
gen.endPrefixMapping(None)
gen.endDocument()
self.assertEqual(result.getvalue(), self.xml('<a xmlns="qux"/>'))
def test_1463026_3(self):
result = self.ioclass()
gen = XMLGenerator(result)
gen.startDocument()
gen.startPrefixMapping('my', 'qux')
gen.startElementNS(('qux', 'a'), 'a', {(None, 'b'):'c'})
gen.endElementNS(('qux', 'a'), 'a')
gen.endPrefixMapping('my')
gen.endDocument()
self.assertEqual(result.getvalue(),
self.xml('<my:a xmlns:my="qux" b="c"></my:a>'))
def test_1463026_3_empty(self):
result = self.ioclass()
gen = XMLGenerator(result, short_empty_elements=True)
gen.startDocument()
gen.startPrefixMapping('my', 'qux')
gen.startElementNS(('qux', 'a'), 'a', {(None, 'b'):'c'})
gen.endElementNS(('qux', 'a'), 'a')
gen.endPrefixMapping('my')
gen.endDocument()
self.assertEqual(result.getvalue(),
self.xml('<my:a xmlns:my="qux" b="c"/>'))
def test_5027_1(self):
# The xml prefix (as in xml:lang below) is reserved and bound by
# definition to http://www.w3.org/XML/1998/namespace. XMLGenerator had
# a bug whereby a KeyError is raised because this namespace is missing
# from a dictionary.
#
# This test demonstrates the bug by parsing a document.
test_xml = StringIO(
'<?xml version="1.0"?>'
'<a:g1 xmlns:a="http://example.com/ns">'
'<a:g2 xml:lang="en">Hello</a:g2>'
'</a:g1>')
parser = make_parser()
parser.setFeature(feature_namespaces, True)
result = self.ioclass()
gen = XMLGenerator(result)
parser.setContentHandler(gen)
parser.parse(test_xml)
self.assertEqual(result.getvalue(),
self.xml(
'<a:g1 xmlns:a="http://example.com/ns">'
'<a:g2 xml:lang="en">Hello</a:g2>'
'</a:g1>'))
def test_5027_2(self):
# The xml prefix (as in xml:lang below) is reserved and bound by
# definition to http://www.w3.org/XML/1998/namespace. XMLGenerator had
# a bug whereby a KeyError is raised because this namespace is missing
# from a dictionary.
#
# This test demonstrates the bug by direct manipulation of the
# XMLGenerator.
result = self.ioclass()
gen = XMLGenerator(result)
gen.startDocument()
gen.startPrefixMapping('a', 'http://example.com/ns')
gen.startElementNS(('http://example.com/ns', 'g1'), 'g1', {})
lang_attr = {('http://www.w3.org/XML/1998/namespace', 'lang'): 'en'}
gen.startElementNS(('http://example.com/ns', 'g2'), 'g2', lang_attr)
gen.characters('Hello')
gen.endElementNS(('http://example.com/ns', 'g2'), 'g2')
gen.endElementNS(('http://example.com/ns', 'g1'), 'g1')
gen.endPrefixMapping('a')
gen.endDocument()
self.assertEqual(result.getvalue(),
self.xml(
'<a:g1 xmlns:a="http://example.com/ns">'
'<a:g2 xml:lang="en">Hello</a:g2>'
'</a:g1>'))
def test_no_close_file(self):
result = self.ioclass()
def func(out):
gen = XMLGenerator(out)
gen.startDocument()
gen.startElement("doc", {})
func(result)
self.assertFalse(result.closed)
def test_xmlgen_fragment(self):
result = self.ioclass()
gen = XMLGenerator(result)
# Don't call gen.startDocument()
gen.startElement("foo", {"a": "1.0"})
gen.characters("Hello")
gen.endElement("foo")
gen.startElement("bar", {"b": "2.0"})
gen.endElement("bar")
# Don't call gen.endDocument()
self.assertEqual(result.getvalue(),
self.xml('<foo a="1.0">Hello</foo><bar b="2.0"></bar>')[len(self.xml('')):])
class StringXmlgenTest(XmlgenTest, unittest.TestCase):
ioclass = StringIO
def xml(self, doc, encoding='iso-8859-1'):
return '<?xml version="1.0" encoding="%s"?>\n%s' % (encoding, doc)
test_xmlgen_unencodable = None
class BytesXmlgenTest(XmlgenTest, unittest.TestCase):
ioclass = BytesIO
def xml(self, doc, encoding='iso-8859-1'):
return ('<?xml version="1.0" encoding="%s"?>\n%s' %
(encoding, doc)).encode(encoding, 'xmlcharrefreplace')
class WriterXmlgenTest(BytesXmlgenTest):
class ioclass(list):
write = list.append
closed = False
def seekable(self):
return True
def tell(self):
# return 0 at start and not 0 after start
return len(self)
def getvalue(self):
return b''.join(self)
class StreamWriterXmlgenTest(XmlgenTest, unittest.TestCase):
def ioclass(self):
raw = BytesIO()
writer = codecs.getwriter('ascii')(raw, 'xmlcharrefreplace')
writer.getvalue = raw.getvalue
return writer
def xml(self, doc, encoding='iso-8859-1'):
return ('<?xml version="1.0" encoding="%s"?>\n%s' %
(encoding, doc)).encode('ascii', 'xmlcharrefreplace')
class StreamReaderWriterXmlgenTest(XmlgenTest, unittest.TestCase):
fname = support.TESTFN + '-codecs'
def ioclass(self):
writer = codecs.open(self.fname, 'w', encoding='ascii',
errors='xmlcharrefreplace', buffering=0)
def cleanup():
writer.close()
support.unlink(self.fname)
self.addCleanup(cleanup)
def getvalue():
# Windows will not let use reopen without first closing
writer.close()
with open(writer.name, 'rb') as f:
return f.read()
writer.getvalue = getvalue
return writer
def xml(self, doc, encoding='iso-8859-1'):
return ('<?xml version="1.0" encoding="%s"?>\n%s' %
(encoding, doc)).encode('ascii', 'xmlcharrefreplace')
start = b'<?xml version="1.0" encoding="iso-8859-1"?>\n'
class XMLFilterBaseTest(unittest.TestCase):
def test_filter_basic(self):
result = BytesIO()
gen = XMLGenerator(result)
filter = XMLFilterBase()
filter.setContentHandler(gen)
filter.startDocument()
filter.startElement("doc", {})
filter.characters("content")
filter.ignorableWhitespace(" ")
filter.endElement("doc")
filter.endDocument()
self.assertEqual(result.getvalue(), start + b"<doc>content </doc>")
# ===========================================================================
#
# expatreader tests
#
# ===========================================================================
with open(TEST_XMLFILE_OUT, 'rb') as f:
xml_test_out = f.read()
class ExpatReaderTest(XmlTestBase):
# ===== XMLReader support
def test_expat_binary_file(self):
parser = create_parser()
result = BytesIO()
xmlgen = XMLGenerator(result)
parser.setContentHandler(xmlgen)
with open(TEST_XMLFILE, 'rb') as f:
parser.parse(f)
self.assertEqual(result.getvalue(), xml_test_out)
def test_expat_text_file(self):
parser = create_parser()
result = BytesIO()
xmlgen = XMLGenerator(result)
parser.setContentHandler(xmlgen)
with open(TEST_XMLFILE, 'rt', encoding='iso-8859-1') as f:
parser.parse(f)
self.assertEqual(result.getvalue(), xml_test_out)
@requires_nonascii_filenames
def test_expat_binary_file_nonascii(self):
fname = support.TESTFN_UNICODE
shutil.copyfile(TEST_XMLFILE, fname)
self.addCleanup(support.unlink, fname)
parser = create_parser()
result = BytesIO()
xmlgen = XMLGenerator(result)
parser.setContentHandler(xmlgen)
parser.parse(open(fname, 'rb'))
self.assertEqual(result.getvalue(), xml_test_out)
def test_expat_binary_file_bytes_name(self):
fname = os.fsencode(TEST_XMLFILE)
parser = create_parser()
result = BytesIO()
xmlgen = XMLGenerator(result)
parser.setContentHandler(xmlgen)
with open(fname, 'rb') as f:
parser.parse(f)
self.assertEqual(result.getvalue(), xml_test_out)
def test_expat_binary_file_int_name(self):
parser = create_parser()
result = BytesIO()
xmlgen = XMLGenerator(result)
parser.setContentHandler(xmlgen)
with open(TEST_XMLFILE, 'rb') as f:
with open(f.fileno(), 'rb', closefd=False) as f2:
parser.parse(f2)
self.assertEqual(result.getvalue(), xml_test_out)
# ===== DTDHandler support
class TestDTDHandler:
def __init__(self):
self._notations = []
self._entities = []
def notationDecl(self, name, publicId, systemId):
self._notations.append((name, publicId, systemId))
def unparsedEntityDecl(self, name, publicId, systemId, ndata):
self._entities.append((name, publicId, systemId, ndata))
class TestEntityRecorder:
def __init__(self):
self.entities = []
def resolveEntity(self, publicId, systemId):
self.entities.append((publicId, systemId))
source = InputSource()
source.setPublicId(publicId)
source.setSystemId(systemId)
return source
def test_expat_dtdhandler(self):
parser = create_parser()
handler = self.TestDTDHandler()
parser.setDTDHandler(handler)
parser.feed('<!DOCTYPE doc [\n')
parser.feed(' <!ENTITY img SYSTEM "expat.gif" NDATA GIF>\n')
parser.feed(' <!NOTATION GIF PUBLIC "-//CompuServe//NOTATION Graphics Interchange Format 89a//EN">\n')
parser.feed(']>\n')
parser.feed('<doc></doc>')
parser.close()
self.assertEqual(handler._notations,
[("GIF", "-//CompuServe//NOTATION Graphics Interchange Format 89a//EN", None)])
self.assertEqual(handler._entities, [("img", None, "expat.gif", "GIF")])
def test_expat_external_dtd_enabled(self):
parser = create_parser()
parser.setFeature(feature_external_ges, True)
resolver = self.TestEntityRecorder()
parser.setEntityResolver(resolver)
with self.assertRaises(URLError):
parser.feed(
'<!DOCTYPE external SYSTEM "unsupported://non-existing">\n'
)
self.assertEqual(
resolver.entities, [(None, 'unsupported://non-existing')]
)
def test_expat_external_dtd_default(self):
parser = create_parser()
resolver = self.TestEntityRecorder()
parser.setEntityResolver(resolver)
parser.feed(
'<!DOCTYPE external SYSTEM "unsupported://non-existing">\n'
)
parser.feed('<doc />')
parser.close()
self.assertEqual(resolver.entities, [])
# ===== EntityResolver support
class TestEntityResolver:
def resolveEntity(self, publicId, systemId):
inpsrc = InputSource()
inpsrc.setByteStream(BytesIO(b"<entity/>"))
return inpsrc
def test_expat_entityresolver_enabled(self):
parser = create_parser()
parser.setFeature(feature_external_ges, True)
parser.setEntityResolver(self.TestEntityResolver())
result = BytesIO()
parser.setContentHandler(XMLGenerator(result))
parser.feed('<!DOCTYPE doc [\n')
parser.feed(' <!ENTITY test SYSTEM "whatever">\n')
parser.feed(']>\n')
parser.feed('<doc>&test;</doc>')
parser.close()
self.assertEqual(result.getvalue(), start +
b"<doc><entity></entity></doc>")
def test_expat_entityresolver_default(self):
parser = create_parser()
self.assertEqual(parser.getFeature(feature_external_ges), False)
parser.setEntityResolver(self.TestEntityResolver())
result = BytesIO()
parser.setContentHandler(XMLGenerator(result))
parser.feed('<!DOCTYPE doc [\n')
parser.feed(' <!ENTITY test SYSTEM "whatever">\n')
parser.feed(']>\n')
parser.feed('<doc>&test;</doc>')
parser.close()
self.assertEqual(result.getvalue(), start +
b"<doc></doc>")
# ===== Attributes support
class AttrGatherer(ContentHandler):
def startElement(self, name, attrs):
self._attrs = attrs
def startElementNS(self, name, qname, attrs):
self._attrs = attrs
def test_expat_attrs_empty(self):
parser = create_parser()
gather = self.AttrGatherer()
parser.setContentHandler(gather)
parser.feed("<doc/>")
parser.close()
self.verify_empty_attrs(gather._attrs)
def test_expat_attrs_wattr(self):
parser = create_parser()
gather = self.AttrGatherer()
parser.setContentHandler(gather)
parser.feed("<doc attr='val'/>")
parser.close()
self.verify_attrs_wattr(gather._attrs)
def test_expat_nsattrs_empty(self):
parser = create_parser(1)
gather = self.AttrGatherer()
parser.setContentHandler(gather)
parser.feed("<doc/>")
parser.close()
self.verify_empty_nsattrs(gather._attrs)
def test_expat_nsattrs_wattr(self):
parser = create_parser(1)
gather = self.AttrGatherer()
parser.setContentHandler(gather)
parser.feed("<doc xmlns:ns='%s' ns:attr='val'/>" % ns_uri)
parser.close()
attrs = gather._attrs
self.assertEqual(attrs.getLength(), 1)
self.assertEqual(attrs.getNames(), [(ns_uri, "attr")])
self.assertTrue((attrs.getQNames() == [] or
attrs.getQNames() == ["ns:attr"]))
self.assertEqual(len(attrs), 1)
self.assertIn((ns_uri, "attr"), attrs)
self.assertEqual(attrs.get((ns_uri, "attr")), "val")
self.assertEqual(attrs.get((ns_uri, "attr"), 25), "val")
self.assertEqual(list(attrs.items()), [((ns_uri, "attr"), "val")])
self.assertEqual(list(attrs.values()), ["val"])
self.assertEqual(attrs.getValue((ns_uri, "attr")), "val")
self.assertEqual(attrs[(ns_uri, "attr")], "val")
# ===== InputSource support
def test_expat_inpsource_filename(self):
parser = create_parser()
result = BytesIO()
xmlgen = XMLGenerator(result)
parser.setContentHandler(xmlgen)
parser.parse(TEST_XMLFILE)
self.assertEqual(result.getvalue(), xml_test_out)
def test_expat_inpsource_sysid(self):
parser = create_parser()
result = BytesIO()
xmlgen = XMLGenerator(result)
parser.setContentHandler(xmlgen)
parser.parse(InputSource(TEST_XMLFILE))
self.assertEqual(result.getvalue(), xml_test_out)
@requires_nonascii_filenames
def test_expat_inpsource_sysid_nonascii(self):
fname = support.TESTFN_UNICODE
shutil.copyfile(TEST_XMLFILE, fname)
self.addCleanup(support.unlink, fname)
parser = create_parser()
result = BytesIO()
xmlgen = XMLGenerator(result)
parser.setContentHandler(xmlgen)
parser.parse(InputSource(fname))
self.assertEqual(result.getvalue(), xml_test_out)
def test_expat_inpsource_byte_stream(self):
parser = create_parser()
result = BytesIO()
xmlgen = XMLGenerator(result)
parser.setContentHandler(xmlgen)
inpsrc = InputSource()
with open(TEST_XMLFILE, 'rb') as f:
inpsrc.setByteStream(f)
parser.parse(inpsrc)
self.assertEqual(result.getvalue(), xml_test_out)
def test_expat_inpsource_character_stream(self):
parser = create_parser()
result = BytesIO()
xmlgen = XMLGenerator(result)
parser.setContentHandler(xmlgen)
inpsrc = InputSource()
with open(TEST_XMLFILE, 'rt', encoding='iso-8859-1') as f:
inpsrc.setCharacterStream(f)
parser.parse(inpsrc)
self.assertEqual(result.getvalue(), xml_test_out)
# ===== IncrementalParser support
def test_expat_incremental(self):
result = BytesIO()
xmlgen = XMLGenerator(result)
parser = create_parser()
parser.setContentHandler(xmlgen)
parser.feed("<doc>")
parser.feed("</doc>")
parser.close()
self.assertEqual(result.getvalue(), start + b"<doc></doc>")
def test_expat_incremental_reset(self):
result = BytesIO()
xmlgen = XMLGenerator(result)
parser = create_parser()
parser.setContentHandler(xmlgen)
parser.feed("<doc>")
parser.feed("text")
result = BytesIO()
xmlgen = XMLGenerator(result)
parser.setContentHandler(xmlgen)
parser.reset()
parser.feed("<doc>")
parser.feed("text")
parser.feed("</doc>")
parser.close()
self.assertEqual(result.getvalue(), start + b"<doc>text</doc>")
# ===== Locator support
def test_expat_locator_noinfo(self):
result = BytesIO()
xmlgen = XMLGenerator(result)
parser = create_parser()
parser.setContentHandler(xmlgen)
parser.feed("<doc>")
parser.feed("</doc>")
parser.close()
self.assertEqual(parser.getSystemId(), None)
self.assertEqual(parser.getPublicId(), None)
self.assertEqual(parser.getLineNumber(), 1)
def test_expat_locator_withinfo(self):
result = BytesIO()
xmlgen = XMLGenerator(result)
parser = create_parser()
parser.setContentHandler(xmlgen)
parser.parse(TEST_XMLFILE)
self.assertEqual(parser.getSystemId(), TEST_XMLFILE)
self.assertEqual(parser.getPublicId(), None)
@requires_nonascii_filenames
def test_expat_locator_withinfo_nonascii(self):
fname = support.TESTFN_UNICODE
shutil.copyfile(TEST_XMLFILE, fname)
self.addCleanup(support.unlink, fname)
result = BytesIO()
xmlgen = XMLGenerator(result)
parser = create_parser()
parser.setContentHandler(xmlgen)
parser.parse(fname)
self.assertEqual(parser.getSystemId(), fname)
self.assertEqual(parser.getPublicId(), None)
# ===========================================================================
#
# error reporting
#
# ===========================================================================
class ErrorReportingTest(unittest.TestCase):
def test_expat_inpsource_location(self):
parser = create_parser()
parser.setContentHandler(ContentHandler()) # do nothing
source = InputSource()
source.setByteStream(BytesIO(b"<foo bar foobar>")) #ill-formed
name = "a file name"
source.setSystemId(name)
try:
parser.parse(source)
self.fail()
except SAXException as e:
self.assertEqual(e.getSystemId(), name)
def test_expat_incomplete(self):
parser = create_parser()
parser.setContentHandler(ContentHandler()) # do nothing
self.assertRaises(SAXParseException, parser.parse, StringIO("<foo>"))
self.assertEqual(parser.getColumnNumber(), 5)
self.assertEqual(parser.getLineNumber(), 1)
def test_sax_parse_exception_str(self):
# pass various values from a locator to the SAXParseException to
# make sure that the __str__() doesn't fall apart when None is
# passed instead of an integer line and column number
#
# use "normal" values for the locator:
str(SAXParseException("message", None,
self.DummyLocator(1, 1)))
# use None for the line number:
str(SAXParseException("message", None,
self.DummyLocator(None, 1)))
# use None for the column number:
str(SAXParseException("message", None,
self.DummyLocator(1, None)))
# use None for both:
str(SAXParseException("message", None,
self.DummyLocator(None, None)))
class DummyLocator:
def __init__(self, lineno, colno):
self._lineno = lineno
self._colno = colno
def getPublicId(self):
return "pubid"
def getSystemId(self):
return "sysid"
def getLineNumber(self):
return self._lineno
def getColumnNumber(self):
return self._colno
# ===========================================================================
#
# xmlreader tests
#
# ===========================================================================
class XmlReaderTest(XmlTestBase):
# ===== AttributesImpl
def test_attrs_empty(self):
self.verify_empty_attrs(AttributesImpl({}))
def test_attrs_wattr(self):
self.verify_attrs_wattr(AttributesImpl({"attr" : "val"}))
def test_nsattrs_empty(self):
self.verify_empty_nsattrs(AttributesNSImpl({}, {}))
def test_nsattrs_wattr(self):
attrs = AttributesNSImpl({(ns_uri, "attr") : "val"},
{(ns_uri, "attr") : "ns:attr"})
self.assertEqual(attrs.getLength(), 1)
self.assertEqual(attrs.getNames(), [(ns_uri, "attr")])
self.assertEqual(attrs.getQNames(), ["ns:attr"])
self.assertEqual(len(attrs), 1)
self.assertIn((ns_uri, "attr"), attrs)
self.assertEqual(list(attrs.keys()), [(ns_uri, "attr")])
self.assertEqual(attrs.get((ns_uri, "attr")), "val")
self.assertEqual(attrs.get((ns_uri, "attr"), 25), "val")
self.assertEqual(list(attrs.items()), [((ns_uri, "attr"), "val")])
self.assertEqual(list(attrs.values()), ["val"])
self.assertEqual(attrs.getValue((ns_uri, "attr")), "val")
self.assertEqual(attrs.getValueByQName("ns:attr"), "val")
self.assertEqual(attrs.getNameByQName("ns:attr"), (ns_uri, "attr"))
self.assertEqual(attrs[(ns_uri, "attr")], "val")
self.assertEqual(attrs.getQNameByName((ns_uri, "attr")), "ns:attr")
def test_main():
run_unittest(MakeParserTest,
ParseTest,
SaxutilsTest,
PrepareInputSourceTest,
StringXmlgenTest,
BytesXmlgenTest,
WriterXmlgenTest,
StreamWriterXmlgenTest,
StreamReaderWriterXmlgenTest,
ExpatReaderTest,
ErrorReportingTest,
XmlReaderTest)
if __name__ == "__main__":
test_main()
| 46,672 | 1,340 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/bisect.py | #!/usr/bin/env python3
"""
Command line tool to bisect failing CPython tests.
Find the test_os test method which alters the environment:
./python -m test.bisect --fail-env-changed test_os
Find a reference leak in "test_os", write the list of failing tests into the
"bisect" file:
./python -m test.bisect -o bisect -R 3:3 test_os
Load an existing list of tests from a file using -i option:
./python -m test --list-cases -m FileTests test_os > tests
./python -m test.bisect -i tests test_os
"""
import argparse
import datetime
import os.path
import math
import random
import subprocess
import sys
import tempfile
import time
def write_tests(filename, tests):
with open(filename, "w") as fp:
for name in tests:
print(name, file=fp)
fp.flush()
def write_output(filename, tests):
if not filename:
return
print("Writing %s tests into %s" % (len(tests), filename))
write_tests(filename, tests)
return filename
def format_shell_args(args):
return ' '.join(args)
def list_cases(args):
cmd = [sys.executable, '-m', 'test', '--list-cases']
cmd.extend(args.test_args)
proc = subprocess.run(cmd,
stdout=subprocess.PIPE,
universal_newlines=True)
exitcode = proc.returncode
if exitcode:
cmd = format_shell_args(cmd)
print("Failed to list tests: %s failed with exit code %s"
% (cmd, exitcode))
sys.exit(exitcode)
tests = proc.stdout.splitlines()
return tests
def run_tests(args, tests, huntrleaks=None):
tmp = tempfile.mktemp()
try:
write_tests(tmp, tests)
cmd = [sys.executable, '-m', 'test', '--matchfile', tmp]
cmd.extend(args.test_args)
print("+ %s" % format_shell_args(cmd))
proc = subprocess.run(cmd)
return proc.returncode
finally:
if os.path.exists(tmp):
os.unlink(tmp)
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument('-i', '--input',
help='Test names produced by --list-tests written '
'into a file. If not set, run --list-tests')
parser.add_argument('-o', '--output',
help='Result of the bisection')
parser.add_argument('-n', '--max-tests', type=int, default=1,
help='Maximum number of tests to stop the bisection '
'(default: 1)')
parser.add_argument('-N', '--max-iter', type=int, default=100,
help='Maximum number of bisection iterations '
'(default: 100)')
# FIXME: document that following arguments are test arguments
args, test_args = parser.parse_known_args()
args.test_args = test_args
return args
def main():
args = parse_args()
if args.input:
with open(args.input) as fp:
tests = [line.strip() for line in fp]
else:
tests = list_cases(args)
print("Start bisection with %s tests" % len(tests))
print("Test arguments: %s" % format_shell_args(args.test_args))
print("Bisection will stop when getting %s or less tests "
"(-n/--max-tests option), or after %s iterations "
"(-N/--max-iter option)"
% (args.max_tests, args.max_iter))
output = write_output(args.output, tests)
print()
start_time = time.monotonic()
iteration = 1
try:
while len(tests) > args.max_tests and iteration <= args.max_iter:
ntest = len(tests)
ntest = max(ntest // 2, 1)
subtests = random.sample(tests, ntest)
print("[+] Iteration %s: run %s tests/%s"
% (iteration, len(subtests), len(tests)))
print()
exitcode = run_tests(args, subtests)
print("ran %s tests/%s" % (ntest, len(tests)))
print("exit", exitcode)
if exitcode:
print("Tests failed: continuing with this subtest")
tests = subtests
output = write_output(args.output, tests)
else:
print("Tests succeeded: skipping this subtest, trying a new subset")
print()
iteration += 1
except KeyboardInterrupt:
print()
print("Bisection interrupted!")
print()
print("Tests (%s):" % len(tests))
for test in tests:
print("* %s" % test)
print()
if output:
print("Output written into %s" % output)
dt = math.ceil(time.monotonic() - start_time)
if len(tests) <= args.max_tests:
print("Bisection completed in %s iterations and %s"
% (iteration, datetime.timedelta(seconds=dt)))
sys.exit(1)
else:
print("Bisection failed after %s iterations and %s"
% (iteration, datetime.timedelta(seconds=dt)))
if __name__ == "__main__":
main()
| 4,955 | 168 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_pydoc.py | import os
import sys
import builtins
import contextlib
import importlib.util
import inspect
import pydoc
import py_compile
import keyword
import _pickle
import pkgutil
import re
import stat
import string
import test.support
import time
import types
import typing
import unittest
import urllib.parse
import xml.etree
import xml.etree.ElementTree
import textwrap
from io import StringIO
from collections import namedtuple
from test.support.script_helper import assert_python_ok
from test.support import (
TESTFN, rmtree,
reap_children, reap_threads, captured_output, captured_stdout,
captured_stderr, unlink, requires_docstrings
)
from test import pydoc_mod
try:
import _thread
import threading
except ImportError:
threading = None
class nonascii:
'Це не лаÑиниÑÑ'
pass
if test.support.HAVE_DOCSTRINGS:
expected_data_docstrings = (
'dictionary for instance variables (if defined)',
'list of weak references to the object (if defined)',
) * 2
else:
expected_data_docstrings = ('', '', '', '')
expected_text_pattern = """
NAME
test.pydoc_mod - This is a test module for test_pydoc
%s
CLASSES
builtins.object
A
B
C
\x20\x20\x20\x20
class A(builtins.object)
| Hello and goodbye
|\x20\x20
| Methods defined here:
|\x20\x20
| __init__()
| Wow, I have no function!
|\x20\x20
| ----------------------------------------------------------------------
| Data descriptors defined here:
|\x20\x20
| __dict__%s
|\x20\x20
| __weakref__%s
\x20\x20\x20\x20
class B(builtins.object)
| Data descriptors defined here:
|\x20\x20
| __dict__%s
|\x20\x20
| __weakref__%s
|\x20\x20
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|\x20\x20
| NO_MEANING = 'eggs'
|\x20\x20
| __annotations__ = {'NO_MEANING': <class 'str'>}
\x20\x20\x20\x20
class C(builtins.object)
| Methods defined here:
|\x20\x20
| get_answer(self)
| Return say_no()
|\x20\x20
| is_it_true(self)
| Return self.get_answer()
|\x20\x20
| say_no(self)
|\x20\x20
| ----------------------------------------------------------------------
| Data descriptors defined here:
|\x20\x20
| __dict__
| dictionary for instance variables (if defined)
|\x20\x20
| __weakref__
| list of weak references to the object (if defined)
FUNCTIONS
doc_func()
This function solves all of the world's problems:
hunger
lack of Python
war
\x20\x20\x20\x20
nodoc_func()
DATA
__xyz__ = 'X, Y and Z'
VERSION
1.2.3.4
AUTHOR
Benjamin Peterson
CREDITS
Nobody
FILE
%s
""".strip()
expected_text_data_docstrings = tuple('\n | ' + s if s else ''
for s in expected_data_docstrings)
expected_html_pattern = """
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="test.html"><font color="#ffffff">test</font></a>.pydoc_mod</strong></big></big> (version 1.2.3.4)</font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:%s">%s</a>%s</font></td></tr></table>
<p><tt>This is a test module for test_pydoc</tt></p>
<p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
\x20\x20\x20\x20
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%%"><dl>
<dt><font face="helvetica, arial"><a href="builtins.html#object">builtins.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="test.pydoc_mod.html#A">A</a>
</font></dt><dt><font face="helvetica, arial"><a href="test.pydoc_mod.html#B">B</a>
</font></dt><dt><font face="helvetica, arial"><a href="test.pydoc_mod.html#C">C</a>
</font></dt></dl>
</dd>
</dl>
<p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="A">class <strong>A</strong></a>(<a href="builtins.html#object">builtins.object</a>)</font></td></tr>
\x20\x20\x20\x20
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Hello and goodbye<br> </tt></td></tr>
<tr><td> </td>
<td width="100%%">Methods defined here:<br>
<dl><dt><a name="A-__init__"><strong>__init__</strong></a>()</dt><dd><tt>Wow, I have no function!</tt></dd></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>%s</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>%s</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="B">class <strong>B</strong></a>(<a href="builtins.html#object">builtins.object</a>)</font></td></tr>
\x20\x20\x20\x20
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%%">Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>%s</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>%s</tt></dd>
</dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>NO_MEANING</strong> = 'eggs'</dl>
<dl><dt><strong>__annotations__</strong> = {'NO_MEANING': <class 'str'>}</dl>
</td></tr></table> <p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="C">class <strong>C</strong></a>(<a href="builtins.html#object">builtins.object</a>)</font></td></tr>
\x20\x20\x20\x20
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%%">Methods defined here:<br>
<dl><dt><a name="C-get_answer"><strong>get_answer</strong></a>(self)</dt><dd><tt>Return <a href="#C-say_no">say_no</a>()</tt></dd></dl>
<dl><dt><a name="C-is_it_true"><strong>is_it_true</strong></a>(self)</dt><dd><tt>Return self.<a href="#C-get_answer">get_answer</a>()</tt></dd></dl>
<dl><dt><a name="C-say_no"><strong>say_no</strong></a>(self)</dt></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</tt></dd>
</dl>
</td></tr></table></td></tr></table><p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
\x20\x20\x20\x20
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
<td width="100%%"><dl><dt><a name="-doc_func"><strong>doc_func</strong></a>()</dt><dd><tt>This function solves all of the world's problems:<br>
hunger<br>
lack of Python<br>
war</tt></dd></dl>
<dl><dt><a name="-nodoc_func"><strong>nodoc_func</strong></a>()</dt></dl>
</td></tr></table><p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
\x20\x20\x20\x20
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%%"><strong>__xyz__</strong> = 'X, Y and Z'</td></tr></table><p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#7799ee">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
\x20\x20\x20\x20
<tr><td bgcolor="#7799ee"><tt> </tt></td><td> </td>
<td width="100%%">Benjamin Peterson</td></tr></table><p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#7799ee">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Credits</strong></big></font></td></tr>
\x20\x20\x20\x20
<tr><td bgcolor="#7799ee"><tt> </tt></td><td> </td>
<td width="100%%">Nobody</td></tr></table>
""".strip() # ' <- emacs turd
expected_html_data_docstrings = tuple(s.replace(' ', ' ')
for s in expected_data_docstrings)
# output pattern for missing module
missing_pattern = '''\
No Python documentation found for %r.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.'''.replace('\n', os.linesep)
# output pattern for module with bad imports
badimport_pattern = "problem in %s - ModuleNotFoundError: No module named %r"
expected_dynamicattribute_pattern = """
Help on class DA in module %s:
class DA(builtins.object)
| Data descriptors defined here:
|\x20\x20
| __dict__%s
|\x20\x20
| __weakref__%s
|\x20\x20
| ham
|\x20\x20
| ----------------------------------------------------------------------
| Data and other attributes inherited from Meta:
|\x20\x20
| ham = 'spam'
""".strip()
expected_virtualattribute_pattern1 = """
Help on class Class in module %s:
class Class(builtins.object)
| Data and other attributes inherited from Meta:
|\x20\x20
| LIFE = 42
""".strip()
expected_virtualattribute_pattern2 = """
Help on class Class1 in module %s:
class Class1(builtins.object)
| Data and other attributes inherited from Meta1:
|\x20\x20
| one = 1
""".strip()
expected_virtualattribute_pattern3 = """
Help on class Class2 in module %s:
class Class2(Class1)
| Method resolution order:
| Class2
| Class1
| builtins.object
|\x20\x20
| Data and other attributes inherited from Meta1:
|\x20\x20
| one = 1
|\x20\x20
| ----------------------------------------------------------------------
| Data and other attributes inherited from Meta3:
|\x20\x20
| three = 3
|\x20\x20
| ----------------------------------------------------------------------
| Data and other attributes inherited from Meta2:
|\x20\x20
| two = 2
""".strip()
expected_missingattribute_pattern = """
Help on class C in module %s:
class C(builtins.object)
| Data and other attributes defined here:
|\x20\x20
| here = 'present!'
""".strip()
def run_pydoc(module_name, *args, **env):
"""
Runs pydoc on the specified module. Returns the stripped
output of pydoc.
"""
args = args + (module_name,)
# do not write bytecode files to avoid caching errors
rc, out, err = assert_python_ok('-B', pydoc.__file__, *args, **env)
return out.strip()
def get_pydoc_html(module):
"Returns pydoc generated output as html"
doc = pydoc.HTMLDoc()
output = doc.docmodule(module)
loc = doc.getdocloc(pydoc_mod) or ""
if loc:
loc = "<br><a href=\"" + loc + "\">Module Docs</a>"
return output.strip(), loc
def get_pydoc_link(module):
"Returns a documentation web link of a module"
dirname = os.path.dirname
basedir = dirname(dirname(os.path.realpath(__file__)))
doc = pydoc.TextDoc()
loc = doc.getdocloc(module, basedir=basedir)
return loc
def get_pydoc_text(module):
"Returns pydoc generated output as text"
doc = pydoc.TextDoc()
loc = doc.getdocloc(pydoc_mod) or ""
if loc:
loc = "\nMODULE DOCS\n " + loc + "\n"
output = doc.docmodule(module)
# clean up the extra text formatting that pydoc performs
patt = re.compile('\b.')
output = patt.sub('', output)
return output.strip(), loc
def get_html_title(text):
# Bit of hack, but good enough for test purposes
header, _, _ = text.partition("</head>")
_, _, title = header.partition("<title>")
title, _, _ = title.partition("</title>")
return title
class PydocBaseTest(unittest.TestCase):
def _restricted_walk_packages(self, walk_packages, path=None):
"""
A version of pkgutil.walk_packages() that will restrict itself to
a given path.
"""
default_path = path or [os.path.dirname(__file__)]
def wrapper(path=None, prefix='', onerror=None):
return walk_packages(path or default_path, prefix, onerror)
return wrapper
@contextlib.contextmanager
def restrict_walk_packages(self, path=None):
walk_packages = pkgutil.walk_packages
pkgutil.walk_packages = self._restricted_walk_packages(walk_packages,
path)
try:
yield
finally:
pkgutil.walk_packages = walk_packages
def call_url_handler(self, url, expected_title):
text = pydoc._url_handler(url, "text/html")
result = get_html_title(text)
# Check the title to ensure an unexpected error page was not returned
self.assertEqual(result, expected_title, text)
return text
class PydocDocTest(unittest.TestCase):
maxDiff = None
@unittest.skipIf(sys.flags.optimize >= 2,
"Docstrings are omitted with -O2 and above")
@unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(),
'trace function introduces __locals__ unexpectedly')
@requires_docstrings
def test_html_doc(self):
result, doc_loc = get_pydoc_html(pydoc_mod)
mod_file = inspect.getabsfile(pydoc_mod)
mod_url = urllib.parse.quote(mod_file)
expected_html = expected_html_pattern % (
(mod_url, mod_file, doc_loc) +
expected_html_data_docstrings)
self.assertEqual(result, expected_html)
@unittest.skipIf(sys.flags.optimize >= 2,
"Docstrings are omitted with -O2 and above")
@unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(),
'trace function introduces __locals__ unexpectedly')
@requires_docstrings
def test_text_doc(self):
result, doc_loc = get_pydoc_text(pydoc_mod)
expected_text = expected_text_pattern % (
(doc_loc,) +
expected_text_data_docstrings +
(inspect.getabsfile(pydoc_mod),))
self.assertEqual(expected_text, result)
def test_text_enum_member_with_value_zero(self):
# Test issue #20654 to ensure enum member with value 0 can be
# displayed. It used to throw KeyError: 'zero'.
import enum
class BinaryInteger(enum.IntEnum):
zero = 0
one = 1
doc = pydoc.render_doc(BinaryInteger)
self.assertIn('<BinaryInteger.zero: 0>', doc)
def test_mixed_case_module_names_are_lower_cased(self):
# issue16484
doc_link = get_pydoc_link(xml.etree.ElementTree)
self.assertIn('xml.etree.elementtree', doc_link)
def test_issue8225(self):
# Test issue8225 to ensure no doc link appears for xml.etree
result, doc_loc = get_pydoc_text(xml.etree)
self.assertEqual(doc_loc, "", "MODULE DOCS incorrectly includes a link")
def test_getpager_with_stdin_none(self):
previous_stdin = sys.stdin
try:
sys.stdin = None
pydoc.getpager() # Shouldn't fail.
finally:
sys.stdin = previous_stdin
def test_non_str_name(self):
# issue14638
# Treat illegal (non-str) name like no name
class A:
__name__ = 42
class B:
pass
adoc = pydoc.render_doc(A())
bdoc = pydoc.render_doc(B())
self.assertEqual(adoc.replace("A", "B"), bdoc)
def test_not_here(self):
missing_module = "test.i_am_not_here"
result = str(run_pydoc(missing_module), 'ascii')
expected = missing_pattern % missing_module
self.assertEqual(expected, result,
"documentation for missing module found")
@unittest.skipIf(sys.flags.optimize >= 2,
'Docstrings are omitted with -OO and above')
def test_not_ascii(self):
result = run_pydoc('test.test_pydoc.nonascii', PYTHONIOENCODING='ascii')
encoded = nonascii.__doc__.encode('ascii', 'backslashreplace')
self.assertIn(encoded, result)
def test_input_strip(self):
missing_module = " test.i_am_not_here "
result = str(run_pydoc(missing_module), 'ascii')
expected = missing_pattern % missing_module.strip()
self.assertEqual(expected, result)
def test_stripid(self):
# test with strings, other implementations might have different repr()
stripid = pydoc.stripid
# strip the id
self.assertEqual(stripid('<function stripid at 0x88dcee4>'),
'<function stripid>')
self.assertEqual(stripid('<function stripid at 0x01F65390>'),
'<function stripid>')
# nothing to strip, return the same text
self.assertEqual(stripid('42'), '42')
self.assertEqual(stripid("<type 'exceptions.Exception'>"),
"<type 'exceptions.Exception'>")
@unittest.skipIf(sys.flags.optimize >= 2,
'Docstrings are omitted with -O2 and above')
@unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(),
'trace function introduces __locals__ unexpectedly')
@requires_docstrings
def test_help_output_redirect(self):
# issue 940286, if output is set in Helper, then all output from
# Helper.help should be redirected
old_pattern = expected_text_pattern
getpager_old = pydoc.getpager
getpager_new = lambda: (lambda x: x)
self.maxDiff = None
buf = StringIO()
helper = pydoc.Helper(output=buf)
unused, doc_loc = get_pydoc_text(pydoc_mod)
module = "test.pydoc_mod"
help_header = """
Help on module test.pydoc_mod in test:
""".lstrip()
help_header = textwrap.dedent(help_header)
expected_help_pattern = help_header + expected_text_pattern
pydoc.getpager = getpager_new
try:
with captured_output('stdout') as output, \
captured_output('stderr') as err:
helper.help(module)
result = buf.getvalue().strip()
expected_text = expected_help_pattern % (
(doc_loc,) +
expected_text_data_docstrings +
(inspect.getabsfile(pydoc_mod),))
self.assertEqual('', output.getvalue())
self.assertEqual('', err.getvalue())
self.assertEqual(expected_text, result)
finally:
pydoc.getpager = getpager_old
def test_namedtuple_public_underscore(self):
NT = namedtuple('NT', ['abc', 'def'], rename=True)
with captured_stdout() as help_io:
pydoc.help(NT)
helptext = help_io.getvalue()
self.assertIn('_1', helptext)
self.assertIn('_replace', helptext)
self.assertIn('_asdict', helptext)
def test_synopsis(self):
self.addCleanup(unlink, TESTFN)
for encoding in ('ISO-8859-1', 'UTF-8'):
with open(TESTFN, 'w', encoding=encoding) as script:
if encoding != 'UTF-8':
print('#coding: {}'.format(encoding), file=script)
print('"""line 1: h\xe9', file=script)
print('line 2: hi"""', file=script)
synopsis = pydoc.synopsis(TESTFN, {})
self.assertEqual(synopsis, 'line 1: h\xe9')
@unittest.skipIf(sys.flags.optimize >= 2,
'Docstrings are omitted with -OO and above')
def test_synopsis_sourceless(self):
expected = os.__doc__.splitlines()[0]
filename = os.__cached__
synopsis = pydoc.synopsis(filename)
self.assertEqual(synopsis, expected)
def test_synopsis_sourceless_empty_doc(self):
with test.support.temp_cwd() as test_dir:
init_path = os.path.join(test_dir, 'foomod42.py')
cached_path = importlib.util.cache_from_source(init_path)
with open(init_path, 'w') as fobj:
fobj.write("foo = 1")
py_compile.compile(init_path)
synopsis = pydoc.synopsis(init_path, {})
self.assertIsNone(synopsis)
synopsis_cached = pydoc.synopsis(cached_path, {})
self.assertIsNone(synopsis_cached)
def test_splitdoc_with_description(self):
example_string = "I Am A Doc\n\n\nHere is my description"
self.assertEqual(pydoc.splitdoc(example_string),
('I Am A Doc', '\nHere is my description'))
def test_is_object_or_method(self):
doc = pydoc.Doc()
# Bound Method
self.assertTrue(pydoc._is_some_method(doc.fail))
# Method Descriptor
self.assertTrue(pydoc._is_some_method(int.__add__))
# String
self.assertFalse(pydoc._is_some_method("I am not a method"))
def test_is_package_when_not_package(self):
with test.support.temp_cwd() as test_dir:
self.assertFalse(pydoc.ispackage(test_dir))
def test_is_package_when_is_package(self):
with test.support.temp_cwd() as test_dir:
init_path = os.path.join(test_dir, '__init__.py')
open(init_path, 'w').close()
self.assertTrue(pydoc.ispackage(test_dir))
os.remove(init_path)
def test_allmethods(self):
# issue 17476: allmethods was no longer returning unbound methods.
# This test is a bit fragile in the face of changes to object and type,
# but I can't think of a better way to do it without duplicating the
# logic of the function under test.
class TestClass(object):
def method_returning_true(self):
return True
# What we expect to get back: everything on object...
expected = dict(vars(object))
# ...plus our unbound method...
expected['method_returning_true'] = TestClass.method_returning_true
# ...but not the non-methods on object.
del expected['__doc__']
del expected['__class__']
# inspect resolves descriptors on type into methods, but vars doesn't,
# so we need to update __subclasshook__ and __init_subclass__.
expected['__subclasshook__'] = TestClass.__subclasshook__
expected['__init_subclass__'] = TestClass.__init_subclass__
methods = pydoc.allmethods(TestClass)
self.assertDictEqual(methods, expected)
def test_method_aliases(self):
class A:
def tkraise(self, aboveThis=None):
"""Raise this widget in the stacking order."""
lift = tkraise
def a_size(self):
"""Return size"""
class B(A):
def itemconfigure(self, tagOrId, cnf=None, **kw):
"""Configure resources of an item TAGORID."""
itemconfig = itemconfigure
b_size = A.a_size
doc = pydoc.render_doc(B)
# clean up the extra text formatting that pydoc performs
doc = re.sub('\b.', '', doc)
self.assertEqual(doc, '''\
Python Library Documentation: class B in module %s
class B(A)
| Method resolution order:
| B
| A
| builtins.object
|\x20\x20
| Methods defined here:
|\x20\x20
| b_size = a_size(self)
|\x20\x20
| itemconfig = itemconfigure(self, tagOrId, cnf=None, **kw)
|\x20\x20
| itemconfigure(self, tagOrId, cnf=None, **kw)
| Configure resources of an item TAGORID.
|\x20\x20
| ----------------------------------------------------------------------
| Methods inherited from A:
|\x20\x20
| a_size(self)
| Return size
|\x20\x20
| lift = tkraise(self, aboveThis=None)
|\x20\x20
| tkraise(self, aboveThis=None)
| Raise this widget in the stacking order.
|\x20\x20
| ----------------------------------------------------------------------
| Data descriptors inherited from A:
|\x20\x20
| __dict__
| dictionary for instance variables (if defined)
|\x20\x20
| __weakref__
| list of weak references to the object (if defined)
''' % __name__)
doc = pydoc.render_doc(B, renderer=pydoc.HTMLDoc())
self.assertEqual(doc, '''\
Python Library Documentation: class B in module %s
<p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="B">class <strong>B</strong></a>(A)</font></td></tr>
\x20\x20\x20\x20
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%%"><dl><dt>Method resolution order:</dt>
<dd>B</dd>
<dd>A</dd>
<dd><a href="builtins.html#object">builtins.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="B-b_size"><strong>b_size</strong></a> = <a href="#B-a_size">a_size</a>(self)</dt></dl>
<dl><dt><a name="B-itemconfig"><strong>itemconfig</strong></a> = <a href="#B-itemconfigure">itemconfigure</a>(self, tagOrId, cnf=None, **kw)</dt></dl>
<dl><dt><a name="B-itemconfigure"><strong>itemconfigure</strong></a>(self, tagOrId, cnf=None, **kw)</dt><dd><tt>Configure resources of an item TAGORID.</tt></dd></dl>
<hr>
Methods inherited from A:<br>
<dl><dt><a name="B-a_size"><strong>a_size</strong></a>(self)</dt><dd><tt>Return size</tt></dd></dl>
<dl><dt><a name="B-lift"><strong>lift</strong></a> = <a href="#B-tkraise">tkraise</a>(self, aboveThis=None)</dt></dl>
<dl><dt><a name="B-tkraise"><strong>tkraise</strong></a>(self, aboveThis=None)</dt><dd><tt>Raise this widget in the stacking order.</tt></dd></dl>
<hr>
Data descriptors inherited from A:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</tt></dd>
</dl>
</td></tr></table>\
''' % __name__)
class PydocImportTest(PydocBaseTest):
def setUp(self):
self.test_dir = os.mkdir(TESTFN)
self.addCleanup(rmtree, TESTFN)
importlib.invalidate_caches()
@unittest.skipIf(True, "TODO: figure out this error")
def test_badimport(self):
# This tests the fix for issue 5230, where if pydoc found the module
# but the module had an internal import error pydoc would report no doc
# found.
modname = 'testmod_xyzzy'
testpairs = (
('i_am_not_here', 'i_am_not_here'),
('test.i_am_not_here_either', 'test.i_am_not_here_either'),
('test.i_am_not_here.neither_am_i', 'test.i_am_not_here'),
('i_am_not_here.{}'.format(modname), 'i_am_not_here'),
('test.{}'.format(modname), 'test.{}'.format(modname)),
)
sourcefn = os.path.join(TESTFN, modname) + os.extsep + "py"
for importstring, expectedinmsg in testpairs:
with open(sourcefn, 'w') as f:
f.write("import {}\n".format(importstring))
result = run_pydoc(modname, PYTHONPATH=TESTFN).decode("ascii")
expected = badimport_pattern % (modname, expectedinmsg)
self.assertEqual(expected, result)
def test_apropos_with_bad_package(self):
# Issue 7425 - pydoc -k failed when bad package on path
pkgdir = os.path.join(TESTFN, "syntaxerr")
os.mkdir(pkgdir)
badsyntax = os.path.join(pkgdir, "__init__") + os.extsep + "py"
with open(badsyntax, 'w') as f:
f.write("invalid python syntax = $1\n")
with self.restrict_walk_packages(path=[TESTFN]):
with captured_stdout() as out:
with captured_stderr() as err:
pydoc.apropos('xyzzy')
# No result, no error
self.assertEqual(out.getvalue(), '')
self.assertEqual(err.getvalue(), '')
# The package name is still matched
with captured_stdout() as out:
with captured_stderr() as err:
pydoc.apropos('syntaxerr')
self.assertEqual(out.getvalue().strip(), 'syntaxerr')
self.assertEqual(err.getvalue(), '')
def test_apropos_with_unreadable_dir(self):
# Issue 7367 - pydoc -k failed when unreadable dir on path
self.unreadable_dir = os.path.join(TESTFN, "unreadable")
os.mkdir(self.unreadable_dir, 0)
self.addCleanup(os.rmdir, self.unreadable_dir)
# Note, on Windows the directory appears to be still
# readable so this is not really testing the issue there
with self.restrict_walk_packages(path=[TESTFN]):
with captured_stdout() as out:
with captured_stderr() as err:
pydoc.apropos('SOMEKEY')
# No result, no error
self.assertEqual(out.getvalue(), '')
self.assertEqual(err.getvalue(), '')
def test_apropos_empty_doc(self):
pkgdir = os.path.join(TESTFN, 'walkpkg')
os.mkdir(pkgdir)
self.addCleanup(rmtree, pkgdir)
init_path = os.path.join(pkgdir, '__init__.py')
with open(init_path, 'w') as fobj:
fobj.write("foo = 1")
current_mode = stat.S_IMODE(os.stat(pkgdir).st_mode)
try:
os.chmod(pkgdir, current_mode & ~stat.S_IEXEC)
with self.restrict_walk_packages(path=[TESTFN]), captured_stdout() as stdout:
pydoc.apropos('')
self.assertIn('walkpkg', stdout.getvalue())
finally:
os.chmod(pkgdir, current_mode)
# def test_url_search_package_error(self):
# # URL handler search should cope with packages that raise exceptions
# pkgdir = os.path.join(TESTFN, "test_error_package")
# os.mkdir(pkgdir)
# init = os.path.join(pkgdir, "__init__.py")
# with open(init, "wt", encoding="ascii") as f:
# f.write("""raise ValueError("ouch")\n""")
# with self.restrict_walk_packages(path=[TESTFN]):
# # Package has to be importable for the error to have any effect
# saved_paths = tuple(sys.path)
# sys.path.insert(0, TESTFN)
# try:
# with self.assertRaisesRegex(ValueError, "ouch"):
# import test_error_package # Sanity check
# text = self.call_url_handler("search?key=test_error_package",
# "Pydoc: Search Results")
# found = ('<a href="test_error_package.html">'
# 'test_error_package</a>')
# self.assertIn(found, text)
# finally:
# sys.path[:] = saved_paths
@unittest.skip('causes undesirable side-effects (#20128)')
def test_modules(self):
# See Helper.listmodules().
num_header_lines = 2
num_module_lines_min = 5 # Playing it safe.
num_footer_lines = 3
expected = num_header_lines + num_module_lines_min + num_footer_lines
output = StringIO()
helper = pydoc.Helper(output=output)
helper('modules')
result = output.getvalue().strip()
num_lines = len(result.splitlines())
self.assertGreaterEqual(num_lines, expected)
@unittest.skip('causes undesirable side-effects (#20128)')
def test_modules_search(self):
# See Helper.listmodules().
expected = 'pydoc - '
output = StringIO()
helper = pydoc.Helper(output=output)
with captured_stdout() as help_io:
helper('modules pydoc')
result = help_io.getvalue()
self.assertIn(expected, result)
@unittest.skip('some buildbots are not cooperating (#20128)')
def test_modules_search_builtin(self):
expected = 'gc - '
output = StringIO()
helper = pydoc.Helper(output=output)
with captured_stdout() as help_io:
helper('modules garbage')
result = help_io.getvalue()
self.assertTrue(result.startswith(expected))
def test_importfile(self):
loaded_pydoc = pydoc.importfile(pydoc.__file__)
self.assertIsNot(loaded_pydoc, pydoc)
self.assertEqual(loaded_pydoc.__name__, 'pydoc')
self.assertEqual(loaded_pydoc.__file__, pydoc.__file__)
self.assertEqual(loaded_pydoc.__spec__, pydoc.__spec__)
class TestDescriptions(unittest.TestCase):
def test_module(self):
# Check that pydocfodder module can be described
from test import pydocfodder
doc = pydoc.render_doc(pydocfodder)
self.assertIn("pydocfodder", doc)
def test_class(self):
class C: "New-style class"
c = C()
self.assertEqual(pydoc.describe(C), 'class C')
self.assertEqual(pydoc.describe(c), 'C')
expected = 'C in module %s object' % __name__
self.assertIn(expected, pydoc.render_doc(c))
def test_typing_pydoc(self):
def foo(data: typing.List[typing.Any],
x: int) -> typing.Iterator[typing.Tuple[int, typing.Any]]:
...
T = typing.TypeVar('T')
class C(typing.Generic[T], typing.Mapping[int, str]): ...
self.assertEqual(pydoc.render_doc(foo).splitlines()[-1],
'f\x08fo\x08oo\x08o(data:List[Any], x:int)'
' -> Iterator[Tuple[int, Any]]')
self.assertEqual(pydoc.render_doc(C).splitlines()[2],
'class C\x08C(typing.Mapping)')
def test_builtin(self):
for name in ('str', 'str.translate', 'builtins.str',
'builtins.str.translate'):
# test low-level function
self.assertIsNotNone(pydoc.locate(name))
# test high-level function
try:
pydoc.render_doc(name)
except ImportError:
self.fail('finding the doc of {!r} failed'.format(name))
for name in ('notbuiltins', 'strrr', 'strr.translate',
'str.trrrranslate', 'builtins.strrr',
'builtins.str.trrranslate'):
self.assertIsNone(pydoc.locate(name))
self.assertRaises(ImportError, pydoc.render_doc, name)
@staticmethod
def _get_summary_line(o):
text = pydoc.plain(pydoc.render_doc(o))
lines = text.split('\n')
assert len(lines) >= 2
return lines[2]
# these should include "self"
def test_unbound_python_method(self):
self.assertEqual(self._get_summary_line(textwrap.TextWrapper.wrap),
"wrap(self, text)")
@requires_docstrings
def test_unbound_builtin_method(self):
self.assertEqual(self._get_summary_line(_pickle.Pickler.dump),
"dump(self, obj, /)")
# these no longer include "self"
def test_bound_python_method(self):
t = textwrap.TextWrapper()
self.assertEqual(self._get_summary_line(t.wrap),
"wrap(text) method of textwrap.TextWrapper instance")
def test_field_order_for_named_tuples(self):
Person = namedtuple('Person', ['nickname', 'firstname', 'agegroup'])
s = pydoc.render_doc(Person)
self.assertLess(s.index('nickname'), s.index('firstname'))
self.assertLess(s.index('firstname'), s.index('agegroup'))
class NonIterableFields:
_fields = None
class NonHashableFields:
_fields = [[]]
# Make sure these doesn't fail
pydoc.render_doc(NonIterableFields)
pydoc.render_doc(NonHashableFields)
@requires_docstrings
def test_bound_builtin_method(self):
s = StringIO()
p = _pickle.Pickler(s)
self.assertEqual(self._get_summary_line(p.dump),
"dump(obj, /) method of _pickle.Pickler instance")
# this should *never* include self!
@requires_docstrings
def test_module_level_callable(self):
self.assertEqual(self._get_summary_line(os.stat),
"stat(path, *, dir_fd=None, follow_symlinks=True)")
@unittest.skipUnless(threading, 'Threading required for this test.')
class PydocServerTest(unittest.TestCase):
"""Tests for pydoc._start_server"""
def test_server(self):
# Minimal test that starts the server, then stops it.
def my_url_handler(url, content_type):
text = 'the URL sent was: (%s, %s)' % (url, content_type)
return text
serverthread = pydoc._start_server(my_url_handler, port=0)
self.assertIn('localhost', serverthread.docserver.address)
starttime = time.time()
timeout = 1 #seconds
while serverthread.serving:
time.sleep(.01)
if serverthread.serving and time.time() - starttime > timeout:
serverthread.stop()
break
self.assertEqual(serverthread.error, None)
class PydocUrlHandlerTest(PydocBaseTest):
"""Tests for pydoc._url_handler"""
def test_content_type_err(self):
f = pydoc._url_handler
self.assertRaises(TypeError, f, 'A', '')
self.assertRaises(TypeError, f, 'B', 'foobar')
def test_url_requests(self):
# Test for the correct title in the html pages returned.
# This tests the different parts of the URL handler without
# getting too picky about the exact html.
requests = [
("", "Pydoc: Index of Modules"),
("get?key=", "Pydoc: Index of Modules"),
("index", "Pydoc: Index of Modules"),
("topics", "Pydoc: Topics"),
("keywords", "Pydoc: Keywords"),
("pydoc", "Pydoc: module pydoc"),
("get?key=pydoc", "Pydoc: module pydoc"),
("search?key=pydoc", "Pydoc: Search Results"),
("topic?key=def", "Pydoc: KEYWORD def"),
("topic?key=STRINGS", "Pydoc: TOPIC STRINGS"),
("foobar", "Pydoc: Error - foobar"),
]
with self.restrict_walk_packages():
for url, title in requests:
self.call_url_handler(url, title)
class TestHelper(unittest.TestCase):
def test_keywords(self):
self.assertEqual(sorted(pydoc.Helper.keywords),
sorted(keyword.kwlist))
class PydocWithMetaClasses(unittest.TestCase):
@unittest.skipIf(sys.flags.optimize >= 2,
"Docstrings are omitted with -O2 and above")
@unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(),
'trace function introduces __locals__ unexpectedly')
def test_DynamicClassAttribute(self):
class Meta(type):
def __getattr__(self, name):
if name == 'ham':
return 'spam'
return super().__getattr__(name)
class DA(metaclass=Meta):
@types.DynamicClassAttribute
def ham(self):
return 'eggs'
expected_text_data_docstrings = tuple('\n | ' + s if s else ''
for s in expected_data_docstrings)
output = StringIO()
helper = pydoc.Helper(output=output)
helper(DA)
expected_text = expected_dynamicattribute_pattern % (
(__name__,) + expected_text_data_docstrings[:2])
result = output.getvalue().strip()
self.assertEqual(expected_text, result)
@unittest.skipIf(sys.flags.optimize >= 2,
"Docstrings are omitted with -O2 and above")
@unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(),
'trace function introduces __locals__ unexpectedly')
def test_virtualClassAttributeWithOneMeta(self):
class Meta(type):
def __dir__(cls):
return ['__class__', '__module__', '__name__', 'LIFE']
def __getattr__(self, name):
if name =='LIFE':
return 42
return super().__getattr(name)
class Class(metaclass=Meta):
pass
output = StringIO()
helper = pydoc.Helper(output=output)
helper(Class)
expected_text = expected_virtualattribute_pattern1 % __name__
result = output.getvalue().strip()
self.assertEqual(expected_text, result)
@unittest.skipIf(sys.flags.optimize >= 2,
"Docstrings are omitted with -O2 and above")
@unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(),
'trace function introduces __locals__ unexpectedly')
def test_virtualClassAttributeWithTwoMeta(self):
class Meta1(type):
def __dir__(cls):
return ['__class__', '__module__', '__name__', 'one']
def __getattr__(self, name):
if name =='one':
return 1
return super().__getattr__(name)
class Meta2(type):
def __dir__(cls):
return ['__class__', '__module__', '__name__', 'two']
def __getattr__(self, name):
if name =='two':
return 2
return super().__getattr__(name)
class Meta3(Meta1, Meta2):
def __dir__(cls):
return list(sorted(set(
['__class__', '__module__', '__name__', 'three'] +
Meta1.__dir__(cls) + Meta2.__dir__(cls))))
def __getattr__(self, name):
if name =='three':
return 3
return super().__getattr__(name)
class Class1(metaclass=Meta1):
pass
class Class2(Class1, metaclass=Meta3):
pass
fail1 = fail2 = False
output = StringIO()
helper = pydoc.Helper(output=output)
helper(Class1)
expected_text1 = expected_virtualattribute_pattern2 % __name__
result1 = output.getvalue().strip()
self.assertEqual(expected_text1, result1)
output = StringIO()
helper = pydoc.Helper(output=output)
helper(Class2)
expected_text2 = expected_virtualattribute_pattern3 % __name__
result2 = output.getvalue().strip()
self.assertEqual(expected_text2, result2)
@unittest.skipIf(sys.flags.optimize >= 2,
"Docstrings are omitted with -O2 and above")
@unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(),
'trace function introduces __locals__ unexpectedly')
def test_buggy_dir(self):
class M(type):
def __dir__(cls):
return ['__class__', '__name__', 'missing', 'here']
class C(metaclass=M):
here = 'present!'
output = StringIO()
helper = pydoc.Helper(output=output)
helper(C)
expected_text = expected_missingattribute_pattern % __name__
result = output.getvalue().strip()
self.assertEqual(expected_text, result)
def test_resolve_false(self):
# Issue #23008: pydoc enum.{,Int}Enum failed
# because bool(enum.Enum) is False.
with captured_stdout() as help_io:
pydoc.help('enum.Enum')
helptext = help_io.getvalue()
self.assertIn('class Enum', helptext)
@reap_threads
def test_main():
try:
test.support.run_unittest(PydocDocTest,
PydocImportTest,
TestDescriptions,
PydocServerTest,
PydocUrlHandlerTest,
TestHelper,
PydocWithMetaClasses,
)
finally:
reap_children()
if __name__ == "__main__":
test_main()
| 44,702 | 1,203 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_textwrap.py | #
# Test suite for the textwrap module.
#
# Original tests written by Greg Ward <[email protected]>.
# Converted to PyUnit by Peter Hansen <[email protected]>.
# Currently maintained by Greg Ward.
#
# $Id$
#
import unittest
from textwrap import TextWrapper, wrap, fill, dedent, indent, shorten
class BaseTestCase(unittest.TestCase):
'''Parent class with utility methods for textwrap tests.'''
def show(self, textin):
if isinstance(textin, list):
result = []
for i in range(len(textin)):
result.append(" %d: %r" % (i, textin[i]))
result = "\n".join(result) if result else " no lines"
elif isinstance(textin, str):
result = " %s\n" % repr(textin)
return result
def check(self, result, expect):
self.assertEqual(result, expect,
'expected:\n%s\nbut got:\n%s' % (
self.show(expect), self.show(result)))
def check_wrap(self, text, width, expect, **kwargs):
result = wrap(text, width, **kwargs)
self.check(result, expect)
def check_split(self, text, expect):
result = self.wrapper._split(text)
self.assertEqual(result, expect,
"\nexpected %r\n"
"but got %r" % (expect, result))
class WrapTestCase(BaseTestCase):
def setUp(self):
self.wrapper = TextWrapper(width=45)
def test_simple(self):
# Simple case: just words, spaces, and a bit of punctuation
text = "Hello there, how are you this fine day? I'm glad to hear it!"
self.check_wrap(text, 12,
["Hello there,",
"how are you",
"this fine",
"day? I'm",
"glad to hear",
"it!"])
self.check_wrap(text, 42,
["Hello there, how are you this fine day?",
"I'm glad to hear it!"])
self.check_wrap(text, 80, [text])
def test_empty_string(self):
# Check that wrapping the empty string returns an empty list.
self.check_wrap("", 6, [])
self.check_wrap("", 6, [], drop_whitespace=False)
def test_empty_string_with_initial_indent(self):
# Check that the empty string is not indented.
self.check_wrap("", 6, [], initial_indent="++")
self.check_wrap("", 6, [], initial_indent="++", drop_whitespace=False)
def test_whitespace(self):
# Whitespace munging and end-of-sentence detection
text = """\
This is a paragraph that already has
line breaks. But some of its lines are much longer than the others,
so it needs to be wrapped.
Some lines are \ttabbed too.
What a mess!
"""
expect = ["This is a paragraph that already has line",
"breaks. But some of its lines are much",
"longer than the others, so it needs to be",
"wrapped. Some lines are tabbed too. What a",
"mess!"]
wrapper = TextWrapper(45, fix_sentence_endings=True)
result = wrapper.wrap(text)
self.check(result, expect)
result = wrapper.fill(text)
self.check(result, '\n'.join(expect))
text = "\tTest\tdefault\t\ttabsize."
expect = [" Test default tabsize."]
self.check_wrap(text, 80, expect)
text = "\tTest\tcustom\t\ttabsize."
expect = [" Test custom tabsize."]
self.check_wrap(text, 80, expect, tabsize=4)
def test_fix_sentence_endings(self):
wrapper = TextWrapper(60, fix_sentence_endings=True)
# SF #847346: ensure that fix_sentence_endings=True does the
# right thing even on input short enough that it doesn't need to
# be wrapped.
text = "A short line. Note the single space."
expect = ["A short line. Note the single space."]
self.check(wrapper.wrap(text), expect)
# Test some of the hairy end cases that _fix_sentence_endings()
# is supposed to handle (the easy stuff is tested in
# test_whitespace() above).
text = "Well, Doctor? What do you think?"
expect = ["Well, Doctor? What do you think?"]
self.check(wrapper.wrap(text), expect)
text = "Well, Doctor?\nWhat do you think?"
self.check(wrapper.wrap(text), expect)
text = 'I say, chaps! Anyone for "tennis?"\nHmmph!'
expect = ['I say, chaps! Anyone for "tennis?" Hmmph!']
self.check(wrapper.wrap(text), expect)
wrapper.width = 20
expect = ['I say, chaps!', 'Anyone for "tennis?"', 'Hmmph!']
self.check(wrapper.wrap(text), expect)
text = 'And she said, "Go to hell!"\nCan you believe that?'
expect = ['And she said, "Go to',
'hell!" Can you',
'believe that?']
self.check(wrapper.wrap(text), expect)
wrapper.width = 60
expect = ['And she said, "Go to hell!" Can you believe that?']
self.check(wrapper.wrap(text), expect)
text = 'File stdio.h is nice.'
expect = ['File stdio.h is nice.']
self.check(wrapper.wrap(text), expect)
def test_wrap_short(self):
# Wrapping to make short lines longer
text = "This is a\nshort paragraph."
self.check_wrap(text, 20, ["This is a short",
"paragraph."])
self.check_wrap(text, 40, ["This is a short paragraph."])
def test_wrap_short_1line(self):
# Test endcases
text = "This is a short line."
self.check_wrap(text, 30, ["This is a short line."])
self.check_wrap(text, 30, ["(1) This is a short line."],
initial_indent="(1) ")
def test_hyphenated(self):
# Test breaking hyphenated words
text = ("this-is-a-useful-feature-for-"
"reformatting-posts-from-tim-peters'ly")
self.check_wrap(text, 40,
["this-is-a-useful-feature-for-",
"reformatting-posts-from-tim-peters'ly"])
self.check_wrap(text, 41,
["this-is-a-useful-feature-for-",
"reformatting-posts-from-tim-peters'ly"])
self.check_wrap(text, 42,
["this-is-a-useful-feature-for-reformatting-",
"posts-from-tim-peters'ly"])
# The test tests current behavior but is not testing parts of the API.
expect = ("this-|is-|a-|useful-|feature-|for-|"
"reformatting-|posts-|from-|tim-|peters'ly").split('|')
self.check_wrap(text, 1, expect, break_long_words=False)
self.check_split(text, expect)
self.check_split('e-mail', ['e-mail'])
self.check_split('Jelly-O', ['Jelly-O'])
# The test tests current behavior but is not testing parts of the API.
self.check_split('half-a-crown', 'half-|a-|crown'.split('|'))
def test_hyphenated_numbers(self):
# Test that hyphenated numbers (eg. dates) are not broken like words.
text = ("Python 1.0.0 was released on 1994-01-26. Python 1.0.1 was\n"
"released on 1994-02-15.")
self.check_wrap(text, 30, ['Python 1.0.0 was released on',
'1994-01-26. Python 1.0.1 was',
'released on 1994-02-15.'])
self.check_wrap(text, 40, ['Python 1.0.0 was released on 1994-01-26.',
'Python 1.0.1 was released on 1994-02-15.'])
self.check_wrap(text, 1, text.split(), break_long_words=False)
text = "I do all my shopping at 7-11."
self.check_wrap(text, 25, ["I do all my shopping at",
"7-11."])
self.check_wrap(text, 27, ["I do all my shopping at",
"7-11."])
self.check_wrap(text, 29, ["I do all my shopping at 7-11."])
self.check_wrap(text, 1, text.split(), break_long_words=False)
def test_em_dash(self):
# Test text with em-dashes
text = "Em-dashes should be written -- thus."
self.check_wrap(text, 25,
["Em-dashes should be",
"written -- thus."])
# Probe the boundaries of the properly written em-dash,
# ie. " -- ".
self.check_wrap(text, 29,
["Em-dashes should be written",
"-- thus."])
expect = ["Em-dashes should be written --",
"thus."]
self.check_wrap(text, 30, expect)
self.check_wrap(text, 35, expect)
self.check_wrap(text, 36,
["Em-dashes should be written -- thus."])
# The improperly written em-dash is handled too, because
# it's adjacent to non-whitespace on both sides.
text = "You can also do--this or even---this."
expect = ["You can also do",
"--this or even",
"---this."]
self.check_wrap(text, 15, expect)
self.check_wrap(text, 16, expect)
expect = ["You can also do--",
"this or even---",
"this."]
self.check_wrap(text, 17, expect)
self.check_wrap(text, 19, expect)
expect = ["You can also do--this or even",
"---this."]
self.check_wrap(text, 29, expect)
self.check_wrap(text, 31, expect)
expect = ["You can also do--this or even---",
"this."]
self.check_wrap(text, 32, expect)
self.check_wrap(text, 35, expect)
# All of the above behaviour could be deduced by probing the
# _split() method.
text = "Here's an -- em-dash and--here's another---and another!"
expect = ["Here's", " ", "an", " ", "--", " ", "em-", "dash", " ",
"and", "--", "here's", " ", "another", "---",
"and", " ", "another!"]
self.check_split(text, expect)
text = "and then--bam!--he was gone"
expect = ["and", " ", "then", "--", "bam!", "--",
"he", " ", "was", " ", "gone"]
self.check_split(text, expect)
def test_unix_options (self):
# Test that Unix-style command-line options are wrapped correctly.
# Both Optik (OptionParser) and Docutils rely on this behaviour!
text = "You should use the -n option, or --dry-run in its long form."
self.check_wrap(text, 20,
["You should use the",
"-n option, or --dry-",
"run in its long",
"form."])
self.check_wrap(text, 21,
["You should use the -n",
"option, or --dry-run",
"in its long form."])
expect = ["You should use the -n option, or",
"--dry-run in its long form."]
self.check_wrap(text, 32, expect)
self.check_wrap(text, 34, expect)
self.check_wrap(text, 35, expect)
self.check_wrap(text, 38, expect)
expect = ["You should use the -n option, or --dry-",
"run in its long form."]
self.check_wrap(text, 39, expect)
self.check_wrap(text, 41, expect)
expect = ["You should use the -n option, or --dry-run",
"in its long form."]
self.check_wrap(text, 42, expect)
# Again, all of the above can be deduced from _split().
text = "the -n option, or --dry-run or --dryrun"
expect = ["the", " ", "-n", " ", "option,", " ", "or", " ",
"--dry-", "run", " ", "or", " ", "--dryrun"]
self.check_split(text, expect)
def test_funky_hyphens (self):
# Screwy edge cases cooked up by David Goodger. All reported
# in SF bug #596434.
self.check_split("what the--hey!", ["what", " ", "the", "--", "hey!"])
self.check_split("what the--", ["what", " ", "the--"])
self.check_split("what the--.", ["what", " ", "the--."])
self.check_split("--text--.", ["--text--."])
# When I first read bug #596434, this is what I thought David
# was talking about. I was wrong; these have always worked
# fine. The real problem is tested in test_funky_parens()
# below...
self.check_split("--option", ["--option"])
self.check_split("--option-opt", ["--option-", "opt"])
self.check_split("foo --option-opt bar",
["foo", " ", "--option-", "opt", " ", "bar"])
def test_punct_hyphens(self):
# Oh bother, SF #965425 found another problem with hyphens --
# hyphenated words in single quotes weren't handled correctly.
# In fact, the bug is that *any* punctuation around a hyphenated
# word was handled incorrectly, except for a leading "--", which
# was special-cased for Optik and Docutils. So test a variety
# of styles of punctuation around a hyphenated word.
# (Actually this is based on an Optik bug report, #813077).
self.check_split("the 'wibble-wobble' widget",
['the', ' ', "'wibble-", "wobble'", ' ', 'widget'])
self.check_split('the "wibble-wobble" widget',
['the', ' ', '"wibble-', 'wobble"', ' ', 'widget'])
self.check_split("the (wibble-wobble) widget",
['the', ' ', "(wibble-", "wobble)", ' ', 'widget'])
self.check_split("the ['wibble-wobble'] widget",
['the', ' ', "['wibble-", "wobble']", ' ', 'widget'])
# The test tests current behavior but is not testing parts of the API.
self.check_split("what-d'you-call-it.",
"what-d'you-|call-|it.".split('|'))
def test_funky_parens (self):
# Second part of SF bug #596434: long option strings inside
# parentheses.
self.check_split("foo (--option) bar",
["foo", " ", "(--option)", " ", "bar"])
# Related stuff -- make sure parens work in simpler contexts.
self.check_split("foo (bar) baz",
["foo", " ", "(bar)", " ", "baz"])
self.check_split("blah (ding dong), wubba",
["blah", " ", "(ding", " ", "dong),",
" ", "wubba"])
def test_drop_whitespace_false(self):
# Check that drop_whitespace=False preserves whitespace.
# SF patch #1581073
text = " This is a sentence with much whitespace."
self.check_wrap(text, 10,
[" This is a", " ", "sentence ",
"with ", "much white", "space."],
drop_whitespace=False)
def test_drop_whitespace_false_whitespace_only(self):
# Check that drop_whitespace=False preserves a whitespace-only string.
self.check_wrap(" ", 6, [" "], drop_whitespace=False)
def test_drop_whitespace_false_whitespace_only_with_indent(self):
# Check that a whitespace-only string gets indented (when
# drop_whitespace is False).
self.check_wrap(" ", 6, [" "], drop_whitespace=False,
initial_indent=" ")
def test_drop_whitespace_whitespace_only(self):
# Check drop_whitespace on a whitespace-only string.
self.check_wrap(" ", 6, [])
def test_drop_whitespace_leading_whitespace(self):
# Check that drop_whitespace does not drop leading whitespace (if
# followed by non-whitespace).
# SF bug #622849 reported inconsistent handling of leading
# whitespace; let's test that a bit, shall we?
text = " This is a sentence with leading whitespace."
self.check_wrap(text, 50,
[" This is a sentence with leading whitespace."])
self.check_wrap(text, 30,
[" This is a sentence with", "leading whitespace."])
def test_drop_whitespace_whitespace_line(self):
# Check that drop_whitespace skips the whole line if a non-leading
# line consists only of whitespace.
text = "abcd efgh"
# Include the result for drop_whitespace=False for comparison.
self.check_wrap(text, 6, ["abcd", " ", "efgh"],
drop_whitespace=False)
self.check_wrap(text, 6, ["abcd", "efgh"])
def test_drop_whitespace_whitespace_only_with_indent(self):
# Check that initial_indent is not applied to a whitespace-only
# string. This checks a special case of the fact that dropping
# whitespace occurs before indenting.
self.check_wrap(" ", 6, [], initial_indent="++")
def test_drop_whitespace_whitespace_indent(self):
# Check that drop_whitespace does not drop whitespace indents.
# This checks a special case of the fact that dropping whitespace
# occurs before indenting.
self.check_wrap("abcd efgh", 6, [" abcd", " efgh"],
initial_indent=" ", subsequent_indent=" ")
def test_split(self):
# Ensure that the standard _split() method works as advertised
# in the comments
text = "Hello there -- you goof-ball, use the -b option!"
result = self.wrapper._split(text)
self.check(result,
["Hello", " ", "there", " ", "--", " ", "you", " ", "goof-",
"ball,", " ", "use", " ", "the", " ", "-b", " ", "option!"])
def test_break_on_hyphens(self):
# Ensure that the break_on_hyphens attributes work
text = "yaba daba-doo"
self.check_wrap(text, 10, ["yaba daba-", "doo"],
break_on_hyphens=True)
self.check_wrap(text, 10, ["yaba", "daba-doo"],
break_on_hyphens=False)
def test_bad_width(self):
# Ensure that width <= 0 is caught.
text = "Whatever, it doesn't matter."
self.assertRaises(ValueError, wrap, text, 0)
self.assertRaises(ValueError, wrap, text, -1)
def test_no_split_at_umlaut(self):
text = "Die Empf\xe4nger-Auswahl"
self.check_wrap(text, 13, ["Die", "Empf\xe4nger-", "Auswahl"])
def test_umlaut_followed_by_dash(self):
text = "aa \xe4\xe4-\xe4\xe4"
self.check_wrap(text, 7, ["aa \xe4\xe4-", "\xe4\xe4"])
def test_non_breaking_space(self):
text = 'This is a sentence with non-breaking\N{NO-BREAK SPACE}space.'
self.check_wrap(text, 20,
['This is a sentence',
'with non-',
'breaking\N{NO-BREAK SPACE}space.'],
break_on_hyphens=True)
self.check_wrap(text, 20,
['This is a sentence',
'with',
'non-breaking\N{NO-BREAK SPACE}space.'],
break_on_hyphens=False)
def test_narrow_non_breaking_space(self):
text = ('This is a sentence with non-breaking'
'\N{NARROW NO-BREAK SPACE}space.')
self.check_wrap(text, 20,
['This is a sentence',
'with non-',
'breaking\N{NARROW NO-BREAK SPACE}space.'],
break_on_hyphens=True)
self.check_wrap(text, 20,
['This is a sentence',
'with',
'non-breaking\N{NARROW NO-BREAK SPACE}space.'],
break_on_hyphens=False)
class MaxLinesTestCase(BaseTestCase):
text = "Hello there, how are you this fine day? I'm glad to hear it!"
def test_simple(self):
self.check_wrap(self.text, 12,
["Hello [...]"],
max_lines=0)
self.check_wrap(self.text, 12,
["Hello [...]"],
max_lines=1)
self.check_wrap(self.text, 12,
["Hello there,",
"how [...]"],
max_lines=2)
self.check_wrap(self.text, 13,
["Hello there,",
"how are [...]"],
max_lines=2)
self.check_wrap(self.text, 80, [self.text], max_lines=1)
self.check_wrap(self.text, 12,
["Hello there,",
"how are you",
"this fine",
"day? I'm",
"glad to hear",
"it!"],
max_lines=6)
def test_spaces(self):
# strip spaces before placeholder
self.check_wrap(self.text, 12,
["Hello there,",
"how are you",
"this fine",
"day? [...]"],
max_lines=4)
# placeholder at the start of line
self.check_wrap(self.text, 6,
["Hello",
"[...]"],
max_lines=2)
# final spaces
self.check_wrap(self.text + ' ' * 10, 12,
["Hello there,",
"how are you",
"this fine",
"day? I'm",
"glad to hear",
"it!"],
max_lines=6)
def test_placeholder(self):
self.check_wrap(self.text, 12,
["Hello..."],
max_lines=1,
placeholder='...')
self.check_wrap(self.text, 12,
["Hello there,",
"how are..."],
max_lines=2,
placeholder='...')
# long placeholder and indentation
with self.assertRaises(ValueError):
wrap(self.text, 16, initial_indent=' ',
max_lines=1, placeholder=' [truncated]...')
with self.assertRaises(ValueError):
wrap(self.text, 16, subsequent_indent=' ',
max_lines=2, placeholder=' [truncated]...')
self.check_wrap(self.text, 16,
[" Hello there,",
" [truncated]..."],
max_lines=2,
initial_indent=' ',
subsequent_indent=' ',
placeholder=' [truncated]...')
self.check_wrap(self.text, 16,
[" [truncated]..."],
max_lines=1,
initial_indent=' ',
subsequent_indent=' ',
placeholder=' [truncated]...')
self.check_wrap(self.text, 80, [self.text], placeholder='.' * 1000)
class LongWordTestCase (BaseTestCase):
def setUp(self):
self.wrapper = TextWrapper()
self.text = '''\
Did you say "supercalifragilisticexpialidocious?"
How *do* you spell that odd word, anyways?
'''
def test_break_long(self):
# Wrap text with long words and lots of punctuation
self.check_wrap(self.text, 30,
['Did you say "supercalifragilis',
'ticexpialidocious?" How *do*',
'you spell that odd word,',
'anyways?'])
self.check_wrap(self.text, 50,
['Did you say "supercalifragilisticexpialidocious?"',
'How *do* you spell that odd word, anyways?'])
# SF bug 797650. Prevent an infinite loop by making sure that at
# least one character gets split off on every pass.
self.check_wrap('-'*10+'hello', 10,
['----------',
' h',
' e',
' l',
' l',
' o'],
subsequent_indent = ' '*15)
# bug 1146. Prevent a long word to be wrongly wrapped when the
# preceding word is exactly one character shorter than the width
self.check_wrap(self.text, 12,
['Did you say ',
'"supercalifr',
'agilisticexp',
'ialidocious?',
'" How *do*',
'you spell',
'that odd',
'word,',
'anyways?'])
def test_nobreak_long(self):
# Test with break_long_words disabled
self.wrapper.break_long_words = 0
self.wrapper.width = 30
expect = ['Did you say',
'"supercalifragilisticexpialidocious?"',
'How *do* you spell that odd',
'word, anyways?'
]
result = self.wrapper.wrap(self.text)
self.check(result, expect)
# Same thing with kwargs passed to standalone wrap() function.
result = wrap(self.text, width=30, break_long_words=0)
self.check(result, expect)
def test_max_lines_long(self):
self.check_wrap(self.text, 12,
['Did you say ',
'"supercalifr',
'agilisticexp',
'[...]'],
max_lines=4)
class IndentTestCases(BaseTestCase):
# called before each test method
def setUp(self):
self.text = '''\
This paragraph will be filled, first without any indentation,
and then with some (including a hanging indent).'''
def test_fill(self):
# Test the fill() method
expect = '''\
This paragraph will be filled, first
without any indentation, and then with
some (including a hanging indent).'''
result = fill(self.text, 40)
self.check(result, expect)
def test_initial_indent(self):
# Test initial_indent parameter
expect = [" This paragraph will be filled,",
"first without any indentation, and then",
"with some (including a hanging indent)."]
result = wrap(self.text, 40, initial_indent=" ")
self.check(result, expect)
expect = "\n".join(expect)
result = fill(self.text, 40, initial_indent=" ")
self.check(result, expect)
def test_subsequent_indent(self):
# Test subsequent_indent parameter
expect = '''\
* This paragraph will be filled, first
without any indentation, and then
with some (including a hanging
indent).'''
result = fill(self.text, 40,
initial_indent=" * ", subsequent_indent=" ")
self.check(result, expect)
# Despite the similar names, DedentTestCase is *not* the inverse
# of IndentTestCase!
class DedentTestCase(unittest.TestCase):
def assertUnchanged(self, text):
"""assert that dedent() has no effect on 'text'"""
self.assertEqual(text, dedent(text))
def test_dedent_nomargin(self):
# No lines indented.
text = "Hello there.\nHow are you?\nOh good, I'm glad."
self.assertUnchanged(text)
# Similar, with a blank line.
text = "Hello there.\n\nBoo!"
self.assertUnchanged(text)
# Some lines indented, but overall margin is still zero.
text = "Hello there.\n This is indented."
self.assertUnchanged(text)
# Again, add a blank line.
text = "Hello there.\n\n Boo!\n"
self.assertUnchanged(text)
def test_dedent_even(self):
# All lines indented by two spaces.
text = " Hello there.\n How are ya?\n Oh good."
expect = "Hello there.\nHow are ya?\nOh good."
self.assertEqual(expect, dedent(text))
# Same, with blank lines.
text = " Hello there.\n\n How are ya?\n Oh good.\n"
expect = "Hello there.\n\nHow are ya?\nOh good.\n"
self.assertEqual(expect, dedent(text))
# Now indent one of the blank lines.
text = " Hello there.\n \n How are ya?\n Oh good.\n"
expect = "Hello there.\n\nHow are ya?\nOh good.\n"
self.assertEqual(expect, dedent(text))
def test_dedent_uneven(self):
# Lines indented unevenly.
text = '''\
def foo():
while 1:
return foo
'''
expect = '''\
def foo():
while 1:
return foo
'''
self.assertEqual(expect, dedent(text))
# Uneven indentation with a blank line.
text = " Foo\n Bar\n\n Baz\n"
expect = "Foo\n Bar\n\n Baz\n"
self.assertEqual(expect, dedent(text))
# Uneven indentation with a whitespace-only line.
text = " Foo\n Bar\n \n Baz\n"
expect = "Foo\n Bar\n\n Baz\n"
self.assertEqual(expect, dedent(text))
# dedent() should not mangle internal tabs
def test_dedent_preserve_internal_tabs(self):
text = " hello\tthere\n how are\tyou?"
expect = "hello\tthere\nhow are\tyou?"
self.assertEqual(expect, dedent(text))
# make sure that it preserves tabs when it's not making any
# changes at all
self.assertEqual(expect, dedent(expect))
# dedent() should not mangle tabs in the margin (i.e.
# tabs and spaces both count as margin, but are *not*
# considered equivalent)
def test_dedent_preserve_margin_tabs(self):
text = " hello there\n\thow are you?"
self.assertUnchanged(text)
# same effect even if we have 8 spaces
text = " hello there\n\thow are you?"
self.assertUnchanged(text)
# dedent() only removes whitespace that can be uniformly removed!
text = "\thello there\n\thow are you?"
expect = "hello there\nhow are you?"
self.assertEqual(expect, dedent(text))
text = " \thello there\n \thow are you?"
self.assertEqual(expect, dedent(text))
text = " \t hello there\n \t how are you?"
self.assertEqual(expect, dedent(text))
text = " \thello there\n \t how are you?"
expect = "hello there\n how are you?"
self.assertEqual(expect, dedent(text))
# test margin is smaller than smallest indent
text = " \thello there\n \thow are you?\n \tI'm fine, thanks"
expect = " \thello there\n \thow are you?\n\tI'm fine, thanks"
self.assertEqual(expect, dedent(text))
# Test textwrap.indent
class IndentTestCase(unittest.TestCase):
# The examples used for tests. If any of these change, the expected
# results in the various test cases must also be updated.
# The roundtrip cases are separate, because textwrap.dedent doesn't
# handle Windows line endings
ROUNDTRIP_CASES = (
# Basic test case
"Hi.\nThis is a test.\nTesting.",
# Include a blank line
"Hi.\nThis is a test.\n\nTesting.",
# Include leading and trailing blank lines
"\nHi.\nThis is a test.\nTesting.\n",
)
CASES = ROUNDTRIP_CASES + (
# Use Windows line endings
"Hi.\r\nThis is a test.\r\nTesting.\r\n",
# Pathological case
"\nHi.\r\nThis is a test.\n\r\nTesting.\r\n\n",
)
def test_indent_nomargin_default(self):
# indent should do nothing if 'prefix' is empty.
for text in self.CASES:
self.assertEqual(indent(text, ''), text)
def test_indent_nomargin_explicit_default(self):
# The same as test_indent_nomargin, but explicitly requesting
# the default behaviour by passing None as the predicate
for text in self.CASES:
self.assertEqual(indent(text, '', None), text)
def test_indent_nomargin_all_lines(self):
# The same as test_indent_nomargin, but using the optional
# predicate argument
predicate = lambda line: True
for text in self.CASES:
self.assertEqual(indent(text, '', predicate), text)
def test_indent_no_lines(self):
# Explicitly skip indenting any lines
predicate = lambda line: False
for text in self.CASES:
self.assertEqual(indent(text, ' ', predicate), text)
def test_roundtrip_spaces(self):
# A whitespace prefix should roundtrip with dedent
for text in self.ROUNDTRIP_CASES:
self.assertEqual(dedent(indent(text, ' ')), text)
def test_roundtrip_tabs(self):
# A whitespace prefix should roundtrip with dedent
for text in self.ROUNDTRIP_CASES:
self.assertEqual(dedent(indent(text, '\t\t')), text)
def test_roundtrip_mixed(self):
# A whitespace prefix should roundtrip with dedent
for text in self.ROUNDTRIP_CASES:
self.assertEqual(dedent(indent(text, ' \t \t ')), text)
def test_indent_default(self):
# Test default indenting of lines that are not whitespace only
prefix = ' '
expected = (
# Basic test case
" Hi.\n This is a test.\n Testing.",
# Include a blank line
" Hi.\n This is a test.\n\n Testing.",
# Include leading and trailing blank lines
"\n Hi.\n This is a test.\n Testing.\n",
# Use Windows line endings
" Hi.\r\n This is a test.\r\n Testing.\r\n",
# Pathological case
"\n Hi.\r\n This is a test.\n\r\n Testing.\r\n\n",
)
for text, expect in zip(self.CASES, expected):
self.assertEqual(indent(text, prefix), expect)
def test_indent_explicit_default(self):
# Test default indenting of lines that are not whitespace only
prefix = ' '
expected = (
# Basic test case
" Hi.\n This is a test.\n Testing.",
# Include a blank line
" Hi.\n This is a test.\n\n Testing.",
# Include leading and trailing blank lines
"\n Hi.\n This is a test.\n Testing.\n",
# Use Windows line endings
" Hi.\r\n This is a test.\r\n Testing.\r\n",
# Pathological case
"\n Hi.\r\n This is a test.\n\r\n Testing.\r\n\n",
)
for text, expect in zip(self.CASES, expected):
self.assertEqual(indent(text, prefix, None), expect)
def test_indent_all_lines(self):
# Add 'prefix' to all lines, including whitespace-only ones.
prefix = ' '
expected = (
# Basic test case
" Hi.\n This is a test.\n Testing.",
# Include a blank line
" Hi.\n This is a test.\n \n Testing.",
# Include leading and trailing blank lines
" \n Hi.\n This is a test.\n Testing.\n",
# Use Windows line endings
" Hi.\r\n This is a test.\r\n Testing.\r\n",
# Pathological case
" \n Hi.\r\n This is a test.\n \r\n Testing.\r\n \n",
)
predicate = lambda line: True
for text, expect in zip(self.CASES, expected):
self.assertEqual(indent(text, prefix, predicate), expect)
def test_indent_empty_lines(self):
# Add 'prefix' solely to whitespace-only lines.
prefix = ' '
expected = (
# Basic test case
"Hi.\nThis is a test.\nTesting.",
# Include a blank line
"Hi.\nThis is a test.\n \nTesting.",
# Include leading and trailing blank lines
" \nHi.\nThis is a test.\nTesting.\n",
# Use Windows line endings
"Hi.\r\nThis is a test.\r\nTesting.\r\n",
# Pathological case
" \nHi.\r\nThis is a test.\n \r\nTesting.\r\n \n",
)
predicate = lambda line: not line.strip()
for text, expect in zip(self.CASES, expected):
self.assertEqual(indent(text, prefix, predicate), expect)
class ShortenTestCase(BaseTestCase):
def check_shorten(self, text, width, expect, **kwargs):
result = shorten(text, width, **kwargs)
self.check(result, expect)
def test_simple(self):
# Simple case: just words, spaces, and a bit of punctuation
text = "Hello there, how are you this fine day? I'm glad to hear it!"
self.check_shorten(text, 18, "Hello there, [...]")
self.check_shorten(text, len(text), text)
self.check_shorten(text, len(text) - 1,
"Hello there, how are you this fine day? "
"I'm glad to [...]")
def test_placeholder(self):
text = "Hello there, how are you this fine day? I'm glad to hear it!"
self.check_shorten(text, 17, "Hello there,$$", placeholder='$$')
self.check_shorten(text, 18, "Hello there, how$$", placeholder='$$')
self.check_shorten(text, 18, "Hello there, $$", placeholder=' $$')
self.check_shorten(text, len(text), text, placeholder='$$')
self.check_shorten(text, len(text) - 1,
"Hello there, how are you this fine day? "
"I'm glad to hear$$", placeholder='$$')
def test_empty_string(self):
self.check_shorten("", 6, "")
def test_whitespace(self):
# Whitespace collapsing
text = """
This is a paragraph that already has
line breaks and \t tabs too."""
self.check_shorten(text, 62,
"This is a paragraph that already has line "
"breaks and tabs too.")
self.check_shorten(text, 61,
"This is a paragraph that already has line "
"breaks and [...]")
self.check_shorten("hello world! ", 12, "hello world!")
self.check_shorten("hello world! ", 11, "hello [...]")
# The leading space is trimmed from the placeholder
# (it would be ugly otherwise).
self.check_shorten("hello world! ", 10, "[...]")
def test_width_too_small_for_placeholder(self):
shorten("x" * 20, width=8, placeholder="(......)")
with self.assertRaises(ValueError):
shorten("x" * 20, width=8, placeholder="(.......)")
def test_first_word_too_long_but_placeholder_fits(self):
self.check_shorten("Helloo", 5, "[...]")
if __name__ == '__main__':
unittest.main()
| 38,589 | 978 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_threading_local.py | import unittest
from doctest import DocTestSuite
from test import support
import weakref
import gc
# Modules under test
_thread = support.import_module('_thread')
threading = support.import_module('threading')
import _threading_local
class Weak(object):
pass
def target(local, weaklist):
weak = Weak()
local.weak = weak
weaklist.append(weakref.ref(weak))
class BaseLocalTest:
def test_local_refs(self):
self._local_refs(20)
self._local_refs(50)
self._local_refs(100)
def _local_refs(self, n):
local = self._local()
weaklist = []
for i in range(n):
t = threading.Thread(target=target, args=(local, weaklist))
t.start()
t.join()
del t
gc.collect()
self.assertEqual(len(weaklist), n)
# XXX _threading_local keeps the local of the last stopped thread alive.
deadlist = [weak for weak in weaklist if weak() is None]
self.assertIn(len(deadlist), (n-1, n))
# Assignment to the same thread local frees it sometimes (!)
local.someothervar = None
gc.collect()
deadlist = [weak for weak in weaklist if weak() is None]
self.assertIn(len(deadlist), (n-1, n), (n, len(deadlist)))
def test_derived(self):
# Issue 3088: if there is a threads switch inside the __init__
# of a threading.local derived class, the per-thread dictionary
# is created but not correctly set on the object.
# The first member set may be bogus.
import time
class Local(self._local):
def __init__(self):
time.sleep(0.01)
local = Local()
def f(i):
local.x = i
# Simply check that the variable is correctly set
self.assertEqual(local.x, i)
with support.start_threads(threading.Thread(target=f, args=(i,))
for i in range(10)):
pass
def test_derived_cycle_dealloc(self):
# http://bugs.python.org/issue6990
class Local(self._local):
pass
locals = None
passed = False
e1 = threading.Event()
e2 = threading.Event()
def f():
nonlocal passed
# 1) Involve Local in a cycle
cycle = [Local()]
cycle.append(cycle)
cycle[0].foo = 'bar'
# 2) GC the cycle (triggers threadmodule.c::local_clear
# before local_dealloc)
del cycle
gc.collect()
e1.set()
e2.wait()
# 4) New Locals should be empty
passed = all(not hasattr(local, 'foo') for local in locals)
t = threading.Thread(target=f)
t.start()
e1.wait()
# 3) New Locals should recycle the original's address. Creating
# them in the thread overwrites the thread state and avoids the
# bug
locals = [Local() for i in range(10)]
e2.set()
t.join()
self.assertTrue(passed)
def test_arguments(self):
# Issue 1522237
class MyLocal(self._local):
def __init__(self, *args, **kwargs):
pass
MyLocal(a=1)
MyLocal(1)
self.assertRaises(TypeError, self._local, a=1)
self.assertRaises(TypeError, self._local, 1)
def _test_one_class(self, c):
self._failed = "No error message set or cleared."
obj = c()
e1 = threading.Event()
e2 = threading.Event()
def f1():
obj.x = 'foo'
obj.y = 'bar'
del obj.y
e1.set()
e2.wait()
def f2():
try:
foo = obj.x
except AttributeError:
# This is expected -- we haven't set obj.x in this thread yet!
self._failed = "" # passed
else:
self._failed = ('Incorrectly got value %r from class %r\n' %
(foo, c))
sys.stderr.write(self._failed)
t1 = threading.Thread(target=f1)
t1.start()
e1.wait()
t2 = threading.Thread(target=f2)
t2.start()
t2.join()
# The test is done; just let t1 know it can exit, and wait for it.
e2.set()
t1.join()
self.assertFalse(self._failed, self._failed)
def test_threading_local(self):
self._test_one_class(self._local)
def test_threading_local_subclass(self):
class LocalSubclass(self._local):
"""To test that subclasses behave properly."""
self._test_one_class(LocalSubclass)
def _test_dict_attribute(self, cls):
obj = cls()
obj.x = 5
self.assertEqual(obj.__dict__, {'x': 5})
with self.assertRaises(AttributeError):
obj.__dict__ = {}
with self.assertRaises(AttributeError):
del obj.__dict__
def test_dict_attribute(self):
self._test_dict_attribute(self._local)
def test_dict_attribute_subclass(self):
class LocalSubclass(self._local):
"""To test that subclasses behave properly."""
self._test_dict_attribute(LocalSubclass)
def test_cycle_collection(self):
class X:
pass
x = X()
x.local = self._local()
x.local.x = x
wr = weakref.ref(x)
del x
gc.collect()
self.assertIsNone(wr())
class ThreadLocalTest(unittest.TestCase, BaseLocalTest):
_local = _thread._local
class PyThreadingLocalTest(unittest.TestCase, BaseLocalTest):
_local = _threading_local.local
def test_main():
suite = unittest.TestSuite()
suite.addTest(DocTestSuite('_threading_local'))
suite.addTest(unittest.makeSuite(ThreadLocalTest))
suite.addTest(unittest.makeSuite(PyThreadingLocalTest))
local_orig = _threading_local.local
def setUp(test):
_threading_local.local = _thread._local
def tearDown(test):
_threading_local.local = local_orig
suite.addTest(DocTestSuite('_threading_local',
setUp=setUp, tearDown=tearDown)
)
support.run_unittest(suite)
if __name__ == '__main__':
test_main()
| 6,281 | 221 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_resource.py | import contextlib
import sys
import os
import unittest
from test import support
import time
resource = support.import_module('resource')
# This test is checking a few specific problem spots with the resource module.
class ResourceTest(unittest.TestCase):
def test_args(self):
self.assertRaises(TypeError, resource.getrlimit)
self.assertRaises(TypeError, resource.getrlimit, 42, 42)
self.assertRaises(TypeError, resource.setrlimit)
self.assertRaises(TypeError, resource.setrlimit, 42, 42, 42)
@unittest.skipIf(True, "RLIM_INFINITY is -1, expected positive value")
def test_fsize_ismax(self):
try:
(cur, max) = resource.getrlimit(resource.RLIMIT_FSIZE)
except AttributeError:
pass
else:
# RLIMIT_FSIZE should be RLIM_INFINITY, which will be a really big
# number on a platform with large file support. On these platforms,
# we need to test that the get/setrlimit functions properly convert
# the number to a C long long and that the conversion doesn't raise
# an error.
self.assertEqual(resource.RLIM_INFINITY, max)
resource.setrlimit(resource.RLIMIT_FSIZE, (cur, max))
def test_fsize_enforced(self):
try:
(cur, max) = resource.getrlimit(resource.RLIMIT_FSIZE)
except AttributeError:
pass
else:
# Check to see what happens when the RLIMIT_FSIZE is small. Some
# versions of Python were terminated by an uncaught SIGXFSZ, but
# pythonrun.c has been fixed to ignore that exception. If so, the
# write() should return EFBIG when the limit is exceeded.
# At least one platform has an unlimited RLIMIT_FSIZE and attempts
# to change it raise ValueError instead.
try:
try:
resource.setrlimit(resource.RLIMIT_FSIZE, (1024, max))
limit_set = True
except ValueError:
limit_set = False
f = open(support.TESTFN, "wb")
try:
f.write(b"X" * 1024)
try:
f.write(b"Y")
f.flush()
# On some systems (e.g., Ubuntu on hppa) the flush()
# doesn't always cause the exception, but the close()
# does eventually. Try flushing several times in
# an attempt to ensure the file is really synced and
# the exception raised.
for i in range(5):
time.sleep(.1)
f.flush()
except OSError:
if not limit_set:
raise
if limit_set:
# Close will attempt to flush the byte we wrote
# Restore limit first to avoid getting a spurious error
resource.setrlimit(resource.RLIMIT_FSIZE, (cur, max))
finally:
f.close()
finally:
if limit_set:
resource.setrlimit(resource.RLIMIT_FSIZE, (cur, max))
support.unlink(support.TESTFN)
def test_fsize_toobig(self):
# Be sure that setrlimit is checking for really large values
too_big = 10**50
try:
(cur, max) = resource.getrlimit(resource.RLIMIT_FSIZE)
except AttributeError:
pass
else:
try:
resource.setrlimit(resource.RLIMIT_FSIZE, (too_big, max))
except (OverflowError, ValueError):
pass
try:
resource.setrlimit(resource.RLIMIT_FSIZE, (max, too_big))
except (OverflowError, ValueError):
pass
def test_getrusage(self):
self.assertRaises(TypeError, resource.getrusage)
self.assertRaises(TypeError, resource.getrusage, 42, 42)
usageself = resource.getrusage(resource.RUSAGE_SELF)
usagechildren = resource.getrusage(resource.RUSAGE_CHILDREN)
# May not be available on all systems.
try:
usageboth = resource.getrusage(resource.RUSAGE_BOTH)
except (ValueError, AttributeError):
pass
try:
usage_thread = resource.getrusage(resource.RUSAGE_THREAD)
except (ValueError, AttributeError):
pass
# Issue 6083: Reference counting bug
def test_setrusage_refcount(self):
try:
limits = resource.getrlimit(resource.RLIMIT_CPU)
except AttributeError:
pass
else:
class BadSequence:
def __len__(self):
return 2
def __getitem__(self, key):
if key in (0, 1):
return len(tuple(range(1000000)))
raise IndexError
resource.setrlimit(resource.RLIMIT_CPU, BadSequence())
def test_pagesize(self):
pagesize = resource.getpagesize()
self.assertIsInstance(pagesize, int)
self.assertGreaterEqual(pagesize, 0)
@unittest.skipUnless(sys.platform == 'linux', 'test requires Linux')
def test_linux_constants(self):
for attr in ['MSGQUEUE', 'NICE', 'RTPRIO', 'RTTIME', 'SIGPENDING']:
with contextlib.suppress(AttributeError):
self.assertIsInstance(getattr(resource, 'RLIMIT_' + attr), int)
@support.requires_freebsd_version(9)
def test_freebsd_contants(self):
for attr in ['SWAP', 'SBSIZE', 'NPTS']:
with contextlib.suppress(AttributeError):
self.assertIsInstance(getattr(resource, 'RLIMIT_' + attr), int)
@unittest.skipUnless(hasattr(resource, 'prlimit'), 'no prlimit')
@support.requires_linux_version(2, 6, 36)
def test_prlimit(self):
self.assertRaises(TypeError, resource.prlimit)
self.assertRaises(ProcessLookupError, resource.prlimit,
-1, resource.RLIMIT_AS)
limit = resource.getrlimit(resource.RLIMIT_AS)
self.assertEqual(resource.prlimit(0, resource.RLIMIT_AS), limit)
self.assertEqual(resource.prlimit(0, resource.RLIMIT_AS, limit),
limit)
# Issue 20191: Reference counting bug
@unittest.skipUnless(hasattr(resource, 'prlimit'), 'no prlimit')
@support.requires_linux_version(2, 6, 36)
def test_prlimit_refcount(self):
class BadSeq:
def __len__(self):
return 2
def __getitem__(self, key):
return limits[key] - 1 # new reference
limits = resource.getrlimit(resource.RLIMIT_AS)
self.assertEqual(resource.prlimit(0, resource.RLIMIT_AS, BadSeq()),
limits)
def test_main(verbose=None):
support.run_unittest(ResourceTest)
if __name__ == "__main__":
test_main()
| 7,075 | 179 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_dynamicclassattribute.py | # Test case for DynamicClassAttribute
# more tests are in test_descr
import abc
import sys
import unittest
import cosmo
from types import DynamicClassAttribute
class PropertyBase(Exception):
pass
class PropertyGet(PropertyBase):
pass
class PropertySet(PropertyBase):
pass
class PropertyDel(PropertyBase):
pass
class BaseClass(object):
def __init__(self):
self._spam = 5
@DynamicClassAttribute
def spam(self):
"""BaseClass.getter"""
return self._spam
@spam.setter
def spam(self, value):
self._spam = value
@spam.deleter
def spam(self):
del self._spam
class SubClass(BaseClass):
spam = BaseClass.__dict__['spam']
@spam.getter
def spam(self):
"""SubClass.getter"""
raise PropertyGet(self._spam)
@spam.setter
def spam(self, value):
raise PropertySet(self._spam)
@spam.deleter
def spam(self):
raise PropertyDel(self._spam)
class PropertyDocBase(object):
_spam = 1
def _get_spam(self):
return self._spam
spam = DynamicClassAttribute(_get_spam, doc="spam spam spam")
class PropertyDocSub(PropertyDocBase):
spam = PropertyDocBase.__dict__['spam']
@spam.getter
def spam(self):
"""The decorator does not use this doc string"""
return self._spam
class PropertySubNewGetter(BaseClass):
spam = BaseClass.__dict__['spam']
@spam.getter
def spam(self):
"""new docstring"""
return 5
class PropertyNewGetter(object):
@DynamicClassAttribute
def spam(self):
"""original docstring"""
return 1
@spam.getter
def spam(self):
"""new docstring"""
return 8
class ClassWithAbstractVirtualProperty(metaclass=abc.ABCMeta):
@DynamicClassAttribute
@abc.abstractmethod
def color():
pass
class ClassWithPropertyAbstractVirtual(metaclass=abc.ABCMeta):
@abc.abstractmethod
@DynamicClassAttribute
def color():
pass
class PropertyTests(unittest.TestCase):
def test_property_decorator_baseclass(self):
# see #1620
base = BaseClass()
self.assertEqual(base.spam, 5)
self.assertEqual(base._spam, 5)
base.spam = 10
self.assertEqual(base.spam, 10)
self.assertEqual(base._spam, 10)
delattr(base, "spam")
self.assertTrue(not hasattr(base, "spam"))
self.assertTrue(not hasattr(base, "_spam"))
base.spam = 20
self.assertEqual(base.spam, 20)
self.assertEqual(base._spam, 20)
def test_property_decorator_subclass(self):
# see #1620
sub = SubClass()
self.assertRaises(PropertyGet, getattr, sub, "spam")
self.assertRaises(PropertySet, setattr, sub, "spam", None)
self.assertRaises(PropertyDel, delattr, sub, "spam")
@unittest.skipIf(sys.flags.optimize >= 2 or cosmo.MODE == 'tiny',
"Docstrings are omitted with -O2 and above")
def test_property_decorator_subclass_doc(self):
sub = SubClass()
self.assertEqual(sub.__class__.__dict__['spam'].__doc__, "SubClass.getter")
@unittest.skipIf(sys.flags.optimize >= 2 or cosmo.MODE == 'tiny',
"Docstrings are omitted with -O2 and above")
def test_property_decorator_baseclass_doc(self):
base = BaseClass()
self.assertEqual(base.__class__.__dict__['spam'].__doc__, "BaseClass.getter")
def test_property_decorator_doc(self):
base = PropertyDocBase()
sub = PropertyDocSub()
self.assertEqual(base.__class__.__dict__['spam'].__doc__, "spam spam spam")
self.assertEqual(sub.__class__.__dict__['spam'].__doc__, "spam spam spam")
@unittest.skipIf(sys.flags.optimize >= 2 or cosmo.MODE == 'tiny',
"Docstrings are omitted with -O2 and above")
def test_property_getter_doc_override(self):
newgettersub = PropertySubNewGetter()
self.assertEqual(newgettersub.spam, 5)
self.assertEqual(newgettersub.__class__.__dict__['spam'].__doc__, "new docstring")
newgetter = PropertyNewGetter()
self.assertEqual(newgetter.spam, 8)
self.assertEqual(newgetter.__class__.__dict__['spam'].__doc__, "new docstring")
def test_property___isabstractmethod__descriptor(self):
for val in (True, False, [], [1], '', '1'):
class C(object):
def foo(self):
pass
foo.__isabstractmethod__ = val
foo = DynamicClassAttribute(foo)
self.assertIs(C.__dict__['foo'].__isabstractmethod__, bool(val))
# check that the DynamicClassAttribute's __isabstractmethod__ descriptor does the
# right thing when presented with a value that fails truth testing:
class NotBool(object):
def __bool__(self):
raise ValueError()
__len__ = __bool__
with self.assertRaises(ValueError):
class C(object):
def foo(self):
pass
foo.__isabstractmethod__ = NotBool()
foo = DynamicClassAttribute(foo)
def test_abstract_virtual(self):
self.assertRaises(TypeError, ClassWithAbstractVirtualProperty)
self.assertRaises(TypeError, ClassWithPropertyAbstractVirtual)
class APV(ClassWithPropertyAbstractVirtual):
pass
self.assertRaises(TypeError, APV)
class AVP(ClassWithAbstractVirtualProperty):
pass
self.assertRaises(TypeError, AVP)
class Okay1(ClassWithAbstractVirtualProperty):
@DynamicClassAttribute
def color(self):
return self._color
def __init__(self):
self._color = 'cyan'
with self.assertRaises(AttributeError):
Okay1.color
self.assertEqual(Okay1().color, 'cyan')
class Okay2(ClassWithAbstractVirtualProperty):
@DynamicClassAttribute
def color(self):
return self._color
def __init__(self):
self._color = 'magenta'
with self.assertRaises(AttributeError):
Okay2.color
self.assertEqual(Okay2().color, 'magenta')
# Issue 5890: subclasses of DynamicClassAttribute do not preserve method __doc__ strings
class PropertySub(DynamicClassAttribute):
"""This is a subclass of DynamicClassAttribute"""
class PropertySubSlots(DynamicClassAttribute):
"""This is a subclass of DynamicClassAttribute that defines __slots__"""
__slots__ = ()
class PropertySubclassTests(unittest.TestCase):
@unittest.skipIf(hasattr(PropertySubSlots, '__doc__'),
"__doc__ is already present, __slots__ will have no effect")
def test_slots_docstring_copy_exception(self):
try:
class Foo(object):
@PropertySubSlots
def spam(self):
"""Trying to copy this docstring will raise an exception"""
return 1
print('\n',spam.__doc__)
except AttributeError:
pass
else:
raise Exception("AttributeError not raised")
@unittest.skipIf(sys.flags.optimize >= 2 or cosmo.MODE == 'tiny',
"Docstrings are omitted with -O2 and above")
def test_docstring_copy(self):
class Foo(object):
@PropertySub
def spam(self):
"""spam wrapped in DynamicClassAttribute subclass"""
return 1
self.assertEqual(
Foo.__dict__['spam'].__doc__,
"spam wrapped in DynamicClassAttribute subclass")
@unittest.skipIf(sys.flags.optimize >= 2 or cosmo.MODE == 'tiny',
"Docstrings are omitted with -O2 and above")
def test_property_setter_copies_getter_docstring(self):
class Foo(object):
def __init__(self): self._spam = 1
@PropertySub
def spam(self):
"""spam wrapped in DynamicClassAttribute subclass"""
return self._spam
@spam.setter
def spam(self, value):
"""this docstring is ignored"""
self._spam = value
foo = Foo()
self.assertEqual(foo.spam, 1)
foo.spam = 2
self.assertEqual(foo.spam, 2)
self.assertEqual(
Foo.__dict__['spam'].__doc__,
"spam wrapped in DynamicClassAttribute subclass")
class FooSub(Foo):
spam = Foo.__dict__['spam']
@spam.setter
def spam(self, value):
"""another ignored docstring"""
self._spam = 'eggs'
foosub = FooSub()
self.assertEqual(foosub.spam, 1)
foosub.spam = 7
self.assertEqual(foosub.spam, 'eggs')
self.assertEqual(
FooSub.__dict__['spam'].__doc__,
"spam wrapped in DynamicClassAttribute subclass")
@unittest.skipIf(sys.flags.optimize >= 2 or cosmo.MODE == 'tiny',
"Docstrings are omitted with -O2 and above")
def test_property_new_getter_new_docstring(self):
class Foo(object):
@PropertySub
def spam(self):
"""a docstring"""
return 1
@spam.getter
def spam(self):
"""a new docstring"""
return 2
self.assertEqual(Foo.__dict__['spam'].__doc__, "a new docstring")
class FooBase(object):
@PropertySub
def spam(self):
"""a docstring"""
return 1
class Foo2(FooBase):
spam = FooBase.__dict__['spam']
@spam.getter
def spam(self):
"""a new docstring"""
return 2
self.assertEqual(Foo.__dict__['spam'].__doc__, "a new docstring")
if __name__ == '__main__':
unittest.main()
| 9,952 | 302 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_slice.py | # tests for slice objects; in particular the indices method.
import itertools
import operator
import sys
import unittest
import weakref
from pickle import loads, dumps
from test import support
def evaluate_slice_index(arg):
"""
Helper function to convert a slice argument to an integer, and raise
TypeError with a suitable message on failure.
"""
if hasattr(arg, '__index__'):
return operator.index(arg)
else:
raise TypeError(
"slice indices must be integers or "
"None or have an __index__ method")
def slice_indices(slice, length):
"""
Reference implementation for the slice.indices method.
"""
# Compute step and length as integers.
length = operator.index(length)
step = 1 if slice.step is None else evaluate_slice_index(slice.step)
# Raise ValueError for negative length or zero step.
if length < 0:
raise ValueError("length should not be negative")
if step == 0:
raise ValueError("slice step cannot be zero")
# Find lower and upper bounds for start and stop.
lower = -1 if step < 0 else 0
upper = length - 1 if step < 0 else length
# Compute start.
if slice.start is None:
start = upper if step < 0 else lower
else:
start = evaluate_slice_index(slice.start)
start = max(start + length, lower) if start < 0 else min(start, upper)
# Compute stop.
if slice.stop is None:
stop = lower if step < 0 else upper
else:
stop = evaluate_slice_index(slice.stop)
stop = max(stop + length, lower) if stop < 0 else min(stop, upper)
return start, stop, step
# Class providing an __index__ method. Used for testing slice.indices.
class MyIndexable(object):
def __init__(self, value):
self.value = value
def __index__(self):
return self.value
class SliceTest(unittest.TestCase):
def test_constructor(self):
self.assertRaises(TypeError, slice)
self.assertRaises(TypeError, slice, 1, 2, 3, 4)
def test_repr(self):
self.assertEqual(repr(slice(1, 2, 3)), "slice(1, 2, 3)")
def test_hash(self):
# Verify clearing of SF bug #800796
self.assertRaises(TypeError, hash, slice(5))
with self.assertRaises(TypeError):
slice(5).__hash__()
def test_cmp(self):
s1 = slice(1, 2, 3)
s2 = slice(1, 2, 3)
s3 = slice(1, 2, 4)
self.assertEqual(s1, s2)
self.assertNotEqual(s1, s3)
self.assertNotEqual(s1, None)
self.assertNotEqual(s1, (1, 2, 3))
self.assertNotEqual(s1, "")
class Exc(Exception):
pass
class BadCmp(object):
def __eq__(self, other):
raise Exc
s1 = slice(BadCmp())
s2 = slice(BadCmp())
self.assertEqual(s1, s1)
self.assertRaises(Exc, lambda: s1 == s2)
s1 = slice(1, BadCmp())
s2 = slice(1, BadCmp())
self.assertEqual(s1, s1)
self.assertRaises(Exc, lambda: s1 == s2)
s1 = slice(1, 2, BadCmp())
s2 = slice(1, 2, BadCmp())
self.assertEqual(s1, s1)
self.assertRaises(Exc, lambda: s1 == s2)
def test_members(self):
s = slice(1)
self.assertEqual(s.start, None)
self.assertEqual(s.stop, 1)
self.assertEqual(s.step, None)
s = slice(1, 2)
self.assertEqual(s.start, 1)
self.assertEqual(s.stop, 2)
self.assertEqual(s.step, None)
s = slice(1, 2, 3)
self.assertEqual(s.start, 1)
self.assertEqual(s.stop, 2)
self.assertEqual(s.step, 3)
class AnyClass:
pass
obj = AnyClass()
s = slice(obj)
self.assertTrue(s.stop is obj)
def check_indices(self, slice, length):
try:
actual = slice.indices(length)
except ValueError:
actual = "valueerror"
try:
expected = slice_indices(slice, length)
except ValueError:
expected = "valueerror"
self.assertEqual(actual, expected)
if length >= 0 and slice.step != 0:
actual = range(*slice.indices(length))
expected = range(length)[slice]
self.assertEqual(actual, expected)
def test_indices(self):
self.assertEqual(slice(None ).indices(10), (0, 10, 1))
self.assertEqual(slice(None, None, 2).indices(10), (0, 10, 2))
self.assertEqual(slice(1, None, 2).indices(10), (1, 10, 2))
self.assertEqual(slice(None, None, -1).indices(10), (9, -1, -1))
self.assertEqual(slice(None, None, -2).indices(10), (9, -1, -2))
self.assertEqual(slice(3, None, -2).indices(10), (3, -1, -2))
# issue 3004 tests
self.assertEqual(slice(None, -9).indices(10), (0, 1, 1))
self.assertEqual(slice(None, -10).indices(10), (0, 0, 1))
self.assertEqual(slice(None, -11).indices(10), (0, 0, 1))
self.assertEqual(slice(None, -10, -1).indices(10), (9, 0, -1))
self.assertEqual(slice(None, -11, -1).indices(10), (9, -1, -1))
self.assertEqual(slice(None, -12, -1).indices(10), (9, -1, -1))
self.assertEqual(slice(None, 9).indices(10), (0, 9, 1))
self.assertEqual(slice(None, 10).indices(10), (0, 10, 1))
self.assertEqual(slice(None, 11).indices(10), (0, 10, 1))
self.assertEqual(slice(None, 8, -1).indices(10), (9, 8, -1))
self.assertEqual(slice(None, 9, -1).indices(10), (9, 9, -1))
self.assertEqual(slice(None, 10, -1).indices(10), (9, 9, -1))
self.assertEqual(
slice(-100, 100 ).indices(10),
slice(None).indices(10)
)
self.assertEqual(
slice(100, -100, -1).indices(10),
slice(None, None, -1).indices(10)
)
self.assertEqual(slice(-100, 100, 2).indices(10), (0, 10, 2))
self.assertEqual(list(range(10))[::sys.maxsize - 1], [0])
# Check a variety of start, stop, step and length values, including
# values exceeding sys.maxsize (see issue #14794).
vals = [None, -2**100, -2**30, -53, -7, -1, 0, 1, 7, 53, 2**30, 2**100]
lengths = [0, 1, 7, 53, 2**30, 2**100]
for slice_args in itertools.product(vals, repeat=3):
s = slice(*slice_args)
for length in lengths:
self.check_indices(s, length)
self.check_indices(slice(0, 10, 1), -3)
# Negative length should raise ValueError
with self.assertRaises(ValueError):
slice(None).indices(-1)
# Zero step should raise ValueError
with self.assertRaises(ValueError):
slice(0, 10, 0).indices(5)
# Using a start, stop or step or length that can't be interpreted as an
# integer should give a TypeError ...
with self.assertRaises(TypeError):
slice(0.0, 10, 1).indices(5)
with self.assertRaises(TypeError):
slice(0, 10.0, 1).indices(5)
with self.assertRaises(TypeError):
slice(0, 10, 1.0).indices(5)
with self.assertRaises(TypeError):
slice(0, 10, 1).indices(5.0)
# ... but it should be fine to use a custom class that provides index.
self.assertEqual(slice(0, 10, 1).indices(5), (0, 5, 1))
self.assertEqual(slice(MyIndexable(0), 10, 1).indices(5), (0, 5, 1))
self.assertEqual(slice(0, MyIndexable(10), 1).indices(5), (0, 5, 1))
self.assertEqual(slice(0, 10, MyIndexable(1)).indices(5), (0, 5, 1))
self.assertEqual(slice(0, 10, 1).indices(MyIndexable(5)), (0, 5, 1))
def test_setslice_without_getslice(self):
tmp = []
class X(object):
def __setitem__(self, i, k):
tmp.append((i, k))
x = X()
x[1:2] = 42
self.assertEqual(tmp, [(slice(1, 2), 42)])
def test_pickle(self):
s = slice(10, 20, 3)
for protocol in (0,1,2):
t = loads(dumps(s, protocol))
self.assertEqual(s, t)
self.assertEqual(s.indices(15), t.indices(15))
self.assertNotEqual(id(s), id(t))
def test_cycle(self):
class myobj(): pass
o = myobj()
o.s = slice(o)
w = weakref.ref(o)
o = None
support.gc_collect()
self.assertIsNone(w())
if __name__ == "__main__":
unittest.main()
| 8,445 | 256 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_macurl2path.py | import macurl2path
import unittest
class MacUrl2PathTestCase(unittest.TestCase):
def test_url2pathname(self):
self.assertEqual(":index.html", macurl2path.url2pathname("index.html"))
self.assertEqual(":bar:index.html", macurl2path.url2pathname("bar/index.html"))
self.assertEqual("foo:bar:index.html", macurl2path.url2pathname("/foo/bar/index.html"))
self.assertEqual("foo:bar", macurl2path.url2pathname("/foo/bar/"))
self.assertEqual("", macurl2path.url2pathname("/"))
self.assertRaises(RuntimeError, macurl2path.url2pathname, "http://foo.com")
self.assertEqual("index.html", macurl2path.url2pathname("///index.html"))
self.assertRaises(RuntimeError, macurl2path.url2pathname, "//index.html")
self.assertEqual(":index.html", macurl2path.url2pathname("./index.html"))
self.assertEqual(":index.html", macurl2path.url2pathname("foo/../index.html"))
self.assertEqual("::index.html", macurl2path.url2pathname("../index.html"))
def test_pathname2url(self):
self.assertEqual("drive", macurl2path.pathname2url("drive:"))
self.assertEqual("drive/dir", macurl2path.pathname2url("drive:dir:"))
self.assertEqual("drive/dir/file", macurl2path.pathname2url("drive:dir:file"))
self.assertEqual("drive/file", macurl2path.pathname2url("drive:file"))
self.assertEqual("file", macurl2path.pathname2url("file"))
self.assertEqual("file", macurl2path.pathname2url(":file"))
self.assertEqual("dir", macurl2path.pathname2url(":dir:"))
self.assertEqual("dir/file", macurl2path.pathname2url(":dir:file"))
self.assertRaises(RuntimeError, macurl2path.pathname2url, "/")
self.assertEqual("dir/../file", macurl2path.pathname2url("dir::file"))
if __name__ == "__main__":
unittest.main()
| 1,839 | 32 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/sample_doctest.py | """This is a sample module that doesn't really test anything all that
interesting.
It simply has a few tests, some of which succeed and some of which fail.
It's important that the numbers remain constant as another test is
testing the running of these tests.
>>> 2+2
4
"""
def foo():
"""
>>> 2+2
5
>>> 2+2
4
"""
def bar():
"""
>>> 2+2
4
"""
def test_silly_setup():
"""
>>> import test.test_doctest
>>> test.test_doctest.sillySetup
True
"""
def w_blank():
"""
>>> if 1:
... print('a')
... print()
... print('b')
a
<BLANKLINE>
b
"""
x = 1
def x_is_one():
"""
>>> x
1
"""
def y_is_one():
"""
>>> y
1
"""
__test__ = {'good': """
>>> 42
42
""",
'bad': """
>>> 42
666
""",
}
def test_suite():
import doctest
return doctest.DocTestSuite()
| 1,041 | 77 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_colorsys.py | import unittest
import colorsys
def frange(start, stop, step):
while start <= stop:
yield start
start += step
class ColorsysTest(unittest.TestCase):
def assertTripleEqual(self, tr1, tr2):
self.assertEqual(len(tr1), 3)
self.assertEqual(len(tr2), 3)
self.assertAlmostEqual(tr1[0], tr2[0])
self.assertAlmostEqual(tr1[1], tr2[1])
self.assertAlmostEqual(tr1[2], tr2[2])
def test_hsv_roundtrip(self):
for r in frange(0.0, 1.0, 0.2):
for g in frange(0.0, 1.0, 0.2):
for b in frange(0.0, 1.0, 0.2):
rgb = (r, g, b)
self.assertTripleEqual(
rgb,
colorsys.hsv_to_rgb(*colorsys.rgb_to_hsv(*rgb))
)
def test_hsv_values(self):
values = [
# rgb, hsv
((0.0, 0.0, 0.0), ( 0 , 0.0, 0.0)), # black
((0.0, 0.0, 1.0), (4./6., 1.0, 1.0)), # blue
((0.0, 1.0, 0.0), (2./6., 1.0, 1.0)), # green
((0.0, 1.0, 1.0), (3./6., 1.0, 1.0)), # cyan
((1.0, 0.0, 0.0), ( 0 , 1.0, 1.0)), # red
((1.0, 0.0, 1.0), (5./6., 1.0, 1.0)), # purple
((1.0, 1.0, 0.0), (1./6., 1.0, 1.0)), # yellow
((1.0, 1.0, 1.0), ( 0 , 0.0, 1.0)), # white
((0.5, 0.5, 0.5), ( 0 , 0.0, 0.5)), # grey
]
for (rgb, hsv) in values:
self.assertTripleEqual(hsv, colorsys.rgb_to_hsv(*rgb))
self.assertTripleEqual(rgb, colorsys.hsv_to_rgb(*hsv))
def test_hls_roundtrip(self):
for r in frange(0.0, 1.0, 0.2):
for g in frange(0.0, 1.0, 0.2):
for b in frange(0.0, 1.0, 0.2):
rgb = (r, g, b)
self.assertTripleEqual(
rgb,
colorsys.hls_to_rgb(*colorsys.rgb_to_hls(*rgb))
)
def test_hls_values(self):
values = [
# rgb, hls
((0.0, 0.0, 0.0), ( 0 , 0.0, 0.0)), # black
((0.0, 0.0, 1.0), (4./6., 0.5, 1.0)), # blue
((0.0, 1.0, 0.0), (2./6., 0.5, 1.0)), # green
((0.0, 1.0, 1.0), (3./6., 0.5, 1.0)), # cyan
((1.0, 0.0, 0.0), ( 0 , 0.5, 1.0)), # red
((1.0, 0.0, 1.0), (5./6., 0.5, 1.0)), # purple
((1.0, 1.0, 0.0), (1./6., 0.5, 1.0)), # yellow
((1.0, 1.0, 1.0), ( 0 , 1.0, 0.0)), # white
((0.5, 0.5, 0.5), ( 0 , 0.5, 0.0)), # grey
]
for (rgb, hls) in values:
self.assertTripleEqual(hls, colorsys.rgb_to_hls(*rgb))
self.assertTripleEqual(rgb, colorsys.hls_to_rgb(*hls))
def test_yiq_roundtrip(self):
for r in frange(0.0, 1.0, 0.2):
for g in frange(0.0, 1.0, 0.2):
for b in frange(0.0, 1.0, 0.2):
rgb = (r, g, b)
self.assertTripleEqual(
rgb,
colorsys.yiq_to_rgb(*colorsys.rgb_to_yiq(*rgb))
)
def test_yiq_values(self):
values = [
# rgb, yiq
((0.0, 0.0, 0.0), (0.0, 0.0, 0.0)), # black
((0.0, 0.0, 1.0), (0.11, -0.3217, 0.3121)), # blue
((0.0, 1.0, 0.0), (0.59, -0.2773, -0.5251)), # green
((0.0, 1.0, 1.0), (0.7, -0.599, -0.213)), # cyan
((1.0, 0.0, 0.0), (0.3, 0.599, 0.213)), # red
((1.0, 0.0, 1.0), (0.41, 0.2773, 0.5251)), # purple
((1.0, 1.0, 0.0), (0.89, 0.3217, -0.3121)), # yellow
((1.0, 1.0, 1.0), (1.0, 0.0, 0.0)), # white
((0.5, 0.5, 0.5), (0.5, 0.0, 0.0)), # grey
]
for (rgb, yiq) in values:
self.assertTripleEqual(yiq, colorsys.rgb_to_yiq(*rgb))
self.assertTripleEqual(rgb, colorsys.yiq_to_rgb(*yiq))
if __name__ == "__main__":
unittest.main()
| 3,927 | 101 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/pydocfodder.py | """Something just to look at via pydoc."""
import types
class A_classic:
"A classic class."
def A_method(self):
"Method defined in A."
def AB_method(self):
"Method defined in A and B."
def AC_method(self):
"Method defined in A and C."
def AD_method(self):
"Method defined in A and D."
def ABC_method(self):
"Method defined in A, B and C."
def ABD_method(self):
"Method defined in A, B and D."
def ACD_method(self):
"Method defined in A, C and D."
def ABCD_method(self):
"Method defined in A, B, C and D."
class B_classic(A_classic):
"A classic class, derived from A_classic."
def AB_method(self):
"Method defined in A and B."
def ABC_method(self):
"Method defined in A, B and C."
def ABD_method(self):
"Method defined in A, B and D."
def ABCD_method(self):
"Method defined in A, B, C and D."
def B_method(self):
"Method defined in B."
def BC_method(self):
"Method defined in B and C."
def BD_method(self):
"Method defined in B and D."
def BCD_method(self):
"Method defined in B, C and D."
class C_classic(A_classic):
"A classic class, derived from A_classic."
def AC_method(self):
"Method defined in A and C."
def ABC_method(self):
"Method defined in A, B and C."
def ACD_method(self):
"Method defined in A, C and D."
def ABCD_method(self):
"Method defined in A, B, C and D."
def BC_method(self):
"Method defined in B and C."
def BCD_method(self):
"Method defined in B, C and D."
def C_method(self):
"Method defined in C."
def CD_method(self):
"Method defined in C and D."
class D_classic(B_classic, C_classic):
"A classic class, derived from B_classic and C_classic."
def AD_method(self):
"Method defined in A and D."
def ABD_method(self):
"Method defined in A, B and D."
def ACD_method(self):
"Method defined in A, C and D."
def ABCD_method(self):
"Method defined in A, B, C and D."
def BD_method(self):
"Method defined in B and D."
def BCD_method(self):
"Method defined in B, C and D."
def CD_method(self):
"Method defined in C and D."
def D_method(self):
"Method defined in D."
class A_new(object):
"A new-style class."
def A_method(self):
"Method defined in A."
def AB_method(self):
"Method defined in A and B."
def AC_method(self):
"Method defined in A and C."
def AD_method(self):
"Method defined in A and D."
def ABC_method(self):
"Method defined in A, B and C."
def ABD_method(self):
"Method defined in A, B and D."
def ACD_method(self):
"Method defined in A, C and D."
def ABCD_method(self):
"Method defined in A, B, C and D."
def A_classmethod(cls, x):
"A class method defined in A."
A_classmethod = classmethod(A_classmethod)
def A_staticmethod():
"A static method defined in A."
A_staticmethod = staticmethod(A_staticmethod)
def _getx(self):
"A property getter function."
def _setx(self, value):
"A property setter function."
def _delx(self):
"A property deleter function."
A_property = property(fdel=_delx, fget=_getx, fset=_setx,
doc="A sample property defined in A.")
A_int_alias = int
class B_new(A_new):
"A new-style class, derived from A_new."
def AB_method(self):
"Method defined in A and B."
def ABC_method(self):
"Method defined in A, B and C."
def ABD_method(self):
"Method defined in A, B and D."
def ABCD_method(self):
"Method defined in A, B, C and D."
def B_method(self):
"Method defined in B."
def BC_method(self):
"Method defined in B and C."
def BD_method(self):
"Method defined in B and D."
def BCD_method(self):
"Method defined in B, C and D."
class C_new(A_new):
"A new-style class, derived from A_new."
def AC_method(self):
"Method defined in A and C."
def ABC_method(self):
"Method defined in A, B and C."
def ACD_method(self):
"Method defined in A, C and D."
def ABCD_method(self):
"Method defined in A, B, C and D."
def BC_method(self):
"Method defined in B and C."
def BCD_method(self):
"Method defined in B, C and D."
def C_method(self):
"Method defined in C."
def CD_method(self):
"Method defined in C and D."
class D_new(B_new, C_new):
"""A new-style class, derived from B_new and C_new.
"""
def AD_method(self):
"Method defined in A and D."
def ABD_method(self):
"Method defined in A, B and D."
def ACD_method(self):
"Method defined in A, C and D."
def ABCD_method(self):
"Method defined in A, B, C and D."
def BD_method(self):
"Method defined in B and D."
def BCD_method(self):
"Method defined in B, C and D."
def CD_method(self):
"Method defined in C and D."
def D_method(self):
"Method defined in D."
class FunkyProperties(object):
"""From SF bug 472347, by Roeland Rengelink.
Property getters etc may not be vanilla functions or methods,
and this used to make GUI pydoc blow up.
"""
def __init__(self):
self.desc = {'x':0}
class get_desc:
def __init__(self, attr):
self.attr = attr
def __call__(self, inst):
print('Get called', self, inst)
return inst.desc[self.attr]
class set_desc:
def __init__(self, attr):
self.attr = attr
def __call__(self, inst, val):
print('Set called', self, inst, val)
inst.desc[self.attr] = val
class del_desc:
def __init__(self, attr):
self.attr = attr
def __call__(self, inst):
print('Del called', self, inst)
del inst.desc[self.attr]
x = property(get_desc('x'), set_desc('x'), del_desc('x'), 'prop x')
submodule = types.ModuleType(__name__ + '.submodule',
"""A submodule, which should appear in its parent's summary""")
| 6,332 | 217 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_crashers.py | # Tests that the crashers in the Lib/test/crashers directory actually
# do crash the interpreter as expected
#
# If a crasher is fixed, it should be moved elsewhere in the test suite to
# ensure it continues to work correctly.
import unittest
import glob
import os.path
import test.support
from test.support.script_helper import assert_python_failure
CRASHER_DIR = os.path.join(os.path.dirname(__file__), "crashers")
CRASHER_FILES = os.path.join(CRASHER_DIR, "*.py")
infinite_loops = ["infinite_loop_re.py", "nasty_eq_vs_dict.py"]
class CrasherTest(unittest.TestCase):
@unittest.skip("these tests are too fragile")
@test.support.cpython_only
def test_crashers_crash(self):
for fname in glob.glob(CRASHER_FILES):
if os.path.basename(fname) in infinite_loops:
continue
# Some "crashers" only trigger an exception rather than a
# segfault. Consider that an acceptable outcome.
if test.support.verbose:
print("Checking crasher:", fname)
assert_python_failure(fname)
def tearDownModule():
test.support.reap_children()
if __name__ == "__main__":
unittest.main()
| 1,184 | 38 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_dynamic.py | # Test the most dynamic corner cases of Python's runtime semantics.
import builtins
import unittest
from test.support import swap_item, swap_attr
class RebindBuiltinsTests(unittest.TestCase):
"""Test all the ways that we can change/shadow globals/builtins."""
def configure_func(self, func, *args):
"""Perform TestCase-specific configuration on a function before testing.
By default, this does nothing. Example usage: spinning a function so
that a JIT will optimize it. Subclasses should override this as needed.
Args:
func: function to configure.
*args: any arguments that should be passed to func, if calling it.
Returns:
Nothing. Work will be performed on func in-place.
"""
pass
def test_globals_shadow_builtins(self):
# Modify globals() to shadow an entry in builtins.
def foo():
return len([1, 2, 3])
self.configure_func(foo)
self.assertEqual(foo(), 3)
with swap_item(globals(), "len", lambda x: 7):
self.assertEqual(foo(), 7)
def test_modify_builtins(self):
# Modify the builtins module directly.
def foo():
return len([1, 2, 3])
self.configure_func(foo)
self.assertEqual(foo(), 3)
with swap_attr(builtins, "len", lambda x: 7):
self.assertEqual(foo(), 7)
def test_modify_builtins_while_generator_active(self):
# Modify the builtins out from under a live generator.
def foo():
x = range(3)
yield len(x)
yield len(x)
self.configure_func(foo)
g = foo()
self.assertEqual(next(g), 3)
with swap_attr(builtins, "len", lambda x: 7):
self.assertEqual(next(g), 7)
def test_modify_builtins_from_leaf_function(self):
# Verify that modifications made by leaf functions percolate up the
# callstack.
with swap_attr(builtins, "len", len):
def bar():
builtins.len = lambda x: 4
def foo(modifier):
l = []
l.append(len(range(7)))
modifier()
l.append(len(range(7)))
return l
self.configure_func(foo, lambda: None)
self.assertEqual(foo(bar), [7, 4])
def test_cannot_change_globals_or_builtins_with_eval(self):
def foo():
return len([1, 2, 3])
self.configure_func(foo)
# Note that this *doesn't* change the definition of len() seen by foo().
builtins_dict = {"len": lambda x: 7}
globals_dict = {"foo": foo, "__builtins__": builtins_dict,
"len": lambda x: 8}
self.assertEqual(eval("foo()", globals_dict), 3)
self.assertEqual(eval("foo()", {"foo": foo}), 3)
def test_cannot_change_globals_or_builtins_with_exec(self):
def foo():
return len([1, 2, 3])
self.configure_func(foo)
globals_dict = {"foo": foo}
exec("x = foo()", globals_dict)
self.assertEqual(globals_dict["x"], 3)
# Note that this *doesn't* change the definition of len() seen by foo().
builtins_dict = {"len": lambda x: 7}
globals_dict = {"foo": foo, "__builtins__": builtins_dict,
"len": lambda x: 8}
exec("x = foo()", globals_dict)
self.assertEqual(globals_dict["x"], 3)
def test_cannot_replace_builtins_dict_while_active(self):
def foo():
x = range(3)
yield len(x)
yield len(x)
self.configure_func(foo)
g = foo()
self.assertEqual(next(g), 3)
with swap_item(globals(), "__builtins__", {"len": lambda x: 7}):
self.assertEqual(next(g), 3)
def test_cannot_replace_builtins_dict_between_calls(self):
def foo():
return len([1, 2, 3])
self.configure_func(foo)
self.assertEqual(foo(), 3)
with swap_item(globals(), "__builtins__", {"len": lambda x: 7}):
self.assertEqual(foo(), 3)
def test_eval_gives_lambda_custom_globals(self):
globals_dict = {"len": lambda x: 7}
foo = eval("lambda: len([])", globals_dict)
self.configure_func(foo)
self.assertEqual(foo(), 7)
if __name__ == "__main__":
unittest.main()
| 4,394 | 139 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/Sine-1000Hz-300ms.aif | FORM ðøAIFFCOMM 8@ @» FLLR  SSND á ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, ÔÔtt""-O-O7*7*@@GäGäNzNzS¸S¸WWYØYØZZYØYØWWS¸S¸NzNzGäGä@@7*7*-O-O""ttÔÔ ô,ô,èèÝSÝSÒ±Ò±ÈÖÈÖ¿í¿í¸¸±±¬H¬H¨x¨x¦(¦(¥b¥b¦(¦(¨x¨x¬H¬H±±¸¸¿í¿íÈÖÈÖÒ±Ò±ÝSÝSèèô,ô, | 61,696 | 1 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_codeccallbacks.py | import codecs
import html.entities
import sys
import test.support
import unicodedata
import unittest
from encodings import raw_unicode_escape
class PosReturn:
# this can be used for configurable callbacks
def __init__(self):
self.pos = 0
def handle(self, exc):
oldpos = self.pos
realpos = oldpos
if realpos<0:
realpos = len(exc.object) + realpos
# if we don't advance this time, terminate on the next call
# otherwise we'd get an endless loop
if realpos <= exc.start:
self.pos = len(exc.object)
return ("<?>", oldpos)
# A UnicodeEncodeError object with a bad start attribute
class BadStartUnicodeEncodeError(UnicodeEncodeError):
def __init__(self):
UnicodeEncodeError.__init__(self, "ascii", "", 0, 1, "bad")
self.start = []
# A UnicodeEncodeError object with a bad object attribute
class BadObjectUnicodeEncodeError(UnicodeEncodeError):
def __init__(self):
UnicodeEncodeError.__init__(self, "ascii", "", 0, 1, "bad")
self.object = []
# A UnicodeDecodeError object without an end attribute
class NoEndUnicodeDecodeError(UnicodeDecodeError):
def __init__(self):
UnicodeDecodeError.__init__(self, "ascii", bytearray(b""), 0, 1, "bad")
del self.end
# A UnicodeDecodeError object with a bad object attribute
class BadObjectUnicodeDecodeError(UnicodeDecodeError):
def __init__(self):
UnicodeDecodeError.__init__(self, "ascii", bytearray(b""), 0, 1, "bad")
self.object = []
# A UnicodeTranslateError object without a start attribute
class NoStartUnicodeTranslateError(UnicodeTranslateError):
def __init__(self):
UnicodeTranslateError.__init__(self, "", 0, 1, "bad")
del self.start
# A UnicodeTranslateError object without an end attribute
class NoEndUnicodeTranslateError(UnicodeTranslateError):
def __init__(self):
UnicodeTranslateError.__init__(self, "", 0, 1, "bad")
del self.end
# A UnicodeTranslateError object without an object attribute
class NoObjectUnicodeTranslateError(UnicodeTranslateError):
def __init__(self):
UnicodeTranslateError.__init__(self, "", 0, 1, "bad")
del self.object
class CodecCallbackTest(unittest.TestCase):
def test_xmlcharrefreplace(self):
# replace unencodable characters which numeric character entities.
# For ascii, latin-1 and charmaps this is completely implemented
# in C and should be reasonably fast.
s = "\u30b9\u30d1\u30e2 \xe4nd eggs"
self.assertEqual(
s.encode("ascii", "xmlcharrefreplace"),
b"スパモ änd eggs"
)
self.assertEqual(
s.encode("latin-1", "xmlcharrefreplace"),
b"スパモ \xe4nd eggs"
)
def test_xmlcharnamereplace(self):
# This time use a named character entity for unencodable
# characters, if one is available.
def xmlcharnamereplace(exc):
if not isinstance(exc, UnicodeEncodeError):
raise TypeError("don't know how to handle %r" % exc)
l = []
for c in exc.object[exc.start:exc.end]:
try:
l.append("&%s;" % html.entities.codepoint2name[ord(c)])
except KeyError:
l.append("&#%d;" % ord(c))
return ("".join(l), exc.end)
codecs.register_error(
"test.xmlcharnamereplace", xmlcharnamereplace)
sin = "\xab\u211c\xbb = \u2329\u1234\u20ac\u232a"
sout = b"«ℜ» = ⟨ሴ€⟩"
self.assertEqual(sin.encode("ascii", "test.xmlcharnamereplace"), sout)
sout = b"\xabℜ\xbb = ⟨ሴ€⟩"
self.assertEqual(sin.encode("latin-1", "test.xmlcharnamereplace"), sout)
sout = b"\xabℜ\xbb = ⟨ሴ\xa4⟩"
self.assertEqual(sin.encode("iso-8859-15", "test.xmlcharnamereplace"), sout)
def test_uninamereplace(self):
# We're using the names from the unicode database this time,
# and we're doing "syntax highlighting" here, i.e. we include
# the replaced text in ANSI escape sequences. For this it is
# useful that the error handler is not called for every single
# unencodable character, but for a complete sequence of
# unencodable characters, otherwise we would output many
# unnecessary escape sequences.
def uninamereplace(exc):
if not isinstance(exc, UnicodeEncodeError):
raise TypeError("don't know how to handle %r" % exc)
l = []
for c in exc.object[exc.start:exc.end]:
l.append(unicodedata.name(c, "0x%x" % ord(c)))
return ("\033[1m%s\033[0m" % ", ".join(l), exc.end)
codecs.register_error(
"test.uninamereplace", uninamereplace)
sin = "\xac\u1234\u20ac\u8000"
sout = b"\033[1mNOT SIGN, ETHIOPIC SYLLABLE SEE, EURO SIGN, CJK UNIFIED IDEOGRAPH-8000\033[0m"
self.assertEqual(sin.encode("ascii", "test.uninamereplace"), sout)
sout = b"\xac\033[1mETHIOPIC SYLLABLE SEE, EURO SIGN, CJK UNIFIED IDEOGRAPH-8000\033[0m"
self.assertEqual(sin.encode("latin-1", "test.uninamereplace"), sout)
sout = b"\xac\033[1mETHIOPIC SYLLABLE SEE\033[0m\xa4\033[1mCJK UNIFIED IDEOGRAPH-8000\033[0m"
self.assertEqual(sin.encode("iso-8859-15", "test.uninamereplace"), sout)
def test_backslashescape(self):
# Does the same as the "unicode-escape" encoding, but with different
# base encodings.
sin = "a\xac\u1234\u20ac\u8000\U0010ffff"
sout = b"a\\xac\\u1234\\u20ac\\u8000\\U0010ffff"
self.assertEqual(sin.encode("ascii", "backslashreplace"), sout)
sout = b"a\xac\\u1234\\u20ac\\u8000\\U0010ffff"
self.assertEqual(sin.encode("latin-1", "backslashreplace"), sout)
sout = b"a\xac\\u1234\xa4\\u8000\\U0010ffff"
self.assertEqual(sin.encode("iso-8859-15", "backslashreplace"), sout)
def test_nameescape(self):
# Does the same as backslashescape, but prefers ``\N{...}`` escape
# sequences.
sin = "a\xac\u1234\u20ac\u8000\U0010ffff"
sout = (b'a\\N{NOT SIGN}\\N{ETHIOPIC SYLLABLE SEE}\\N{EURO SIGN}'
b'\\N{CJK UNIFIED IDEOGRAPH-8000}\\U0010ffff')
self.assertEqual(sin.encode("ascii", "namereplace"), sout)
sout = (b'a\xac\\N{ETHIOPIC SYLLABLE SEE}\\N{EURO SIGN}'
b'\\N{CJK UNIFIED IDEOGRAPH-8000}\\U0010ffff')
self.assertEqual(sin.encode("latin-1", "namereplace"), sout)
sout = (b'a\xac\\N{ETHIOPIC SYLLABLE SEE}\xa4'
b'\\N{CJK UNIFIED IDEOGRAPH-8000}\\U0010ffff')
self.assertEqual(sin.encode("iso-8859-15", "namereplace"), sout)
def test_decoding_callbacks(self):
# This is a test for a decoding callback handler
# that allows the decoding of the invalid sequence
# "\xc0\x80" and returns "\x00" instead of raising an error.
# All other illegal sequences will be handled strictly.
def relaxedutf8(exc):
if not isinstance(exc, UnicodeDecodeError):
raise TypeError("don't know how to handle %r" % exc)
if exc.object[exc.start:exc.start+2] == b"\xc0\x80":
return ("\x00", exc.start+2) # retry after two bytes
else:
raise exc
codecs.register_error("test.relaxedutf8", relaxedutf8)
# all the "\xc0\x80" will be decoded to "\x00"
sin = b"a\x00b\xc0\x80c\xc3\xbc\xc0\x80\xc0\x80"
sout = "a\x00b\x00c\xfc\x00\x00"
self.assertEqual(sin.decode("utf-8", "test.relaxedutf8"), sout)
# "\xc0\x81" is not valid and a UnicodeDecodeError will be raised
sin = b"\xc0\x80\xc0\x81"
self.assertRaises(UnicodeDecodeError, sin.decode,
"utf-8", "test.relaxedutf8")
def test_charmapencode(self):
# For charmap encodings the replacement string will be
# mapped through the encoding again. This means, that
# to be able to use e.g. the "replace" handler, the
# charmap has to have a mapping for "?".
charmap = dict((ord(c), bytes(2*c.upper(), 'ascii')) for c in "abcdefgh")
sin = "abc"
sout = b"AABBCC"
self.assertEqual(codecs.charmap_encode(sin, "strict", charmap)[0], sout)
sin = "abcA"
self.assertRaises(UnicodeError, codecs.charmap_encode, sin, "strict", charmap)
charmap[ord("?")] = b"XYZ"
sin = "abcDEF"
sout = b"AABBCCXYZXYZXYZ"
self.assertEqual(codecs.charmap_encode(sin, "replace", charmap)[0], sout)
charmap[ord("?")] = "XYZ" # wrong type in mapping
self.assertRaises(TypeError, codecs.charmap_encode, sin, "replace", charmap)
def test_decodeunicodeinternal(self):
with test.support.check_warnings(('unicode_internal codec has been '
'deprecated', DeprecationWarning)):
self.assertRaises(
UnicodeDecodeError,
b"\x00\x00\x00\x00\x00".decode,
"unicode-internal",
)
if len('\0'.encode('unicode-internal')) == 4:
def handler_unicodeinternal(exc):
if not isinstance(exc, UnicodeDecodeError):
raise TypeError("don't know how to handle %r" % exc)
return ("\x01", 1)
self.assertEqual(
b"\x00\x00\x00\x00\x00".decode("unicode-internal", "ignore"),
"\u0000"
)
self.assertEqual(
b"\x00\x00\x00\x00\x00".decode("unicode-internal", "replace"),
"\u0000\ufffd"
)
self.assertEqual(
b"\x00\x00\x00\x00\x00".decode("unicode-internal", "backslashreplace"),
"\u0000\\x00"
)
codecs.register_error("test.hui", handler_unicodeinternal)
self.assertEqual(
b"\x00\x00\x00\x00\x00".decode("unicode-internal", "test.hui"),
"\u0000\u0001\u0000"
)
def test_callbacks(self):
def handler1(exc):
r = range(exc.start, exc.end)
if isinstance(exc, UnicodeEncodeError):
l = ["<%d>" % ord(exc.object[pos]) for pos in r]
elif isinstance(exc, UnicodeDecodeError):
l = ["<%d>" % exc.object[pos] for pos in r]
else:
raise TypeError("don't know how to handle %r" % exc)
return ("[%s]" % "".join(l), exc.end)
codecs.register_error("test.handler1", handler1)
def handler2(exc):
if not isinstance(exc, UnicodeDecodeError):
raise TypeError("don't know how to handle %r" % exc)
l = ["<%d>" % exc.object[pos] for pos in range(exc.start, exc.end)]
return ("[%s]" % "".join(l), exc.end+1) # skip one character
codecs.register_error("test.handler2", handler2)
s = b"\x00\x81\x7f\x80\xff"
self.assertEqual(
s.decode("ascii", "test.handler1"),
"\x00[<129>]\x7f[<128>][<255>]"
)
self.assertEqual(
s.decode("ascii", "test.handler2"),
"\x00[<129>][<128>]"
)
self.assertEqual(
b"\\u3042\\u3xxx".decode("unicode-escape", "test.handler1"),
"\u3042[<92><117><51>]xxx"
)
self.assertEqual(
b"\\u3042\\u3xx".decode("unicode-escape", "test.handler1"),
"\u3042[<92><117><51>]xx"
)
self.assertEqual(
codecs.charmap_decode(b"abc", "test.handler1", {ord("a"): "z"})[0],
"z[<98>][<99>]"
)
self.assertEqual(
"g\xfc\xdfrk".encode("ascii", "test.handler1"),
b"g[<252><223>]rk"
)
self.assertEqual(
"g\xfc\xdf".encode("ascii", "test.handler1"),
b"g[<252><223>]"
)
def test_longstrings(self):
# test long strings to check for memory overflow problems
errors = [ "strict", "ignore", "replace", "xmlcharrefreplace",
"backslashreplace", "namereplace"]
# register the handlers under different names,
# to prevent the codec from recognizing the name
for err in errors:
codecs.register_error("test." + err, codecs.lookup_error(err))
l = 1000
errors += [ "test." + err for err in errors ]
for uni in [ s*l for s in ("x", "\u3042", "a\xe4") ]:
for enc in ("ascii", "latin-1", "iso-8859-1", "iso-8859-15",
"utf-8", "utf-7", "utf-16", "utf-32"):
for err in errors:
try:
uni.encode(enc, err)
except UnicodeError:
pass
def check_exceptionobjectargs(self, exctype, args, msg):
# Test UnicodeError subclasses: construction, attribute assignment and __str__ conversion
# check with one missing argument
self.assertRaises(TypeError, exctype, *args[:-1])
# check with one argument too much
self.assertRaises(TypeError, exctype, *(args + ["too much"]))
# check with one argument of the wrong type
wrongargs = [ "spam", b"eggs", b"spam", 42, 1.0, None ]
for i in range(len(args)):
for wrongarg in wrongargs:
if type(wrongarg) is type(args[i]):
continue
# build argument array
callargs = []
for j in range(len(args)):
if i==j:
callargs.append(wrongarg)
else:
callargs.append(args[i])
self.assertRaises(TypeError, exctype, *callargs)
# check with the correct number and type of arguments
exc = exctype(*args)
self.assertEqual(str(exc), msg)
def test_unicodeencodeerror(self):
self.check_exceptionobjectargs(
UnicodeEncodeError,
["ascii", "g\xfcrk", 1, 2, "ouch"],
"'ascii' codec can't encode character '\\xfc' in position 1: ouch"
)
self.check_exceptionobjectargs(
UnicodeEncodeError,
["ascii", "g\xfcrk", 1, 4, "ouch"],
"'ascii' codec can't encode characters in position 1-3: ouch"
)
self.check_exceptionobjectargs(
UnicodeEncodeError,
["ascii", "\xfcx", 0, 1, "ouch"],
"'ascii' codec can't encode character '\\xfc' in position 0: ouch"
)
self.check_exceptionobjectargs(
UnicodeEncodeError,
["ascii", "\u0100x", 0, 1, "ouch"],
"'ascii' codec can't encode character '\\u0100' in position 0: ouch"
)
self.check_exceptionobjectargs(
UnicodeEncodeError,
["ascii", "\uffffx", 0, 1, "ouch"],
"'ascii' codec can't encode character '\\uffff' in position 0: ouch"
)
self.check_exceptionobjectargs(
UnicodeEncodeError,
["ascii", "\U00010000x", 0, 1, "ouch"],
"'ascii' codec can't encode character '\\U00010000' in position 0: ouch"
)
def test_unicodedecodeerror(self):
self.check_exceptionobjectargs(
UnicodeDecodeError,
["ascii", bytearray(b"g\xfcrk"), 1, 2, "ouch"],
"'ascii' codec can't decode byte 0xfc in position 1: ouch"
)
self.check_exceptionobjectargs(
UnicodeDecodeError,
["ascii", bytearray(b"g\xfcrk"), 1, 3, "ouch"],
"'ascii' codec can't decode bytes in position 1-2: ouch"
)
def test_unicodetranslateerror(self):
self.check_exceptionobjectargs(
UnicodeTranslateError,
["g\xfcrk", 1, 2, "ouch"],
"can't translate character '\\xfc' in position 1: ouch"
)
self.check_exceptionobjectargs(
UnicodeTranslateError,
["g\u0100rk", 1, 2, "ouch"],
"can't translate character '\\u0100' in position 1: ouch"
)
self.check_exceptionobjectargs(
UnicodeTranslateError,
["g\uffffrk", 1, 2, "ouch"],
"can't translate character '\\uffff' in position 1: ouch"
)
self.check_exceptionobjectargs(
UnicodeTranslateError,
["g\U00010000rk", 1, 2, "ouch"],
"can't translate character '\\U00010000' in position 1: ouch"
)
self.check_exceptionobjectargs(
UnicodeTranslateError,
["g\xfcrk", 1, 3, "ouch"],
"can't translate characters in position 1-2: ouch"
)
def test_badandgoodstrictexceptions(self):
# "strict" complains about a non-exception passed in
self.assertRaises(
TypeError,
codecs.strict_errors,
42
)
# "strict" complains about the wrong exception type
self.assertRaises(
Exception,
codecs.strict_errors,
Exception("ouch")
)
# If the correct exception is passed in, "strict" raises it
self.assertRaises(
UnicodeEncodeError,
codecs.strict_errors,
UnicodeEncodeError("ascii", "\u3042", 0, 1, "ouch")
)
self.assertRaises(
UnicodeDecodeError,
codecs.strict_errors,
UnicodeDecodeError("ascii", bytearray(b"\xff"), 0, 1, "ouch")
)
self.assertRaises(
UnicodeTranslateError,
codecs.strict_errors,
UnicodeTranslateError("\u3042", 0, 1, "ouch")
)
def test_badandgoodignoreexceptions(self):
# "ignore" complains about a non-exception passed in
self.assertRaises(
TypeError,
codecs.ignore_errors,
42
)
# "ignore" complains about the wrong exception type
self.assertRaises(
TypeError,
codecs.ignore_errors,
UnicodeError("ouch")
)
# If the correct exception is passed in, "ignore" returns an empty replacement
self.assertEqual(
codecs.ignore_errors(
UnicodeEncodeError("ascii", "a\u3042b", 1, 2, "ouch")),
("", 2)
)
self.assertEqual(
codecs.ignore_errors(
UnicodeDecodeError("ascii", bytearray(b"a\xffb"), 1, 2, "ouch")),
("", 2)
)
self.assertEqual(
codecs.ignore_errors(
UnicodeTranslateError("a\u3042b", 1, 2, "ouch")),
("", 2)
)
def test_badandgoodreplaceexceptions(self):
# "replace" complains about a non-exception passed in
self.assertRaises(
TypeError,
codecs.replace_errors,
42
)
# "replace" complains about the wrong exception type
self.assertRaises(
TypeError,
codecs.replace_errors,
UnicodeError("ouch")
)
self.assertRaises(
TypeError,
codecs.replace_errors,
BadObjectUnicodeEncodeError()
)
self.assertRaises(
TypeError,
codecs.replace_errors,
BadObjectUnicodeDecodeError()
)
# With the correct exception, "replace" returns an "?" or "\ufffd" replacement
self.assertEqual(
codecs.replace_errors(
UnicodeEncodeError("ascii", "a\u3042b", 1, 2, "ouch")),
("?", 2)
)
self.assertEqual(
codecs.replace_errors(
UnicodeDecodeError("ascii", bytearray(b"a\xffb"), 1, 2, "ouch")),
("\ufffd", 2)
)
self.assertEqual(
codecs.replace_errors(
UnicodeTranslateError("a\u3042b", 1, 2, "ouch")),
("\ufffd", 2)
)
def test_badandgoodxmlcharrefreplaceexceptions(self):
# "xmlcharrefreplace" complains about a non-exception passed in
self.assertRaises(
TypeError,
codecs.xmlcharrefreplace_errors,
42
)
# "xmlcharrefreplace" complains about the wrong exception types
self.assertRaises(
TypeError,
codecs.xmlcharrefreplace_errors,
UnicodeError("ouch")
)
# "xmlcharrefreplace" can only be used for encoding
self.assertRaises(
TypeError,
codecs.xmlcharrefreplace_errors,
UnicodeDecodeError("ascii", bytearray(b"\xff"), 0, 1, "ouch")
)
self.assertRaises(
TypeError,
codecs.xmlcharrefreplace_errors,
UnicodeTranslateError("\u3042", 0, 1, "ouch")
)
# Use the correct exception
cs = (0, 1, 9, 10, 99, 100, 999, 1000, 9999, 10000, 99999, 100000,
999999, 1000000)
cs += (0xd800, 0xdfff)
s = "".join(chr(c) for c in cs)
self.assertEqual(
codecs.xmlcharrefreplace_errors(
UnicodeEncodeError("ascii", "a" + s + "b",
1, 1 + len(s), "ouch")
),
("".join("&#%d;" % c for c in cs), 1 + len(s))
)
def test_badandgoodbackslashreplaceexceptions(self):
# "backslashreplace" complains about a non-exception passed in
self.assertRaises(
TypeError,
codecs.backslashreplace_errors,
42
)
# "backslashreplace" complains about the wrong exception types
self.assertRaises(
TypeError,
codecs.backslashreplace_errors,
UnicodeError("ouch")
)
# Use the correct exception
tests = [
("\u3042", "\\u3042"),
("\n", "\\x0a"),
("a", "\\x61"),
("\x00", "\\x00"),
("\xff", "\\xff"),
("\u0100", "\\u0100"),
("\uffff", "\\uffff"),
("\U00010000", "\\U00010000"),
("\U0010ffff", "\\U0010ffff"),
# Lone surrogates
("\ud800", "\\ud800"),
("\udfff", "\\udfff"),
("\ud800\udfff", "\\ud800\\udfff"),
]
for s, r in tests:
with self.subTest(str=s):
self.assertEqual(
codecs.backslashreplace_errors(
UnicodeEncodeError("ascii", "a" + s + "b",
1, 1 + len(s), "ouch")),
(r, 1 + len(s))
)
self.assertEqual(
codecs.backslashreplace_errors(
UnicodeTranslateError("a" + s + "b",
1, 1 + len(s), "ouch")),
(r, 1 + len(s))
)
tests = [
(b"a", "\\x61"),
(b"\n", "\\x0a"),
(b"\x00", "\\x00"),
(b"\xff", "\\xff"),
]
for b, r in tests:
with self.subTest(bytes=b):
self.assertEqual(
codecs.backslashreplace_errors(
UnicodeDecodeError("ascii", bytearray(b"a" + b + b"b"),
1, 2, "ouch")),
(r, 2)
)
def test_badandgoodnamereplaceexceptions(self):
# "namereplace" complains about a non-exception passed in
self.assertRaises(
TypeError,
codecs.namereplace_errors,
42
)
# "namereplace" complains about the wrong exception types
self.assertRaises(
TypeError,
codecs.namereplace_errors,
UnicodeError("ouch")
)
# "namereplace" can only be used for encoding
self.assertRaises(
TypeError,
codecs.namereplace_errors,
UnicodeDecodeError("ascii", bytearray(b"\xff"), 0, 1, "ouch")
)
self.assertRaises(
TypeError,
codecs.namereplace_errors,
UnicodeTranslateError("\u3042", 0, 1, "ouch")
)
# Use the correct exception
tests = [
("\u3042", "\\N{HIRAGANA LETTER A}"),
("\x00", "\\x00"),
("\ufbf9", "\\N{ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH "
"HAMZA ABOVE WITH ALEF MAKSURA ISOLATED FORM}"),
("\U000e007f", "\\N{CANCEL TAG}"),
("\U0010ffff", "\\U0010ffff"),
# Lone surrogates
("\ud800", "\\ud800"),
("\udfff", "\\udfff"),
("\ud800\udfff", "\\ud800\\udfff"),
]
for s, r in tests:
with self.subTest(str=s):
self.assertEqual(
codecs.namereplace_errors(
UnicodeEncodeError("ascii", "a" + s + "b",
1, 1 + len(s), "ouch")),
(r, 1 + len(s))
)
def test_badandgoodsurrogateescapeexceptions(self):
surrogateescape_errors = codecs.lookup_error('surrogateescape')
# "surrogateescape" complains about a non-exception passed in
self.assertRaises(
TypeError,
surrogateescape_errors,
42
)
# "surrogateescape" complains about the wrong exception types
self.assertRaises(
TypeError,
surrogateescape_errors,
UnicodeError("ouch")
)
# "surrogateescape" can not be used for translating
self.assertRaises(
TypeError,
surrogateescape_errors,
UnicodeTranslateError("\udc80", 0, 1, "ouch")
)
# Use the correct exception
for s in ("a", "\udc7f", "\udd00"):
with self.subTest(str=s):
self.assertRaises(
UnicodeEncodeError,
surrogateescape_errors,
UnicodeEncodeError("ascii", s, 0, 1, "ouch")
)
self.assertEqual(
surrogateescape_errors(
UnicodeEncodeError("ascii", "a\udc80b", 1, 2, "ouch")),
(b"\x80", 2)
)
self.assertRaises(
UnicodeDecodeError,
surrogateescape_errors,
UnicodeDecodeError("ascii", bytearray(b"a"), 0, 1, "ouch")
)
self.assertEqual(
surrogateescape_errors(
UnicodeDecodeError("ascii", bytearray(b"a\x80b"), 1, 2, "ouch")),
("\udc80", 2)
)
def test_badandgoodsurrogatepassexceptions(self):
surrogatepass_errors = codecs.lookup_error('surrogatepass')
# "surrogatepass" complains about a non-exception passed in
self.assertRaises(
TypeError,
surrogatepass_errors,
42
)
# "surrogatepass" complains about the wrong exception types
self.assertRaises(
TypeError,
surrogatepass_errors,
UnicodeError("ouch")
)
# "surrogatepass" can not be used for translating
self.assertRaises(
TypeError,
surrogatepass_errors,
UnicodeTranslateError("\ud800", 0, 1, "ouch")
)
# Use the correct exception
for enc in ("utf-8", "utf-16le", "utf-16be", "utf-32le", "utf-32be"):
with self.subTest(encoding=enc):
self.assertRaises(
UnicodeEncodeError,
surrogatepass_errors,
UnicodeEncodeError(enc, "a", 0, 1, "ouch")
)
self.assertRaises(
UnicodeDecodeError,
surrogatepass_errors,
UnicodeDecodeError(enc, "a".encode(enc), 0, 1, "ouch")
)
for s in ("\ud800", "\udfff", "\ud800\udfff"):
with self.subTest(str=s):
self.assertRaises(
UnicodeEncodeError,
surrogatepass_errors,
UnicodeEncodeError("ascii", s, 0, len(s), "ouch")
)
tests = [
("utf-8", "\ud800", b'\xed\xa0\x80', 3),
("utf-16le", "\ud800", b'\x00\xd8', 2),
("utf-16be", "\ud800", b'\xd8\x00', 2),
("utf-32le", "\ud800", b'\x00\xd8\x00\x00', 4),
("utf-32be", "\ud800", b'\x00\x00\xd8\x00', 4),
("utf-8", "\udfff", b'\xed\xbf\xbf', 3),
("utf-16le", "\udfff", b'\xff\xdf', 2),
("utf-16be", "\udfff", b'\xdf\xff', 2),
("utf-32le", "\udfff", b'\xff\xdf\x00\x00', 4),
("utf-32be", "\udfff", b'\x00\x00\xdf\xff', 4),
("utf-8", "\ud800\udfff", b'\xed\xa0\x80\xed\xbf\xbf', 3),
("utf-16le", "\ud800\udfff", b'\x00\xd8\xff\xdf', 2),
("utf-16be", "\ud800\udfff", b'\xd8\x00\xdf\xff', 2),
("utf-32le", "\ud800\udfff", b'\x00\xd8\x00\x00\xff\xdf\x00\x00', 4),
("utf-32be", "\ud800\udfff", b'\x00\x00\xd8\x00\x00\x00\xdf\xff', 4),
]
for enc, s, b, n in tests:
with self.subTest(encoding=enc, str=s, bytes=b):
self.assertEqual(
surrogatepass_errors(
UnicodeEncodeError(enc, "a" + s + "b",
1, 1 + len(s), "ouch")),
(b, 1 + len(s))
)
self.assertEqual(
surrogatepass_errors(
UnicodeDecodeError(enc, bytearray(b"a" + b[:n] + b"b"),
1, 1 + n, "ouch")),
(s[:1], 1 + n)
)
def test_badhandlerresults(self):
results = ( 42, "foo", (1,2,3), ("foo", 1, 3), ("foo", None), ("foo",), ("foo", 1, 3), ("foo", None), ("foo",) )
encs = ("ascii", "latin-1", "iso-8859-1", "iso-8859-15")
for res in results:
codecs.register_error("test.badhandler", lambda x: res)
for enc in encs:
self.assertRaises(
TypeError,
"\u3042".encode,
enc,
"test.badhandler"
)
for (enc, bytes) in (
("ascii", b"\xff"),
("utf-8", b"\xff"),
("utf-7", b"+x-"),
("unicode-internal", b"\x00"),
):
with test.support.check_warnings():
# unicode-internal has been deprecated
self.assertRaises(
TypeError,
bytes.decode,
enc,
"test.badhandler"
)
def test_lookup(self):
self.assertEqual(codecs.strict_errors, codecs.lookup_error("strict"))
self.assertEqual(codecs.ignore_errors, codecs.lookup_error("ignore"))
self.assertEqual(codecs.strict_errors, codecs.lookup_error("strict"))
self.assertEqual(
codecs.xmlcharrefreplace_errors,
codecs.lookup_error("xmlcharrefreplace")
)
self.assertEqual(
codecs.backslashreplace_errors,
codecs.lookup_error("backslashreplace")
)
self.assertEqual(
codecs.namereplace_errors,
codecs.lookup_error("namereplace")
)
def test_unencodablereplacement(self):
def unencrepl(exc):
if isinstance(exc, UnicodeEncodeError):
return ("\u4242", exc.end)
else:
raise TypeError("don't know how to handle %r" % exc)
codecs.register_error("test.unencreplhandler", unencrepl)
for enc in ("ascii", "iso-8859-1", "iso-8859-15"):
self.assertRaises(
UnicodeEncodeError,
"\u4242".encode,
enc,
"test.unencreplhandler"
)
def test_badregistercall(self):
# enhance coverage of:
# Modules/_codecsmodule.c::register_error()
# Python/codecs.c::PyCodec_RegisterError()
self.assertRaises(TypeError, codecs.register_error, 42)
self.assertRaises(TypeError, codecs.register_error, "test.dummy", 42)
def test_badlookupcall(self):
# enhance coverage of:
# Modules/_codecsmodule.c::lookup_error()
self.assertRaises(TypeError, codecs.lookup_error)
def test_unknownhandler(self):
# enhance coverage of:
# Modules/_codecsmodule.c::lookup_error()
self.assertRaises(LookupError, codecs.lookup_error, "test.unknown")
def test_xmlcharrefvalues(self):
# enhance coverage of:
# Python/codecs.c::PyCodec_XMLCharRefReplaceErrors()
# and inline implementations
v = (1, 5, 10, 50, 100, 500, 1000, 5000, 10000, 50000, 100000,
500000, 1000000)
s = "".join([chr(x) for x in v])
codecs.register_error("test.xmlcharrefreplace", codecs.xmlcharrefreplace_errors)
for enc in ("ascii", "iso-8859-15"):
for err in ("xmlcharrefreplace", "test.xmlcharrefreplace"):
s.encode(enc, err)
def test_decodehelper(self):
# enhance coverage of:
# Objects/unicodeobject.c::unicode_decode_call_errorhandler()
# and callers
self.assertRaises(LookupError, b"\xff".decode, "ascii", "test.unknown")
def baddecodereturn1(exc):
return 42
codecs.register_error("test.baddecodereturn1", baddecodereturn1)
self.assertRaises(TypeError, b"\xff".decode, "ascii", "test.baddecodereturn1")
self.assertRaises(TypeError, b"\\".decode, "unicode-escape", "test.baddecodereturn1")
self.assertRaises(TypeError, b"\\x0".decode, "unicode-escape", "test.baddecodereturn1")
self.assertRaises(TypeError, b"\\x0y".decode, "unicode-escape", "test.baddecodereturn1")
self.assertRaises(TypeError, b"\\Uffffeeee".decode, "unicode-escape", "test.baddecodereturn1")
self.assertRaises(TypeError, b"\\uyyyy".decode, "raw-unicode-escape", "test.baddecodereturn1")
def baddecodereturn2(exc):
return ("?", None)
codecs.register_error("test.baddecodereturn2", baddecodereturn2)
self.assertRaises(TypeError, b"\xff".decode, "ascii", "test.baddecodereturn2")
handler = PosReturn()
codecs.register_error("test.posreturn", handler.handle)
# Valid negative position
handler.pos = -1
self.assertEqual(b"\xff0".decode("ascii", "test.posreturn"), "<?>0")
# Valid negative position
handler.pos = -2
self.assertEqual(b"\xff0".decode("ascii", "test.posreturn"), "<?><?>")
# Negative position out of bounds
handler.pos = -3
self.assertRaises(IndexError, b"\xff0".decode, "ascii", "test.posreturn")
# Valid positive position
handler.pos = 1
self.assertEqual(b"\xff0".decode("ascii", "test.posreturn"), "<?>0")
# Largest valid positive position (one beyond end of input)
handler.pos = 2
self.assertEqual(b"\xff0".decode("ascii", "test.posreturn"), "<?>")
# Invalid positive position
handler.pos = 3
self.assertRaises(IndexError, b"\xff0".decode, "ascii", "test.posreturn")
# Restart at the "0"
handler.pos = 6
self.assertEqual(b"\\uyyyy0".decode("raw-unicode-escape", "test.posreturn"), "<?>0")
class D(dict):
def __getitem__(self, key):
raise ValueError
self.assertRaises(UnicodeError, codecs.charmap_decode, b"\xff", "strict", {0xff: None})
self.assertRaises(ValueError, codecs.charmap_decode, b"\xff", "strict", D())
self.assertRaises(TypeError, codecs.charmap_decode, b"\xff", "strict", {0xff: sys.maxunicode+1})
def test_encodehelper(self):
# enhance coverage of:
# Objects/unicodeobject.c::unicode_encode_call_errorhandler()
# and callers
self.assertRaises(LookupError, "\xff".encode, "ascii", "test.unknown")
def badencodereturn1(exc):
return 42
codecs.register_error("test.badencodereturn1", badencodereturn1)
self.assertRaises(TypeError, "\xff".encode, "ascii", "test.badencodereturn1")
def badencodereturn2(exc):
return ("?", None)
codecs.register_error("test.badencodereturn2", badencodereturn2)
self.assertRaises(TypeError, "\xff".encode, "ascii", "test.badencodereturn2")
handler = PosReturn()
codecs.register_error("test.posreturn", handler.handle)
# Valid negative position
handler.pos = -1
self.assertEqual("\xff0".encode("ascii", "test.posreturn"), b"<?>0")
# Valid negative position
handler.pos = -2
self.assertEqual("\xff0".encode("ascii", "test.posreturn"), b"<?><?>")
# Negative position out of bounds
handler.pos = -3
self.assertRaises(IndexError, "\xff0".encode, "ascii", "test.posreturn")
# Valid positive position
handler.pos = 1
self.assertEqual("\xff0".encode("ascii", "test.posreturn"), b"<?>0")
# Largest valid positive position (one beyond end of input
handler.pos = 2
self.assertEqual("\xff0".encode("ascii", "test.posreturn"), b"<?>")
# Invalid positive position
handler.pos = 3
self.assertRaises(IndexError, "\xff0".encode, "ascii", "test.posreturn")
handler.pos = 0
class D(dict):
def __getitem__(self, key):
raise ValueError
for err in ("strict", "replace", "xmlcharrefreplace",
"backslashreplace", "namereplace", "test.posreturn"):
self.assertRaises(UnicodeError, codecs.charmap_encode, "\xff", err, {0xff: None})
self.assertRaises(ValueError, codecs.charmap_encode, "\xff", err, D())
self.assertRaises(TypeError, codecs.charmap_encode, "\xff", err, {0xff: 300})
def test_translatehelper(self):
# enhance coverage of:
# Objects/unicodeobject.c::unicode_encode_call_errorhandler()
# and callers
# (Unfortunately the errors argument is not directly accessible
# from Python, so we can't test that much)
class D(dict):
def __getitem__(self, key):
raise ValueError
#self.assertRaises(ValueError, "\xff".translate, D())
self.assertRaises(ValueError, "\xff".translate, {0xff: sys.maxunicode+1})
self.assertRaises(TypeError, "\xff".translate, {0xff: ()})
def test_bug828737(self):
charmap = {
ord("&"): "&",
ord("<"): "<",
ord(">"): ">",
ord('"'): """,
}
for n in (1, 10, 100, 1000):
text = 'abc<def>ghi'*n
text.translate(charmap)
def test_mutatingdecodehandler(self):
baddata = [
("ascii", b"\xff"),
("utf-7", b"++"),
("utf-8", b"\xff"),
("utf-16", b"\xff"),
("utf-32", b"\xff"),
("unicode-escape", b"\\u123g"),
("raw-unicode-escape", b"\\u123g"),
("unicode-internal", b"\xff"),
]
def replacing(exc):
if isinstance(exc, UnicodeDecodeError):
exc.object = 42
return ("\u4242", 0)
else:
raise TypeError("don't know how to handle %r" % exc)
codecs.register_error("test.replacing", replacing)
with test.support.check_warnings():
# unicode-internal has been deprecated
for (encoding, data) in baddata:
with self.assertRaises(TypeError):
data.decode(encoding, "test.replacing")
def mutating(exc):
if isinstance(exc, UnicodeDecodeError):
exc.object = b""
return ("\u4242", 0)
else:
raise TypeError("don't know how to handle %r" % exc)
codecs.register_error("test.mutating", mutating)
# If the decoder doesn't pick up the modified input the following
# will lead to an endless loop
with test.support.check_warnings():
# unicode-internal has been deprecated
for (encoding, data) in baddata:
self.assertEqual(data.decode(encoding, "test.mutating"), "\u4242")
# issue32583
def test_crashing_decode_handler(self):
# better generating one more character to fill the extra space slot
# so in debug build it can steadily fail
def forward_shorter_than_end(exc):
if isinstance(exc, UnicodeDecodeError):
# size one character, 0 < forward < exc.end
return ('\ufffd', exc.start+1)
else:
raise TypeError("don't know how to handle %r" % exc)
codecs.register_error(
"test.forward_shorter_than_end", forward_shorter_than_end)
self.assertEqual(
b'\xd8\xd8\xd8\xd8\xd8\x00\x00\x00'.decode(
'utf-16-le', 'test.forward_shorter_than_end'),
'\ufffd\ufffd\ufffd\ufffd\xd8\x00'
)
self.assertEqual(
b'\xd8\xd8\xd8\xd8\x00\xd8\x00\x00'.decode(
'utf-16-be', 'test.forward_shorter_than_end'),
'\ufffd\ufffd\ufffd\ufffd\xd8\x00'
)
self.assertEqual(
b'\x11\x11\x11\x11\x11\x00\x00\x00\x00\x00\x00'.decode(
'utf-32-le', 'test.forward_shorter_than_end'),
'\ufffd\ufffd\ufffd\u1111\x00'
)
self.assertEqual(
b'\x11\x11\x11\x00\x00\x11\x11\x00\x00\x00\x00'.decode(
'utf-32-be', 'test.forward_shorter_than_end'),
'\ufffd\ufffd\ufffd\u1111\x00'
)
def replace_with_long(exc):
if isinstance(exc, UnicodeDecodeError):
exc.object = b"\x00" * 8
return ('\ufffd', exc.start)
else:
raise TypeError("don't know how to handle %r" % exc)
codecs.register_error("test.replace_with_long", replace_with_long)
self.assertEqual(
b'\x00'.decode('utf-16', 'test.replace_with_long'),
'\ufffd\x00\x00\x00\x00'
)
self.assertEqual(
b'\x00'.decode('utf-32', 'test.replace_with_long'),
'\ufffd\x00\x00'
)
def test_fake_error_class(self):
handlers = [
codecs.strict_errors,
codecs.ignore_errors,
codecs.replace_errors,
codecs.backslashreplace_errors,
codecs.namereplace_errors,
codecs.xmlcharrefreplace_errors,
codecs.lookup_error('surrogateescape'),
codecs.lookup_error('surrogatepass'),
]
for cls in UnicodeEncodeError, UnicodeDecodeError, UnicodeTranslateError:
class FakeUnicodeError(str):
__class__ = cls
for handler in handlers:
with self.subTest(handler=handler, error_class=cls):
self.assertRaises(TypeError, handler, FakeUnicodeError())
class FakeUnicodeError(Exception):
__class__ = cls
for handler in handlers:
with self.subTest(handler=handler, error_class=cls):
with self.assertRaises((TypeError, FakeUnicodeError)):
handler(FakeUnicodeError())
if __name__ == "__main__":
unittest.main()
| 43,862 | 1,125 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_codeop.py | """
Test cases for codeop.py
Nick Mathewson
"""
import unittest
from test.support import is_jython
from codeop import compile_command, PyCF_DONT_IMPLY_DEDENT
import io
if is_jython:
import sys
def unify_callables(d):
for n,v in d.items():
if hasattr(v, '__call__'):
d[n] = True
return d
class CodeopTests(unittest.TestCase):
def assertValid(self, str, symbol='single'):
'''succeed iff str is a valid piece of code'''
if is_jython:
code = compile_command(str, "<input>", symbol)
self.assertTrue(code)
if symbol == "single":
d,r = {},{}
saved_stdout = sys.stdout
sys.stdout = io.StringIO()
try:
exec(code, d)
exec(compile(str,"<input>","single"), r)
finally:
sys.stdout = saved_stdout
elif symbol == 'eval':
ctx = {'a': 2}
d = { 'value': eval(code,ctx) }
r = { 'value': eval(str,ctx) }
self.assertEqual(unify_callables(r),unify_callables(d))
else:
expected = compile(str, "<input>", symbol, PyCF_DONT_IMPLY_DEDENT)
self.assertEqual(compile_command(str, "<input>", symbol), expected)
def assertIncomplete(self, str, symbol='single'):
'''succeed iff str is the start of a valid piece of code'''
self.assertEqual(compile_command(str, symbol=symbol), None)
def assertInvalid(self, str, symbol='single', is_syntax=1):
'''succeed iff str is the start of an invalid piece of code'''
try:
compile_command(str,symbol=symbol)
self.fail("No exception raised for invalid code")
except SyntaxError:
self.assertTrue(is_syntax)
except OverflowError:
self.assertTrue(not is_syntax)
def test_valid(self):
av = self.assertValid
# special case
if not is_jython:
self.assertEqual(compile_command(""),
compile("pass", "<input>", 'single',
PyCF_DONT_IMPLY_DEDENT))
self.assertEqual(compile_command("\n"),
compile("pass", "<input>", 'single',
PyCF_DONT_IMPLY_DEDENT))
else:
av("")
av("\n")
av("a = 1")
av("\na = 1")
av("a = 1\n")
av("a = 1\n\n")
av("\n\na = 1\n\n")
av("def x():\n pass\n")
av("if 1:\n pass\n")
av("\n\nif 1: pass\n")
av("\n\nif 1: pass\n\n")
av("def x():\n\n pass\n")
av("def x():\n pass\n \n")
av("def x():\n pass\n \n")
av("pass\n")
av("3**3\n")
av("if 9==3:\n pass\nelse:\n pass\n")
av("if 1:\n pass\n if 1:\n pass\n else:\n pass\n")
av("#a\n#b\na = 3\n")
av("#a\n\n \na=3\n")
av("a=3\n\n")
av("a = 9+ \\\n3")
av("3**3","eval")
av("(lambda z: \n z**3)","eval")
av("9+ \\\n3","eval")
av("9+ \\\n3\n","eval")
av("\n\na**3","eval")
av("\n \na**3","eval")
av("#a\n#b\na**3","eval")
av("\n\na = 1\n\n")
av("\n\nif 1: a=1\n\n")
av("if 1:\n pass\n if 1:\n pass\n else:\n pass\n")
av("#a\n\n \na=3\n\n")
av("\n\na**3","eval")
av("\n \na**3","eval")
av("#a\n#b\na**3","eval")
av("def f():\n try: pass\n finally: [x for x in (1,2)]\n")
av("def f():\n pass\n#foo\n")
av("@a.b.c\ndef f():\n pass\n")
def test_incomplete(self):
ai = self.assertIncomplete
ai("(a **")
ai("(a,b,")
ai("(a,b,(")
ai("(a,b,(")
ai("a = (")
ai("a = {")
ai("b + {")
ai("if 9==3:\n pass\nelse:")
ai("if 9==3:\n pass\nelse:\n")
ai("if 9==3:\n pass\nelse:\n pass")
ai("if 1:")
ai("if 1:\n")
ai("if 1:\n pass\n if 1:\n pass\n else:")
ai("if 1:\n pass\n if 1:\n pass\n else:\n")
ai("if 1:\n pass\n if 1:\n pass\n else:\n pass")
ai("def x():")
ai("def x():\n")
ai("def x():\n\n")
ai("def x():\n pass")
ai("def x():\n pass\n ")
ai("def x():\n pass\n ")
ai("\n\ndef x():\n pass")
ai("a = 9+ \\")
ai("a = 'a\\")
ai("a = '''xy")
ai("","eval")
ai("\n","eval")
ai("(","eval")
ai("(\n\n\n","eval")
ai("(9+","eval")
ai("9+ \\","eval")
ai("lambda z: \\","eval")
ai("if True:\n if True:\n if True: \n")
ai("@a(")
ai("@a(b")
ai("@a(b,")
ai("@a(b,c")
ai("@a(b,c,")
ai("from a import (")
ai("from a import (b")
ai("from a import (b,")
ai("from a import (b,c")
ai("from a import (b,c,")
ai("[");
ai("[a");
ai("[a,");
ai("[a,b");
ai("[a,b,");
ai("{");
ai("{a");
ai("{a:");
ai("{a:b");
ai("{a:b,");
ai("{a:b,c");
ai("{a:b,c:");
ai("{a:b,c:d");
ai("{a:b,c:d,");
ai("a(")
ai("a(b")
ai("a(b,")
ai("a(b,c")
ai("a(b,c,")
ai("a[")
ai("a[b")
ai("a[b,")
ai("a[b:")
ai("a[b:c")
ai("a[b:c:")
ai("a[b:c:d")
ai("def a(")
ai("def a(b")
ai("def a(b,")
ai("def a(b,c")
ai("def a(b,c,")
ai("(")
ai("(a")
ai("(a,")
ai("(a,b")
ai("(a,b,")
ai("if a:\n pass\nelif b:")
ai("if a:\n pass\nelif b:\n pass\nelse:")
ai("while a:")
ai("while a:\n pass\nelse:")
ai("for a in b:")
ai("for a in b:\n pass\nelse:")
ai("try:")
ai("try:\n pass\nexcept:")
ai("try:\n pass\nfinally:")
ai("try:\n pass\nexcept:\n pass\nfinally:")
ai("with a:")
ai("with a as b:")
ai("class a:")
ai("class a(")
ai("class a(b")
ai("class a(b,")
ai("class a():")
ai("[x for")
ai("[x for x in")
ai("[x for x in (")
ai("(x for")
ai("(x for x in")
ai("(x for x in (")
def test_invalid(self):
ai = self.assertInvalid
ai("a b")
ai("a @")
ai("a b @")
ai("a ** @")
ai("a = ")
ai("a = 9 +")
ai("def x():\n\npass\n")
ai("\n\n if 1: pass\n\npass")
ai("a = 9+ \\\n")
ai("a = 'a\\ ")
ai("a = 'a\\\n")
ai("a = 1","eval")
ai("a = (","eval")
ai("]","eval")
ai("())","eval")
ai("[}","eval")
ai("9+","eval")
ai("lambda z:","eval")
ai("a b","eval")
ai("return 2.3")
ai("if (a == 1 and b = 2): pass")
ai("del 1")
ai("del (1,)")
ai("del [1]")
ai("del '1'")
ai("[i for i in range(10)] = (1, 2, 3)")
def test_filename(self):
self.assertEqual(compile_command("a = 1\n", "abc").co_filename,
compile("a = 1\n", "abc", 'single').co_filename)
self.assertNotEqual(compile_command("a = 1\n", "abc").co_filename,
compile("a = 1\n", "def", 'single').co_filename)
if __name__ == "__main__":
unittest.main()
| 7,550 | 300 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/keycert2.pem | -----BEGIN PRIVATE KEY-----
MIIG/QIBADANBgkqhkiG9w0BAQEFAASCBucwggbjAgEAAoIBgQDKjrjWZlfOs1Ch
qt1RoyLfqyXbHVXIAW0fTzAxfJnxvFOiWqAAKgC2qVQM8Y080kRUuRaXP/w9ywXT
+MzX6tByy5VbTYJYyTjHOH46EWLNdcqEJs4+FCVqOIYrQPQ6pGAhCXmgBy4Vb42J
ABLwb+Kt+y2Dk15tggVcAHP2Khri+lRXWvda+kZAe2F1IojmuWyCTy3FEYHic5qN
BsXcf6u1oyFV8MybOuz1zGj3vd2C+dEKO4Ohw9rRwnvHSatjM+CfwiXf8kTXzDBF
Z/8W3+6yA49pHxRbG7FE3K1TAPhkrp+BVTIUOcdI74wEA6UEkWFF5sQcmmAth59M
EQrl2CXorftEPhsKZE59dUP1+nYAPvR/mTySNCSw7/rvdf+csRSZ5ollMu/lxsht
ulJYJI03+IiDTn47FI5D+IF25REK7d4LzGIo6T73ktsT+qpSXHuTWC+IABm8AMF9
7ljxHSwMRU/z+O5uiONRItDAgKH/OItFG54PtY2vAhaO0YiZrZcCAwEAAQKCAYB2
hTo8IVghlySH5B1p5kXCkDcvVaPaypLaLhCp9Blzq9lX9yUF043lU4Ddrf0RaIsY
88/3IjZqxb+cP0lE0Z20fdDfwqORZfQ2BaU+PuwMAm9EEhy9kDYwR/ChoHkHUyT4
T7392BWr70Dmt8ddLmp5mK4R/gnTk6+lHJK9p/dhdk4haxWvAyBWHJty2Yk3T6nh
OYkzdUIFidUVza+6jG2hc1lPGv3tmnYKgNeulkblm10oWphz79C6ycx5WG7TNgef
CQ3z7//Nn89YTiaUBjLvoLvxRTMwO96r7E/FaslSl/fWnF3HP3lut26Z/mNfhiwj
qn7AhUwpSNPV0qcxFWXr/rXUjdk745wv8wOODK8atjjE/vt/MRBK0rAOIPSm3ecx
37PKNtR4i+sNeDEcY1IyTHE6wFvJSy5y8AFpn5y8tbqYfhlEVWZ4pcnlrKxhWm7j
oBkB/4GBjKQgbQ7ttym9eNG1wIbZ8v9N06+yeLs/NCc4bFZEgcWjFqBH1bLtAYEC
gcEA8tt8iYNqbsDH2ognjEmbbBxrDBmyYcEKRpg1i1SUopcZl8i93IHpG7EgJIaj
l7aWSbASAxjnK02t0VZ3nNS60acibzRwY/+e8OrSqlQdMXlAB2ggBA86drDJpfBl
WGJG8TJVY9bc1TU2uuwtZR1LAMSsRHVp+3IvKLpHrne5exPd3x6KGYcuaM+Uk/rE
u6tLsFNwaCdh+iBFFDT2bnYIw7jAsokJUkwxMVxSC0/21s2blhO/q5LsN1gFC1kN
TbpXAoHBANWE7TmG2szPvujPwrK18v6iJlHCA2n50AgAQXrsetj2JcF3HYHYdHnq
z36MQ6FpBKOiQumozWvb32WTjEwdG2kix7GEfam4DAUBdqYuCHzPcR12K5Tc8hsX
NG7JXUAeS8ZJEiOdu95X59JHyBxUQtNfte5rcbaV17SVw6K6bsWVJnj60YjtJrpa
xHvv1ZRnT2WEzJGpA+ii1h3I52N7ipGBiw172qcW+bKJukMi8eHxx5CC9e5tBpnu
C+Ou/eYewQKBwHxNa0jXQrq9YY2w8s0TP8HuKbxfyrXOIHxRm9ZczFcMD8VosgUT
WUUbO+B2KXWVtwawYAfFz0ySzcy//SkAmT6F1VIl/QCx7aBSENGti+Ous98WpIxv
XvUxN4T/rl+2raj2ok4fw5g9TG4QRIvkmmciQyonDr/sicbG0bmy/fTJDl8NOpIm
ZtKurNWxHNERtAPkMTyeK7/ilHjrQtb3AzVqcvbuvR6qcONa5YN0wlrfkisWoJwo
707EdpCAXBbUsQKBwQCnpzcpu2Sj+t9ZKIElF87T93gFLETH+ppJHgJMRdDz+NqO
fTwTD2XtsNz57aLQ44f8AFVv6NZbQYq41FEOFrDGLcQE9BZDpDrz10FVnMGXVr7n
tjjkK1SCxwapkr0AsoknCYsPojO4kud46loLPHI4TGeq7HyeNCvqJMo3RRHjXIiX
58GNNUD6hHjRI/FdFH14Jf0GxmJGUU20l2Jwb7nPJJuNm9mE53pqoNA7FP4+Pj1H
kD0Q2FSdmxeE0IuWHEECgcBgw6ogJ/FRRGLcym+aApqP9BChK+W8FDfDc9Mi4p/J
g+XmetWNFGCGTlOefGqUDIkwSG+QVOEN3hxziXbsjnvfpGApqoaulAI5oRvrwIcj
QIvD2mt0PB52k5ZL9QL2K9sgBa43BJDyCKooMAlTy2XMM+NyXVxQKmzf3r3jQ5sl
Rptk7ro38a9G8Rs99RFDyOmP1haOM0KXZvPksN4nsXuTlE01cnwnI29XKAlEZaoA
pQPLXD8W/KK4mwDbmokYXmo=
-----END PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIIEYjCCAsqgAwIBAgIJAJm2YulYpr+6MA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNV
BAYTAlhZMRcwFQYDVQQHDA5DYXN0bGUgQW50aHJheDEjMCEGA1UECgwaUHl0aG9u
IFNvZnR3YXJlIEZvdW5kYXRpb24xFTATBgNVBAMMDGZha2Vob3N0bmFtZTAeFw0x
ODA4MjkxNDIzMTZaFw0yODA4MjYxNDIzMTZaMGIxCzAJBgNVBAYTAlhZMRcwFQYD
VQQHDA5DYXN0bGUgQW50aHJheDEjMCEGA1UECgwaUHl0aG9uIFNvZnR3YXJlIEZv
dW5kYXRpb24xFTATBgNVBAMMDGZha2Vob3N0bmFtZTCCAaIwDQYJKoZIhvcNAQEB
BQADggGPADCCAYoCggGBAMqOuNZmV86zUKGq3VGjIt+rJdsdVcgBbR9PMDF8mfG8
U6JaoAAqALapVAzxjTzSRFS5Fpc//D3LBdP4zNfq0HLLlVtNgljJOMc4fjoRYs11
yoQmzj4UJWo4hitA9DqkYCEJeaAHLhVvjYkAEvBv4q37LYOTXm2CBVwAc/YqGuL6
VFda91r6RkB7YXUiiOa5bIJPLcURgeJzmo0Gxdx/q7WjIVXwzJs67PXMaPe93YL5
0Qo7g6HD2tHCe8dJq2Mz4J/CJd/yRNfMMEVn/xbf7rIDj2kfFFsbsUTcrVMA+GSu
n4FVMhQ5x0jvjAQDpQSRYUXmxByaYC2Hn0wRCuXYJeit+0Q+GwpkTn11Q/X6dgA+
9H+ZPJI0JLDv+u91/5yxFJnmiWUy7+XGyG26UlgkjTf4iINOfjsUjkP4gXblEQrt
3gvMYijpPveS2xP6qlJce5NYL4gAGbwAwX3uWPEdLAxFT/P47m6I41Ei0MCAof84
i0Ubng+1ja8CFo7RiJmtlwIDAQABoxswGTAXBgNVHREEEDAOggxmYWtlaG9zdG5h
bWUwDQYJKoZIhvcNAQELBQADggGBAMIVLp6e6saH2NQSg8iFg8Ewg/K/etI++jHo
gCJ697AY02wtfrBox1XtljlmI2xpJtVAYZWHhrNqwrEG43aB7YEV6RqTcG6QUVqa
NbD8iNCnMKm7fP89hZizmqA1l4aHnieI3ucOqpgooM7FQwLX6qk+rSue6lD5N/5f
avsublnj8rNKyDfHpQ3AWduLoj8QqctpzI3CqoDZNLNzaDnzVWpxT1SKDQ88q7VI
W5zb+lndpdQlCu3v5HM4w5UpwL/k1htl/z6PnPseS2UdlXv6A8KITnCLg5PLP4tz
2oTAg9gjOtRP/0uwkhvicwoFzFJNVT813lzTLE1jlobMPiZhsS1mjaJGPD9GQZDK
ny3j8ogrIRGjnI4xpOMNNDVphcvwtV8fRbvURSHCj9Y4kCLpD5ODuoyEyLYicJIv
GZP456GP0iSCK5GKO0ij/YzGCkPWD5zA+mYFpMMGZPTwajenMw7TVaPXcc9CZBtr
oOjwwiLEqdkpxUj13mJYTlt5wsS/Kw==
-----END CERTIFICATE-----
| 4,066 | 67 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_datetime.py | import unittest
import sys
from test.support import import_fresh_module, run_unittest
if __name__ == "PYOBJ.COM":
import _datetime
import _strptime
import datetime
from test import datetimetester
TESTS = 'test.datetimetester'
try:
pure_tests = import_fresh_module(TESTS, fresh=['datetime', '_strptime'],
blocked=['_datetime'])
fast_tests = import_fresh_module(TESTS, fresh=['datetime',
'_datetime', '_strptime'])
finally:
# XXX: import_fresh_module() is supposed to leave sys.module cache untouched,
# XXX: but it does not, so we have to cleanup ourselves.
for modname in ['datetime', '_datetime', '_strptime']:
sys.modules.pop(modname, None)
test_modules = [pure_tests, fast_tests]
test_suffixes = ["_Pure", "_Fast"]
# XXX(gb) First run all the _Pure tests, then all the _Fast tests. You might
# not believe this, but in spite of all the sys.modules trickery running a _Pure
# test last will leave a mix of pure and native datetime stuff lying around.
all_test_classes = []
for module, suffix in zip(test_modules, test_suffixes):
test_classes = []
if suffix == "_Pure":
continue # skip Pure-Python tests
for name, cls in module.__dict__.items():
if not isinstance(cls, type):
continue
if issubclass(cls, unittest.TestCase):
test_classes.append(cls)
elif issubclass(cls, unittest.TestSuite):
suit = cls()
test_classes.extend(type(test) for test in suit)
test_classes = sorted(set(test_classes), key=lambda cls: cls.__qualname__)
for cls in test_classes:
cls.__name__ += suffix
cls.__qualname__ += suffix
@classmethod
def setUpClass(cls_, module=module):
cls_._save_sys_modules = sys.modules.copy()
sys.modules[TESTS] = module
sys.modules['datetime'] = module.datetime_module
sys.modules['_strptime'] = module._strptime
@classmethod
def tearDownClass(cls_):
sys.modules.clear()
sys.modules.update(cls_._save_sys_modules)
cls.setUpClass = setUpClass
cls.tearDownClass = tearDownClass
all_test_classes.extend(test_classes)
def test_main():
run_unittest(*all_test_classes)
if __name__ == "__main__":
test_main()
| 2,396 | 66 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_thread.py | import os
import unittest
import random
from test import support
thread = support.import_module('_thread')
import time
import sys
import weakref
from test import lock_tests
NUMTASKS = 10
NUMTRIPS = 3
POLL_SLEEP = 0.010 # seconds = 10 ms
_print_mutex = thread.allocate_lock()
def verbose_print(arg):
"""Helper function for printing out debugging output."""
if support.verbose:
with _print_mutex:
print(arg)
class BasicThreadTest(unittest.TestCase):
def setUp(self):
self.done_mutex = thread.allocate_lock()
self.done_mutex.acquire()
self.running_mutex = thread.allocate_lock()
self.random_mutex = thread.allocate_lock()
self.created = 0
self.running = 0
self.next_ident = 0
key = support.threading_setup()
self.addCleanup(support.threading_cleanup, *key)
class ThreadRunningTests(BasicThreadTest):
def newtask(self):
with self.running_mutex:
self.next_ident += 1
verbose_print("creating task %s" % self.next_ident)
thread.start_new_thread(self.task, (self.next_ident,))
self.created += 1
self.running += 1
def task(self, ident):
with self.random_mutex:
delay = random.random() / 10000.0
verbose_print("task %s will run for %sus" % (ident, round(delay*1e6)))
time.sleep(delay)
verbose_print("task %s done" % ident)
with self.running_mutex:
self.running -= 1
if self.created == NUMTASKS and self.running == 0:
self.done_mutex.release()
def test_starting_threads(self):
with support.wait_threads_exit():
# Basic test for thread creation.
for i in range(NUMTASKS):
self.newtask()
verbose_print("waiting for tasks to complete...")
self.done_mutex.acquire()
verbose_print("all tasks done")
def test_stack_size(self):
# Various stack size tests.
self.assertEqual(thread.stack_size(), 0, "initial stack size is not 0")
thread.stack_size(0)
self.assertEqual(thread.stack_size(), 0, "stack_size not reset to default")
@unittest.skipIf(os.name not in ("nt", "posix"), 'test meant for nt and posix')
def test_nt_and_posix_stack_size(self):
try:
thread.stack_size(4096)
except ValueError:
verbose_print("caught expected ValueError setting "
"stack_size(4096)")
except thread.error:
self.skipTest("platform does not support changing thread stack "
"size")
fail_msg = "stack_size(%d) failed - should succeed"
for tss in (262144, 0x100000, 0):
thread.stack_size(tss)
self.assertEqual(thread.stack_size(), tss, fail_msg % tss)
verbose_print("successfully set stack_size(%d)" % tss)
for tss in (262144, 0x100000):
verbose_print("trying stack_size = (%d)" % tss)
self.next_ident = 0
self.created = 0
with support.wait_threads_exit():
for i in range(NUMTASKS):
self.newtask()
verbose_print("waiting for all tasks to complete")
self.done_mutex.acquire()
verbose_print("all tasks done")
thread.stack_size(0)
def test__count(self):
# Test the _count() function.
orig = thread._count()
mut = thread.allocate_lock()
mut.acquire()
started = []
def task():
started.append(None)
mut.acquire()
mut.release()
with support.wait_threads_exit():
thread.start_new_thread(task, ())
while not started:
time.sleep(POLL_SLEEP)
self.assertEqual(thread._count(), orig + 1)
# Allow the task to finish.
mut.release()
# The only reliable way to be sure that the thread ended from the
# interpreter's point of view is to wait for the function object to be
# destroyed.
done = []
wr = weakref.ref(task, lambda _: done.append(None))
del task
while not done:
time.sleep(POLL_SLEEP)
self.assertEqual(thread._count(), orig)
def test_save_exception_state_on_error(self):
# See issue #14474
def task():
started.release()
raise SyntaxError
def mywrite(self, *args):
try:
raise ValueError
except ValueError:
pass
real_write(self, *args)
started = thread.allocate_lock()
with support.captured_output("stderr") as stderr:
real_write = stderr.write
stderr.write = mywrite
started.acquire()
with support.wait_threads_exit():
thread.start_new_thread(task, ())
started.acquire()
self.assertIn("Traceback", stderr.getvalue())
class Barrier:
def __init__(self, num_threads):
self.num_threads = num_threads
self.waiting = 0
self.checkin_mutex = thread.allocate_lock()
self.checkout_mutex = thread.allocate_lock()
self.checkout_mutex.acquire()
def enter(self):
self.checkin_mutex.acquire()
self.waiting = self.waiting + 1
if self.waiting == self.num_threads:
self.waiting = self.num_threads - 1
self.checkout_mutex.release()
return
self.checkin_mutex.release()
self.checkout_mutex.acquire()
self.waiting = self.waiting - 1
if self.waiting == 0:
self.checkin_mutex.release()
return
self.checkout_mutex.release()
class BarrierTest(BasicThreadTest):
def test_barrier(self):
with support.wait_threads_exit():
self.bar = Barrier(NUMTASKS)
self.running = NUMTASKS
for i in range(NUMTASKS):
thread.start_new_thread(self.task2, (i,))
verbose_print("waiting for tasks to end")
self.done_mutex.acquire()
verbose_print("tasks done")
def task2(self, ident):
for i in range(NUMTRIPS):
if ident == 0:
# give it a good chance to enter the next
# barrier before the others are all out
# of the current one
delay = 0
else:
with self.random_mutex:
delay = random.random() / 10000.0
verbose_print("task %s will run for %sus" %
(ident, round(delay * 1e6)))
time.sleep(delay)
verbose_print("task %s entering %s" % (ident, i))
self.bar.enter()
verbose_print("task %s leaving barrier" % ident)
with self.running_mutex:
self.running -= 1
# Must release mutex before releasing done, else the main thread can
# exit and set mutex to None as part of global teardown; then
# mutex.release() raises AttributeError.
finished = self.running == 0
if finished:
self.done_mutex.release()
class LockTests(lock_tests.LockTests):
locktype = thread.allocate_lock
class TestForkInThread(unittest.TestCase):
def setUp(self):
self.read_fd, self.write_fd = os.pipe()
@unittest.skipUnless(hasattr(os, 'fork'), 'need os.fork')
@support.reap_threads
def test_forkinthread(self):
status = "not set"
def thread1():
nonlocal status
# fork in a thread
pid = os.fork()
if pid == 0:
# child
try:
os.close(self.read_fd)
os.write(self.write_fd, b"OK")
finally:
os._exit(0)
else:
# parent
os.close(self.write_fd)
pid, status = os.waitpid(pid, 0)
with support.wait_threads_exit():
thread.start_new_thread(thread1, ())
self.assertEqual(os.read(self.read_fd, 2), b"OK",
"Unable to fork() in thread")
self.assertEqual(status, 0)
def tearDown(self):
try:
os.close(self.read_fd)
except OSError:
pass
try:
os.close(self.write_fd)
except OSError:
pass
if __name__ == "__main__":
unittest.main()
| 8,638 | 271 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/tf_inherit_check.py | # Helper script for test_tempfile.py. argv[2] is the number of a file
# descriptor which should _not_ be open. Check this by attempting to
# write to it -- if we succeed, something is wrong.
import sys
import os
from test.support import SuppressCrashReport
with SuppressCrashReport():
verbose = (sys.argv[1] == 'v')
try:
fd = int(sys.argv[2])
try:
os.write(fd, b"blat")
except OSError:
# Success -- could not write to fd.
sys.exit(0)
else:
if verbose:
sys.stderr.write("fd %d is open in child" % fd)
sys.exit(1)
except Exception:
if verbose:
raise
sys.exit(1)
| 714 | 28 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_int.py | import sys
import unittest
from test import support
from test.test_grammar import (VALID_UNDERSCORE_LITERALS,
INVALID_UNDERSCORE_LITERALS)
L = [
('0', 0),
('1', 1),
('9', 9),
('10', 10),
('99', 99),
('100', 100),
('314', 314),
(' 314', 314),
('314 ', 314),
(' \t\t 314 \t\t ', 314),
(repr(sys.maxsize), sys.maxsize),
(' 1x', ValueError),
(' 1 ', 1),
(' 1\02 ', ValueError),
('', ValueError),
(' ', ValueError),
(' \t\t ', ValueError),
("\u0200", ValueError)
]
class IntSubclass(int):
pass
class IntTestCases(unittest.TestCase):
def test_basic(self):
self.assertEqual(int(314), 314)
self.assertEqual(int(3.14), 3)
# Check that conversion from float truncates towards zero
self.assertEqual(int(-3.14), -3)
self.assertEqual(int(3.9), 3)
self.assertEqual(int(-3.9), -3)
self.assertEqual(int(3.5), 3)
self.assertEqual(int(-3.5), -3)
self.assertEqual(int("-3"), -3)
self.assertEqual(int(" -3 "), -3)
self.assertEqual(int("\N{EM SPACE}-3\N{EN SPACE}"), -3)
# Different base:
self.assertEqual(int("10",16), 16)
# Test conversion from strings and various anomalies
for s, v in L:
for sign in "", "+", "-":
for prefix in "", " ", "\t", " \t\t ":
ss = prefix + sign + s
vv = v
if sign == "-" and v is not ValueError:
vv = -v
try:
self.assertEqual(int(ss), vv)
except ValueError:
pass
s = repr(-1-sys.maxsize)
x = int(s)
self.assertEqual(x+1, -sys.maxsize)
self.assertIsInstance(x, int)
# should return int
self.assertEqual(int(s[1:]), sys.maxsize+1)
# should return int
x = int(1e100)
self.assertIsInstance(x, int)
x = int(-1e100)
self.assertIsInstance(x, int)
# SF bug 434186: 0x80000000/2 != 0x80000000>>1.
# Worked by accident in Windows release build, but failed in debug build.
# Failed in all Linux builds.
x = -1-sys.maxsize
self.assertEqual(x >> 1, x//2)
x = int('1' * 600)
self.assertIsInstance(x, int)
self.assertRaises(TypeError, int, 1, 12)
self.assertEqual(int('0o123', 0), 83)
self.assertEqual(int('0x123', 16), 291)
# Bug 1679: "0x" is not a valid hex literal
self.assertRaises(ValueError, int, "0x", 16)
self.assertRaises(ValueError, int, "0x", 0)
self.assertRaises(ValueError, int, "0o", 8)
self.assertRaises(ValueError, int, "0o", 0)
self.assertRaises(ValueError, int, "0b", 2)
self.assertRaises(ValueError, int, "0b", 0)
# SF bug 1334662: int(string, base) wrong answers
# Various representations of 2**32 evaluated to 0
# rather than 2**32 in previous versions
self.assertEqual(int('100000000000000000000000000000000', 2), 4294967296)
self.assertEqual(int('102002022201221111211', 3), 4294967296)
self.assertEqual(int('10000000000000000', 4), 4294967296)
self.assertEqual(int('32244002423141', 5), 4294967296)
self.assertEqual(int('1550104015504', 6), 4294967296)
self.assertEqual(int('211301422354', 7), 4294967296)
self.assertEqual(int('40000000000', 8), 4294967296)
self.assertEqual(int('12068657454', 9), 4294967296)
self.assertEqual(int('4294967296', 10), 4294967296)
self.assertEqual(int('1904440554', 11), 4294967296)
self.assertEqual(int('9ba461594', 12), 4294967296)
self.assertEqual(int('535a79889', 13), 4294967296)
self.assertEqual(int('2ca5b7464', 14), 4294967296)
self.assertEqual(int('1a20dcd81', 15), 4294967296)
self.assertEqual(int('100000000', 16), 4294967296)
self.assertEqual(int('a7ffda91', 17), 4294967296)
self.assertEqual(int('704he7g4', 18), 4294967296)
self.assertEqual(int('4f5aff66', 19), 4294967296)
self.assertEqual(int('3723ai4g', 20), 4294967296)
self.assertEqual(int('281d55i4', 21), 4294967296)
self.assertEqual(int('1fj8b184', 22), 4294967296)
self.assertEqual(int('1606k7ic', 23), 4294967296)
self.assertEqual(int('mb994ag', 24), 4294967296)
self.assertEqual(int('hek2mgl', 25), 4294967296)
self.assertEqual(int('dnchbnm', 26), 4294967296)
self.assertEqual(int('b28jpdm', 27), 4294967296)
self.assertEqual(int('8pfgih4', 28), 4294967296)
self.assertEqual(int('76beigg', 29), 4294967296)
self.assertEqual(int('5qmcpqg', 30), 4294967296)
self.assertEqual(int('4q0jto4', 31), 4294967296)
self.assertEqual(int('4000000', 32), 4294967296)
self.assertEqual(int('3aokq94', 33), 4294967296)
self.assertEqual(int('2qhxjli', 34), 4294967296)
self.assertEqual(int('2br45qb', 35), 4294967296)
self.assertEqual(int('1z141z4', 36), 4294967296)
# tests with base 0
# this fails on 3.0, but in 2.x the old octal syntax is allowed
self.assertEqual(int(' 0o123 ', 0), 83)
self.assertEqual(int(' 0o123 ', 0), 83)
self.assertEqual(int('000', 0), 0)
self.assertEqual(int('0o123', 0), 83)
self.assertEqual(int('0x123', 0), 291)
self.assertEqual(int('0b100', 0), 4)
self.assertEqual(int(' 0O123 ', 0), 83)
self.assertEqual(int(' 0X123 ', 0), 291)
self.assertEqual(int(' 0B100 ', 0), 4)
# without base still base 10
self.assertEqual(int('0123'), 123)
self.assertEqual(int('0123', 10), 123)
# tests with prefix and base != 0
self.assertEqual(int('0x123', 16), 291)
self.assertEqual(int('0o123', 8), 83)
self.assertEqual(int('0b100', 2), 4)
self.assertEqual(int('0X123', 16), 291)
self.assertEqual(int('0O123', 8), 83)
self.assertEqual(int('0B100', 2), 4)
# the code has special checks for the first character after the
# type prefix
self.assertRaises(ValueError, int, '0b2', 2)
self.assertRaises(ValueError, int, '0b02', 2)
self.assertRaises(ValueError, int, '0B2', 2)
self.assertRaises(ValueError, int, '0B02', 2)
self.assertRaises(ValueError, int, '0o8', 8)
self.assertRaises(ValueError, int, '0o08', 8)
self.assertRaises(ValueError, int, '0O8', 8)
self.assertRaises(ValueError, int, '0O08', 8)
self.assertRaises(ValueError, int, '0xg', 16)
self.assertRaises(ValueError, int, '0x0g', 16)
self.assertRaises(ValueError, int, '0Xg', 16)
self.assertRaises(ValueError, int, '0X0g', 16)
# SF bug 1334662: int(string, base) wrong answers
# Checks for proper evaluation of 2**32 + 1
self.assertEqual(int('100000000000000000000000000000001', 2), 4294967297)
self.assertEqual(int('102002022201221111212', 3), 4294967297)
self.assertEqual(int('10000000000000001', 4), 4294967297)
self.assertEqual(int('32244002423142', 5), 4294967297)
self.assertEqual(int('1550104015505', 6), 4294967297)
self.assertEqual(int('211301422355', 7), 4294967297)
self.assertEqual(int('40000000001', 8), 4294967297)
self.assertEqual(int('12068657455', 9), 4294967297)
self.assertEqual(int('4294967297', 10), 4294967297)
self.assertEqual(int('1904440555', 11), 4294967297)
self.assertEqual(int('9ba461595', 12), 4294967297)
self.assertEqual(int('535a7988a', 13), 4294967297)
self.assertEqual(int('2ca5b7465', 14), 4294967297)
self.assertEqual(int('1a20dcd82', 15), 4294967297)
self.assertEqual(int('100000001', 16), 4294967297)
self.assertEqual(int('a7ffda92', 17), 4294967297)
self.assertEqual(int('704he7g5', 18), 4294967297)
self.assertEqual(int('4f5aff67', 19), 4294967297)
self.assertEqual(int('3723ai4h', 20), 4294967297)
self.assertEqual(int('281d55i5', 21), 4294967297)
self.assertEqual(int('1fj8b185', 22), 4294967297)
self.assertEqual(int('1606k7id', 23), 4294967297)
self.assertEqual(int('mb994ah', 24), 4294967297)
self.assertEqual(int('hek2mgm', 25), 4294967297)
self.assertEqual(int('dnchbnn', 26), 4294967297)
self.assertEqual(int('b28jpdn', 27), 4294967297)
self.assertEqual(int('8pfgih5', 28), 4294967297)
self.assertEqual(int('76beigh', 29), 4294967297)
self.assertEqual(int('5qmcpqh', 30), 4294967297)
self.assertEqual(int('4q0jto5', 31), 4294967297)
self.assertEqual(int('4000001', 32), 4294967297)
self.assertEqual(int('3aokq95', 33), 4294967297)
self.assertEqual(int('2qhxjlj', 34), 4294967297)
self.assertEqual(int('2br45qc', 35), 4294967297)
self.assertEqual(int('1z141z5', 36), 4294967297)
def test_underscores(self):
for lit in VALID_UNDERSCORE_LITERALS:
if any(ch in lit for ch in '.eEjJ'):
continue
self.assertEqual(int(lit, 0), eval(lit))
self.assertEqual(int(lit, 0), int(lit.replace('_', ''), 0))
for lit in INVALID_UNDERSCORE_LITERALS:
if any(ch in lit for ch in '.eEjJ'):
continue
self.assertRaises(ValueError, int, lit, 0)
# Additional test cases with bases != 0, only for the constructor:
self.assertEqual(int("1_00", 3), 9)
self.assertEqual(int("0_100"), 100) # not valid as a literal!
self.assertEqual(int(b"1_00"), 100) # byte underscore
self.assertRaises(ValueError, int, "_100")
self.assertRaises(ValueError, int, "+_100")
self.assertRaises(ValueError, int, "1__00")
self.assertRaises(ValueError, int, "100_")
@support.cpython_only
def test_small_ints(self):
# Bug #3236: Return small longs from PyLong_FromString
self.assertIs(int('10'), 10)
self.assertIs(int('-1'), -1)
self.assertIs(int(b'10'), 10)
self.assertIs(int(b'-1'), -1)
def test_no_args(self):
self.assertEqual(int(), 0)
def test_keyword_args(self):
# Test invoking int() using keyword arguments.
self.assertEqual(int(x=1.2), 1)
self.assertEqual(int('100', base=2), 4)
self.assertEqual(int(x='100', base=2), 4)
self.assertRaises(TypeError, int, base=10)
self.assertRaises(TypeError, int, base=0)
def test_int_base_limits(self):
"""Testing the supported limits of the int() base parameter."""
self.assertEqual(int('0', 5), 0)
with self.assertRaises(ValueError):
int('0', 1)
with self.assertRaises(ValueError):
int('0', 37)
with self.assertRaises(ValueError):
int('0', -909) # An old magic value base from Python 2.
with self.assertRaises(ValueError):
int('0', base=0-(2**234))
with self.assertRaises(ValueError):
int('0', base=2**234)
# Bases 2 through 36 are supported.
for base in range(2,37):
self.assertEqual(int('0', base=base), 0)
def test_int_base_bad_types(self):
"""Not integer types are not valid bases; issue16772."""
with self.assertRaises(TypeError):
int('0', 5.5)
with self.assertRaises(TypeError):
int('0', 5.0)
def test_int_base_indexable(self):
class MyIndexable(object):
def __init__(self, value):
self.value = value
def __index__(self):
return self.value
# Check out of range bases.
for base in 2**100, -2**100, 1, 37:
with self.assertRaises(ValueError):
int('43', base)
# Check in-range bases.
self.assertEqual(int('101', base=MyIndexable(2)), 5)
self.assertEqual(int('101', base=MyIndexable(10)), 101)
self.assertEqual(int('101', base=MyIndexable(36)), 1 + 36**2)
def test_non_numeric_input_types(self):
# Test possible non-numeric types for the argument x, including
# subclasses of the explicitly documented accepted types.
class CustomStr(str): pass
class CustomBytes(bytes): pass
class CustomByteArray(bytearray): pass
factories = [
bytes,
bytearray,
lambda b: CustomStr(b.decode()),
CustomBytes,
CustomByteArray,
memoryview,
]
try:
from array import array
except ImportError:
pass
else:
factories.append(lambda b: array('B', b))
for f in factories:
x = f(b'100')
with self.subTest(type(x)):
self.assertEqual(int(x), 100)
if isinstance(x, (str, bytes, bytearray)):
self.assertEqual(int(x, 2), 4)
else:
msg = "can't convert non-string"
with self.assertRaisesRegex(TypeError, msg):
int(x, 2)
with self.assertRaisesRegex(ValueError, 'invalid literal'):
int(f(b'A' * 0x10))
def test_int_memoryview(self):
self.assertEqual(int(memoryview(b'123')[1:3]), 23)
self.assertEqual(int(memoryview(b'123\x00')[1:3]), 23)
self.assertEqual(int(memoryview(b'123 ')[1:3]), 23)
self.assertEqual(int(memoryview(b'123A')[1:3]), 23)
self.assertEqual(int(memoryview(b'1234')[1:3]), 23)
def test_string_float(self):
self.assertRaises(ValueError, int, '1.2')
def test_intconversion(self):
# Test __int__()
class ClassicMissingMethods:
pass
self.assertRaises(TypeError, int, ClassicMissingMethods())
class MissingMethods(object):
pass
self.assertRaises(TypeError, int, MissingMethods())
class Foo0:
def __int__(self):
return 42
self.assertEqual(int(Foo0()), 42)
class Classic:
pass
for base in (object, Classic):
class IntOverridesTrunc(base):
def __int__(self):
return 42
def __trunc__(self):
return -12
self.assertEqual(int(IntOverridesTrunc()), 42)
class JustTrunc(base):
def __trunc__(self):
return 42
self.assertEqual(int(JustTrunc()), 42)
class ExceptionalTrunc(base):
def __trunc__(self):
1 / 0
with self.assertRaises(ZeroDivisionError):
int(ExceptionalTrunc())
for trunc_result_base in (object, Classic):
class Integral(trunc_result_base):
def __int__(self):
return 42
class TruncReturnsNonInt(base):
def __trunc__(self):
return Integral()
self.assertEqual(int(TruncReturnsNonInt()), 42)
class NonIntegral(trunc_result_base):
def __trunc__(self):
# Check that we avoid infinite recursion.
return NonIntegral()
class TruncReturnsNonIntegral(base):
def __trunc__(self):
return NonIntegral()
try:
int(TruncReturnsNonIntegral())
except TypeError as e:
self.assertEqual(str(e),
"__trunc__ returned non-Integral"
" (type NonIntegral)")
else:
self.fail("Failed to raise TypeError with %s" %
((base, trunc_result_base),))
# Regression test for bugs.python.org/issue16060.
class BadInt(trunc_result_base):
def __int__(self):
return 42.0
class TruncReturnsBadInt(base):
def __trunc__(self):
return BadInt()
with self.assertRaises(TypeError):
int(TruncReturnsBadInt())
def test_int_subclass_with_int(self):
class MyInt(int):
def __int__(self):
return 42
class BadInt(int):
def __int__(self):
return 42.0
my_int = MyInt(7)
self.assertEqual(my_int, 7)
self.assertEqual(int(my_int), 42)
self.assertRaises(TypeError, int, BadInt())
def test_int_returns_int_subclass(self):
class BadInt:
def __int__(self):
return True
class BadInt2(int):
def __int__(self):
return True
class TruncReturnsBadInt:
def __trunc__(self):
return BadInt()
class TruncReturnsIntSubclass:
def __trunc__(self):
return True
bad_int = BadInt()
with self.assertWarns(DeprecationWarning):
n = int(bad_int)
self.assertEqual(n, 1)
self.assertIs(type(n), int)
bad_int = BadInt2()
with self.assertWarns(DeprecationWarning):
n = int(bad_int)
self.assertEqual(n, 1)
self.assertIs(type(n), int)
bad_int = TruncReturnsBadInt()
with self.assertWarns(DeprecationWarning):
n = int(bad_int)
self.assertEqual(n, 1)
self.assertIs(type(n), int)
good_int = TruncReturnsIntSubclass()
n = int(good_int)
self.assertEqual(n, 1)
self.assertIs(type(n), int)
n = IntSubclass(good_int)
self.assertEqual(n, 1)
self.assertIs(type(n), IntSubclass)
def test_error_message(self):
def check(s, base=None):
with self.assertRaises(ValueError,
msg="int(%r, %r)" % (s, base)) as cm:
if base is None:
int(s)
else:
int(s, base)
self.assertEqual(cm.exception.args[0],
"invalid literal for int() with base %d: %r" %
(10 if base is None else base, s))
check('\xbd')
check('123\xbd')
check(' 123 456 ')
check('123\x00')
# SF bug 1545497: embedded NULs were not detected with explicit base
check('123\x00', 10)
check('123\x00 245', 20)
check('123\x00 245', 16)
check('123\x00245', 20)
check('123\x00245', 16)
# byte string with embedded NUL
check(b'123\x00')
check(b'123\x00', 10)
# non-UTF-8 byte string
check(b'123\xbd')
check(b'123\xbd', 10)
# lone surrogate in Unicode string
check('123\ud800')
check('123\ud800', 10)
def test_issue31619(self):
self.assertEqual(int('1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1', 2),
0b1010101010101010101010101010101)
self.assertEqual(int('1_2_3_4_5_6_7_0_1_2_3', 8), 0o12345670123)
self.assertEqual(int('1_2_3_4_5_6_7_8_9', 16), 0x123456789)
self.assertEqual(int('1_2_3_4_5_6_7', 32), 1144132807)
if __name__ == "__main__":
unittest.main()
| 19,674 | 519 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/profilee.py | """
Input for test_profile.py and test_cprofile.py.
IMPORTANT: This stuff is touchy. If you modify anything above the
test class you'll have to regenerate the stats by running the two
test files.
*ALL* NUMBERS in the expected output are relevant. If you change
the formatting of pstats, please don't just regenerate the expected
output without checking very carefully that not a single number has
changed.
"""
import sys
# In order to have reproducible time, we simulate a timer in the global
# variable 'TICKS', which represents simulated time in milliseconds.
# (We can't use a helper function increment the timer since it would be
# included in the profile and would appear to consume all the time.)
TICKS = 42000
def timer():
return TICKS
def testfunc():
# 1 call
# 1000 ticks total: 270 ticks local, 730 ticks in subfunctions
global TICKS
TICKS += 99
helper() # 300
helper() # 300
TICKS += 171
factorial(14) # 130
def factorial(n):
# 23 calls total
# 170 ticks total, 150 ticks local
# 3 primitive calls, 130, 20 and 20 ticks total
# including 116, 17, 17 ticks local
global TICKS
if n > 0:
TICKS += n
return mul(n, factorial(n-1))
else:
TICKS += 11
return 1
def mul(a, b):
# 20 calls
# 1 tick, local
global TICKS
TICKS += 1
return a * b
def helper():
# 2 calls
# 300 ticks total: 20 ticks local, 260 ticks in subfunctions
global TICKS
TICKS += 1
helper1() # 30
TICKS += 2
helper1() # 30
TICKS += 6
helper2() # 50
TICKS += 3
helper2() # 50
TICKS += 2
helper2() # 50
TICKS += 5
helper2_indirect() # 70
TICKS += 1
def helper1():
# 4 calls
# 30 ticks total: 29 ticks local, 1 tick in subfunctions
global TICKS
TICKS += 10
hasattr(C(), "foo") # 1
TICKS += 19
lst = []
lst.append(42) # 0
sys.exc_info() # 0
def helper2_indirect():
helper2() # 50
factorial(3) # 20
def helper2():
# 8 calls
# 50 ticks local: 39 ticks local, 11 ticks in subfunctions
global TICKS
TICKS += 11
hasattr(C(), "bar") # 1
TICKS += 13
subhelper() # 10
TICKS += 15
def subhelper():
# 8 calls
# 10 ticks total: 8 ticks local, 2 ticks in subfunctions
global TICKS
TICKS += 2
for i in range(2): # 0
try:
C().foo # 1 x 2
except AttributeError:
TICKS += 3 # 3 x 2
class C:
def __getattr__(self, name):
# 28 calls
# 1 tick, local
global TICKS
TICKS += 1
raise AttributeError
| 3,041 | 116 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/tokenize_tests-utf8-coding-cookie-and-utf8-bom-sig.txt | # -*- coding: utf-8 -*-
# IMPORTANT: this file has the utf-8 BOM signature '\xef\xbb\xbf'
# at the start of it. Make sure this is preserved if any changes
# are made!
# Arbitrary encoded utf-8 text (stolen from test_doctest2.py).
x = 'ÐÐÐÐÐ'
def y():
"""
And again in a comment. ÐÐÐÐÐ
"""
pass
| 327 | 13 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/mod_generics_cache.py | """Module for testing the behavior of generics across different modules."""
import sys
from textwrap import dedent
from typing import TypeVar, Generic, Optional
if sys.version_info[:2] >= (3, 6):
exec(dedent("""
default_a: Optional['A'] = None
default_b: Optional['B'] = None
T = TypeVar('T')
class A(Generic[T]):
some_b: 'B'
class B(Generic[T]):
class A(Generic[T]):
pass
my_inner_a1: 'B.A'
my_inner_a2: A
my_outer_a: 'A' # unless somebody calls get_type_hints with localns=B.__dict__
"""))
else: # This should stay in sync with the syntax above.
__annotations__ = dict(
default_a=Optional['A'],
default_b=Optional['B'],
)
default_a = None
default_b = None
T = TypeVar('T')
class A(Generic[T]):
__annotations__ = dict(
some_b='B'
)
class B(Generic[T]):
class A(Generic[T]):
pass
__annotations__ = dict(
my_inner_a1='B.A',
my_inner_a2=A,
my_outer_a='A' # unless somebody calls get_type_hints with localns=B.__dict__
)
| 1,160 | 54 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/formatfloat_testcases.txt | -- 'f' code formatting, with explicit precision (>= 0). Output always
-- has the given number of places after the point; zeros are added if
-- necessary to make this true.
-- zeros
%.0f 0 -> 0
%.1f 0 -> 0.0
%.2f 0 -> 0.00
%.3f 0 -> 0.000
%.50f 0 -> 0.00000000000000000000000000000000000000000000000000
-- precision 0; result should never include a .
%.0f 1.5 -> 2
%.0f 2.5 -> 2
%.0f 3.5 -> 4
%.0f 0.0 -> 0
%.0f 0.1 -> 0
%.0f 0.001 -> 0
%.0f 10.0 -> 10
%.0f 10.1 -> 10
%.0f 10.01 -> 10
%.0f 123.456 -> 123
%.0f 1234.56 -> 1235
%.0f 1e49 -> 9999999999999999464902769475481793196872414789632
%.0f 9.9999999999999987e+49 -> 99999999999999986860582406952576489172979654066176
%.0f 1e50 -> 100000000000000007629769841091887003294964970946560
-- precision 1
%.1f 0.0001 -> 0.0
%.1f 0.001 -> 0.0
%.1f 0.01 -> 0.0
%.1f 0.04 -> 0.0
%.1f 0.06 -> 0.1
%.1f 0.25 -> 0.2
%.1f 0.75 -> 0.8
%.1f 1.4 -> 1.4
%.1f 1.5 -> 1.5
%.1f 10.0 -> 10.0
%.1f 1000.03 -> 1000.0
%.1f 1234.5678 -> 1234.6
%.1f 1234.7499 -> 1234.7
%.1f 1234.75 -> 1234.8
-- precision 2
%.2f 0.0001 -> 0.00
%.2f 0.001 -> 0.00
%.2f 0.004999 -> 0.00
%.2f 0.005001 -> 0.01
%.2f 0.01 -> 0.01
%.2f 0.125 -> 0.12
%.2f 0.375 -> 0.38
%.2f 1234500 -> 1234500.00
%.2f 1234560 -> 1234560.00
%.2f 1234567 -> 1234567.00
%.2f 1234567.8 -> 1234567.80
%.2f 1234567.89 -> 1234567.89
%.2f 1234567.891 -> 1234567.89
%.2f 1234567.8912 -> 1234567.89
-- alternate form always includes a decimal point. This only
-- makes a difference when the precision is 0.
%#.0f 0 -> 0.
%#.1f 0 -> 0.0
%#.0f 1.5 -> 2.
%#.0f 2.5 -> 2.
%#.0f 10.1 -> 10.
%#.0f 1234.56 -> 1235.
%#.1f 1.4 -> 1.4
%#.2f 0.375 -> 0.38
-- if precision is omitted it defaults to 6
%f 0 -> 0.000000
%f 1230000 -> 1230000.000000
%f 1234567 -> 1234567.000000
%f 123.4567 -> 123.456700
%f 1.23456789 -> 1.234568
%f 0.00012 -> 0.000120
%f 0.000123 -> 0.000123
%f 0.00012345 -> 0.000123
%f 0.000001 -> 0.000001
%f 0.0000005001 -> 0.000001
%f 0.0000004999 -> 0.000000
-- 'e' code formatting with explicit precision (>= 0). Output should
-- always have exactly the number of places after the point that were
-- requested.
-- zeros
%.0e 0 -> 0e+00
%.1e 0 -> 0.0e+00
%.2e 0 -> 0.00e+00
%.10e 0 -> 0.0000000000e+00
%.50e 0 -> 0.00000000000000000000000000000000000000000000000000e+00
-- precision 0. no decimal point in the output
%.0e 0.01 -> 1e-02
%.0e 0.1 -> 1e-01
%.0e 1 -> 1e+00
%.0e 10 -> 1e+01
%.0e 100 -> 1e+02
%.0e 0.012 -> 1e-02
%.0e 0.12 -> 1e-01
%.0e 1.2 -> 1e+00
%.0e 12 -> 1e+01
%.0e 120 -> 1e+02
%.0e 123.456 -> 1e+02
%.0e 0.000123456 -> 1e-04
%.0e 123456000 -> 1e+08
%.0e 0.5 -> 5e-01
%.0e 1.4 -> 1e+00
%.0e 1.5 -> 2e+00
%.0e 1.6 -> 2e+00
%.0e 2.4999999 -> 2e+00
%.0e 2.5 -> 2e+00
%.0e 2.5000001 -> 3e+00
%.0e 3.499999999999 -> 3e+00
%.0e 3.5 -> 4e+00
%.0e 4.5 -> 4e+00
%.0e 5.5 -> 6e+00
%.0e 6.5 -> 6e+00
%.0e 7.5 -> 8e+00
%.0e 8.5 -> 8e+00
%.0e 9.4999 -> 9e+00
%.0e 9.5 -> 1e+01
%.0e 10.5 -> 1e+01
%.0e 14.999 -> 1e+01
%.0e 15 -> 2e+01
-- precision 1
%.1e 0.0001 -> 1.0e-04
%.1e 0.001 -> 1.0e-03
%.1e 0.01 -> 1.0e-02
%.1e 0.1 -> 1.0e-01
%.1e 1 -> 1.0e+00
%.1e 10 -> 1.0e+01
%.1e 100 -> 1.0e+02
%.1e 120 -> 1.2e+02
%.1e 123 -> 1.2e+02
%.1e 123.4 -> 1.2e+02
-- precision 2
%.2e 0.00013 -> 1.30e-04
%.2e 0.000135 -> 1.35e-04
%.2e 0.0001357 -> 1.36e-04
%.2e 0.0001 -> 1.00e-04
%.2e 0.001 -> 1.00e-03
%.2e 0.01 -> 1.00e-02
%.2e 0.1 -> 1.00e-01
%.2e 1 -> 1.00e+00
%.2e 10 -> 1.00e+01
%.2e 100 -> 1.00e+02
%.2e 1000 -> 1.00e+03
%.2e 1500 -> 1.50e+03
%.2e 1590 -> 1.59e+03
%.2e 1598 -> 1.60e+03
%.2e 1598.7 -> 1.60e+03
%.2e 1598.76 -> 1.60e+03
%.2e 9999 -> 1.00e+04
-- omitted precision defaults to 6
%e 0 -> 0.000000e+00
%e 165 -> 1.650000e+02
%e 1234567 -> 1.234567e+06
%e 12345678 -> 1.234568e+07
%e 1.1 -> 1.100000e+00
-- alternate form always contains a decimal point. This only makes
-- a difference when precision is 0.
%#.0e 0.01 -> 1.e-02
%#.0e 0.1 -> 1.e-01
%#.0e 1 -> 1.e+00
%#.0e 10 -> 1.e+01
%#.0e 100 -> 1.e+02
%#.0e 0.012 -> 1.e-02
%#.0e 0.12 -> 1.e-01
%#.0e 1.2 -> 1.e+00
%#.0e 12 -> 1.e+01
%#.0e 120 -> 1.e+02
%#.0e 123.456 -> 1.e+02
%#.0e 0.000123456 -> 1.e-04
%#.0e 123456000 -> 1.e+08
%#.0e 0.5 -> 5.e-01
%#.0e 1.4 -> 1.e+00
%#.0e 1.5 -> 2.e+00
%#.0e 1.6 -> 2.e+00
%#.0e 2.4999999 -> 2.e+00
%#.0e 2.5 -> 2.e+00
%#.0e 2.5000001 -> 3.e+00
%#.0e 3.499999999999 -> 3.e+00
%#.0e 3.5 -> 4.e+00
%#.0e 4.5 -> 4.e+00
%#.0e 5.5 -> 6.e+00
%#.0e 6.5 -> 6.e+00
%#.0e 7.5 -> 8.e+00
%#.0e 8.5 -> 8.e+00
%#.0e 9.4999 -> 9.e+00
%#.0e 9.5 -> 1.e+01
%#.0e 10.5 -> 1.e+01
%#.0e 14.999 -> 1.e+01
%#.0e 15 -> 2.e+01
%#.1e 123.4 -> 1.2e+02
%#.2e 0.0001357 -> 1.36e-04
-- 'g' code formatting.
-- zeros
%.0g 0 -> 0
%.1g 0 -> 0
%.2g 0 -> 0
%.3g 0 -> 0
%.4g 0 -> 0
%.10g 0 -> 0
%.50g 0 -> 0
%.100g 0 -> 0
-- precision 0 doesn't make a lot of sense for the 'g' code (what does
-- it mean to have no significant digits?); in practice, it's interpreted
-- as identical to precision 1
%.0g 1000 -> 1e+03
%.0g 100 -> 1e+02
%.0g 10 -> 1e+01
%.0g 1 -> 1
%.0g 0.1 -> 0.1
%.0g 0.01 -> 0.01
%.0g 1e-3 -> 0.001
%.0g 1e-4 -> 0.0001
%.0g 1e-5 -> 1e-05
%.0g 1e-6 -> 1e-06
%.0g 12 -> 1e+01
%.0g 120 -> 1e+02
%.0g 1.2 -> 1
%.0g 0.12 -> 0.1
%.0g 0.012 -> 0.01
%.0g 0.0012 -> 0.001
%.0g 0.00012 -> 0.0001
%.0g 0.000012 -> 1e-05
%.0g 0.0000012 -> 1e-06
-- precision 1 identical to precision 0
%.1g 1000 -> 1e+03
%.1g 100 -> 1e+02
%.1g 10 -> 1e+01
%.1g 1 -> 1
%.1g 0.1 -> 0.1
%.1g 0.01 -> 0.01
%.1g 1e-3 -> 0.001
%.1g 1e-4 -> 0.0001
%.1g 1e-5 -> 1e-05
%.1g 1e-6 -> 1e-06
%.1g 12 -> 1e+01
%.1g 120 -> 1e+02
%.1g 1.2 -> 1
%.1g 0.12 -> 0.1
%.1g 0.012 -> 0.01
%.1g 0.0012 -> 0.001
%.1g 0.00012 -> 0.0001
%.1g 0.000012 -> 1e-05
%.1g 0.0000012 -> 1e-06
-- precision 2
%.2g 1000 -> 1e+03
%.2g 100 -> 1e+02
%.2g 10 -> 10
%.2g 1 -> 1
%.2g 0.1 -> 0.1
%.2g 0.01 -> 0.01
%.2g 0.001 -> 0.001
%.2g 1e-4 -> 0.0001
%.2g 1e-5 -> 1e-05
%.2g 1e-6 -> 1e-06
%.2g 1234 -> 1.2e+03
%.2g 123 -> 1.2e+02
%.2g 12.3 -> 12
%.2g 1.23 -> 1.2
%.2g 0.123 -> 0.12
%.2g 0.0123 -> 0.012
%.2g 0.00123 -> 0.0012
%.2g 0.000123 -> 0.00012
%.2g 0.0000123 -> 1.2e-05
-- bad cases from http://bugs.python.org/issue9980
%.12g 38210.0 -> 38210
%.12g 37210.0 -> 37210
%.12g 36210.0 -> 36210
-- alternate g formatting: always include decimal point and
-- exactly <precision> significant digits.
%#.0g 0 -> 0.
%#.1g 0 -> 0.
%#.2g 0 -> 0.0
%#.3g 0 -> 0.00
%#.4g 0 -> 0.000
%#.0g 0.2 -> 0.2
%#.1g 0.2 -> 0.2
%#.2g 0.2 -> 0.20
%#.3g 0.2 -> 0.200
%#.4g 0.2 -> 0.2000
%#.10g 0.2 -> 0.2000000000
%#.0g 2 -> 2.
%#.1g 2 -> 2.
%#.2g 2 -> 2.0
%#.3g 2 -> 2.00
%#.4g 2 -> 2.000
%#.0g 20 -> 2.e+01
%#.1g 20 -> 2.e+01
%#.2g 20 -> 20.
%#.3g 20 -> 20.0
%#.4g 20 -> 20.00
%#.0g 234.56 -> 2.e+02
%#.1g 234.56 -> 2.e+02
%#.2g 234.56 -> 2.3e+02
%#.3g 234.56 -> 235.
%#.4g 234.56 -> 234.6
%#.5g 234.56 -> 234.56
%#.6g 234.56 -> 234.560
-- repr formatting. Result always includes decimal point and at
-- least one digit after the point, or an exponent.
%r 0 -> 0.0
%r 1 -> 1.0
%r 0.01 -> 0.01
%r 0.02 -> 0.02
%r 0.03 -> 0.03
%r 0.04 -> 0.04
%r 0.05 -> 0.05
-- values >= 1e16 get an exponent
%r 10 -> 10.0
%r 100 -> 100.0
%r 1e15 -> 1000000000000000.0
%r 9.999e15 -> 9999000000000000.0
%r 9999999999999998 -> 9999999999999998.0
%r 9999999999999999 -> 1e+16
%r 1e16 -> 1e+16
%r 1e17 -> 1e+17
-- as do values < 1e-4
%r 1e-3 -> 0.001
%r 1.001e-4 -> 0.0001001
%r 1.0000000000000001e-4 -> 0.0001
%r 1.000000000000001e-4 -> 0.0001000000000000001
%r 1.00000000001e-4 -> 0.000100000000001
%r 1.0000000001e-4 -> 0.00010000000001
%r 1e-4 -> 0.0001
%r 0.99999999999999999e-4 -> 0.0001
%r 0.9999999999999999e-4 -> 9.999999999999999e-05
%r 0.999999999999e-4 -> 9.99999999999e-05
%r 0.999e-4 -> 9.99e-05
%r 1e-5 -> 1e-05
| 7,630 | 356 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_pow.py | import unittest
class PowTest(unittest.TestCase):
def powtest(self, type):
if type != float:
for i in range(-1000, 1000):
self.assertEqual(pow(type(i), 0), 1)
self.assertEqual(pow(type(i), 1), type(i))
self.assertEqual(pow(type(0), 1), type(0))
self.assertEqual(pow(type(1), 1), type(1))
for i in range(-100, 100):
self.assertEqual(pow(type(i), 3), i*i*i)
pow2 = 1
for i in range(0, 31):
self.assertEqual(pow(2, i), pow2)
if i != 30 : pow2 = pow2*2
for othertype in (int,):
for i in list(range(-10, 0)) + list(range(1, 10)):
ii = type(i)
for j in range(1, 11):
jj = -othertype(j)
pow(ii, jj)
for othertype in int, float:
for i in range(1, 100):
zero = type(0)
exp = -othertype(i/10.0)
if exp == 0:
continue
self.assertRaises(ZeroDivisionError, pow, zero, exp)
il, ih = -20, 20
jl, jh = -5, 5
kl, kh = -10, 10
asseq = self.assertEqual
if type == float:
il = 1
asseq = self.assertAlmostEqual
elif type == int:
jl = 0
elif type == int:
jl, jh = 0, 15
for i in range(il, ih+1):
for j in range(jl, jh+1):
for k in range(kl, kh+1):
if k != 0:
if type == float or j < 0:
self.assertRaises(TypeError, pow, type(i), j, k)
continue
asseq(
pow(type(i),j,k),
pow(type(i),j)% type(k)
)
def test_powint(self):
self.powtest(int)
def test_powfloat(self):
self.powtest(float)
def test_other(self):
# Other tests-- not very systematic
self.assertEqual(pow(3,3) % 8, pow(3,3,8))
self.assertEqual(pow(3,3) % -8, pow(3,3,-8))
self.assertEqual(pow(3,2) % -2, pow(3,2,-2))
self.assertEqual(pow(-3,3) % 8, pow(-3,3,8))
self.assertEqual(pow(-3,3) % -8, pow(-3,3,-8))
self.assertEqual(pow(5,2) % -8, pow(5,2,-8))
self.assertEqual(pow(3,3) % 8, pow(3,3,8))
self.assertEqual(pow(3,3) % -8, pow(3,3,-8))
self.assertEqual(pow(3,2) % -2, pow(3,2,-2))
self.assertEqual(pow(-3,3) % 8, pow(-3,3,8))
self.assertEqual(pow(-3,3) % -8, pow(-3,3,-8))
self.assertEqual(pow(5,2) % -8, pow(5,2,-8))
for i in range(-10, 11):
for j in range(0, 6):
for k in range(-7, 11):
if j >= 0 and k != 0:
self.assertEqual(
pow(i,j) % k,
pow(i,j,k)
)
if j >= 0 and k != 0:
self.assertEqual(
pow(int(i),j) % k,
pow(int(i),j,k)
)
def test_bug643260(self):
class TestRpow:
def __rpow__(self, other):
return None
None ** TestRpow() # Won't fail when __rpow__ invoked. SF bug #643260.
def test_bug705231(self):
# -1.0 raised to an integer should never blow up. It did if the
# platform pow() was buggy, and Python didn't worm around it.
eq = self.assertEqual
a = -1.0
# The next two tests can still fail if the platform floor()
# function doesn't treat all large inputs as integers
# test_math should also fail if that is happening
eq(pow(a, 1.23e167), 1.0)
eq(pow(a, -1.23e167), 1.0)
for b in range(-10, 11):
eq(pow(a, float(b)), b & 1 and -1.0 or 1.0)
for n in range(0, 100):
fiveto = float(5 ** n)
# For small n, fiveto will be odd. Eventually we run out of
# mantissa bits, though, and thereafer fiveto will be even.
expected = fiveto % 2.0 and -1.0 or 1.0
eq(pow(a, fiveto), expected)
eq(pow(a, -fiveto), expected)
eq(expected, 1.0) # else we didn't push fiveto to evenness
if __name__ == "__main__":
unittest.main()
| 4,471 | 124 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/gdb_sample.py | # Sample script for use by test_gdb.py
def foo(a, b, c):
bar(a, b, c)
def bar(a, b, c):
baz(a, b, c)
def baz(*args):
id(42)
foo(1, 2, 3)
| 153 | 13 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_future3.py | from __future__ import nested_scopes
from __future__ import division
import unittest
x = 2
def nester():
x = 3
def inner():
return x
return inner()
class TestFuture(unittest.TestCase):
def test_floor_div_operator(self):
self.assertEqual(7 // 2, 3)
def test_true_div_as_default(self):
self.assertAlmostEqual(7 / 2, 3.5)
def test_nested_scopes(self):
self.assertEqual(nester(), 3)
if __name__ == "__main__":
unittest.main()
| 490 | 27 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_distutils.py | """Tests for distutils.
The tests for distutils are defined in the distutils.tests package;
the test_suite() function there returns a test suite that's ready to
be run.
"""
import distutils.tests
import test.support
def test_main():
test.support.run_unittest(distutils.tests.test_suite())
test.support.reap_children()
if __name__ == "__main__":
test_main()
| 375 | 19 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/randv3.pck | crandom
Random
p0
(tRp1
(I3
(L2147483648L
L994081831L
L2806287265L
L2228999830L
L3396498069L
L2956805457L
L3273927761L
L920726507L
L1862624492L
L2921292485L
L1779526843L
L2469105503L
L251696293L
L1254390717L
L779197080L
L3165356830L
L2007365218L
L1870028812L
L2896519363L
L1855578438L
L979518416L
L3481710246L
L3191861507L
L3993006593L
L2967971479L
L3353342753L
L3576782572L
L339685558L
L2367675732L
L116208555L
L1220054437L
L486597056L
L1912115141L
L1037044792L
L4096904723L
L3409146175L
L3701651227L
L315824610L
L4138604583L
L1385764892L
L191878900L
L2320582219L
L3420677494L
L2776503169L
L1148247403L
L829555069L
L902064012L
L2934642741L
L2477108577L
L2583928217L
L1658612579L
L2865447913L
L129147346L
L3691171887L
L1569328110L
L1372860143L
L1054139183L
L1617707080L
L69020592L
L3810271603L
L1853953416L
L3499803073L
L1027545027L
L3229043605L
L250848720L
L3324932626L
L3537002962L
L2494323345L
L3238103962L
L4147541579L
L3636348186L
L3025455083L
L2678771977L
L584700256L
L3461826909L
L854511420L
L943463552L
L3609239025L
L3977577989L
L253070090L
L777394544L
L2144086567L
L1092947992L
L854327284L
L2222750082L
L360183510L
L1312466483L
L3227531091L
L2235022500L
L3013060530L
L2541091298L
L3480126342L
L1839762775L
L2632608190L
L1108889403L
L3045050923L
L731513126L
L3505436788L
L3062762017L
L1667392680L
L1354126500L
L1143573930L
L2816645702L
L2100356873L
L2817679106L
L1210746010L
L2409915248L
L2910119964L
L2309001420L
L220351824L
L3667352871L
L3993148590L
L2886160232L
L4239393701L
L1189270581L
L3067985541L
L147374573L
L2355164869L
L3696013550L
L4227037846L
L1905112743L
L3312843689L
L2930678266L
L1828795355L
L76933594L
L3987100796L
L1288361435L
L3464529151L
L965498079L
L1444623093L
L1372893415L
L1536235597L
L1341994850L
L963594758L
L2115295754L
L982098685L
L1053433904L
L2078469844L
L3059765792L
L1753606181L
L2130171254L
L567588194L
L529629426L
L3621523534L
L3027576564L
L1176438083L
L4096287858L
L1168574683L
L1425058962L
L1429631655L
L2902106759L
L761900641L
L1329183956L
L1947050932L
L447490289L
L3282516276L
L200037389L
L921868197L
L3331403999L
L4088760249L
L2188326318L
L288401961L
L1360802675L
L314302808L
L3314639210L
L3749821203L
L2286081570L
L2768939062L
L3200541016L
L2133495482L
L385029880L
L4217232202L
L3171617231L
L1660846653L
L2459987621L
L2691776124L
L4225030408L
L3595396773L
L1103680661L
L539064057L
L1492841101L
L166195394L
L757973658L
L533893054L
L2784879594L
L1021821883L
L2350548162L
L176852116L
L3503166025L
L148079914L
L1633466236L
L2773090165L
L1162846701L
L3575737795L
L1624178239L
L2454894710L
L3014691938L
L526355679L
L1870824081L
L3362425857L
L3907566665L
L3462563184L
L2229112004L
L4203735748L
L1557442481L
L924133999L
L1906634214L
L880459727L
L4065895870L
L141426254L
L1258450159L
L3243115027L
L1574958840L
L313939294L
L3055664260L
L3459714255L
L531778790L
L509505506L
L1620227491L
L2675554942L
L2516509560L
L3797299887L
L237135890L
L3203142213L
L1087745310L
L1897151854L
L3936590041L
L132765167L
L2385908063L
L1360600289L
L3574567769L
L2752788114L
L2644228966L
L2377705183L
L601277909L
L4046480498L
L324401408L
L3279931760L
L2227059377L
L1538827493L
L4220532064L
L478044564L
L2917117761L
L635492832L
L2319763261L
L795944206L
L1820473234L
L1673151409L
L1404095402L
L1661067505L
L3217106938L
L2406310683L
L1931309248L
L2458622868L
L3323670524L
L3266852755L
L240083943L
L3168387397L
L607722198L
L1256837690L
L3608124913L
L4244969357L
L1289959293L
L519750328L
L3229482463L
L1105196988L
L1832684479L
L3761037224L
L2363631822L
L3297957711L
L572766355L
L1195822137L
L2239207981L
L2034241203L
L163540514L
L288160255L
L716403680L
L4019439143L
L1536281935L
L2345100458L
L2786059178L
L2822232109L
L987025395L
L3061166559L
L490422513L
L2551030115L
L2638707620L
L1344728502L
L714108911L
L2831719700L
L2188615369L
L373509061L
L1351077504L
L3136217056L
L783521095L
L2554949468L
L2662499550L
L1203826951L
L1379632388L
L1918858985L
L607465976L
L1980450237L
L3540079211L
L3397813410L
L2913309266L
L2289572621L
L4133935327L
L4166227663L
L3371801704L
L3065474909L
L3580562343L
L3832172378L
L2556130719L
L310473705L
L3734014346L
L2490413810L
L347233056L
L526668037L
L1158393656L
L544329703L
L2150085419L
L3914038146L
L1060237586L
L4159394837L
L113205121L
L309966775L
L4098784465L
L3635222960L
L2417516569L
L2089579233L
L1725807541L
L2728122526L
L2365836523L
L2504078522L
L1443946869L
L2384171411L
L997046534L
L3249131657L
L1699875986L
L3618097146L
L1716038224L
L2629818607L
L2929217876L
L1367250314L
L1726434951L
L1388496325L
L2107602181L
L2822366842L
L3052979190L
L3796798633L
L1543813381L
L959000121L
L1363845999L
L2952528150L
L874184932L
L1888387194L
L2328695295L
L3442959855L
L841805947L
L1087739275L
L3230005434L
L3045399265L
L1161817318L
L2898673139L
L860011094L
L940539782L
L1297818080L
L4243941623L
L1577613033L
L4204131887L
L3819057225L
L1969439558L
L3297963932L
L241874069L
L3517033453L
L2295345664L
L1098911422L
L886955008L
L1477397621L
L4279347332L
L3616558791L
L2384411957L
L742537731L
L764221540L
L2871698900L
L3530636393L
L691256644L
L758730966L
L1717773090L
L2751856377L
L3188484000L
L3767469670L
L1623863053L
L3533236793L
L4099284176L
L723921107L
L310594036L
L223978745L
L2266565776L
L201843303L
L2969968546L
L3351170888L
L3465113624L
L2712246712L
L1521383057L
L2384461798L
L216357551L
L2167301975L
L3144653194L
L2781220155L
L3620747666L
L95971265L
L4255400243L
L59999757L
L4174273472L
L3974511524L
L1007123950L
L3112477628L
L806461512L
L3148074008L
L528352882L
L2545979588L
L2562281969L
L3010249477L
L1886331611L
L3210656433L
L1034099976L
L2906893579L
L1197048779L
L1870004401L
L3898300490L
L2686856402L
L3975723478L
L613043532L
L2565674353L
L3760045310L
L3468984376L
L4126258L
L303855424L
L3988963552L
L276256796L
L544071807L
L1023872062L
L1747461519L
L1975571260L
L4033766958L
L2946555557L
L1492957796L
L958271685L
L46480515L
L907760635L
L1306626357L
L819652378L
L1172300279L
L1116851319L
L495601075L
L1157715330L
L534220108L
L377320028L
L1672286106L
L2066219284L
L1842386355L
L2546059464L
L1839457336L
L3476194446L
L3050550028L
L594705582L
L1905813535L
L1813033412L
L2700858157L
L169067972L
L4252889045L
L1921944555L
L497671474L
L210143935L
L2688398489L
L325158375L
L3450846447L
L891760597L
L712802536L
L1132557436L
L1417044075L
L1639889660L
L1746379970L
L1478741647L
L2817563486L
L2573612532L
L4266444457L
L2911601615L
L804745411L
L2207254652L
L1189140646L
L3829725111L
L3637367348L
L1944731747L
L2193440343L
L1430195413L
L1173515229L
L1582618217L
L2070767037L
L247908936L
L1460675439L
L556001596L
L327629335L
L1036133876L
L4228129605L
L999174048L
L3635804039L
L1416550481L
L1270540269L
L4280743815L
L39607659L
L1552540623L
L2762294062L
L504137289L
L4117044239L
L1417130225L
L1342970056L
L1755716449L
L1169447322L
L2731401356L
L2319976745L
L2869221479L
L23972655L
L2251495389L
L1429860878L
L3728135992L
L4241432973L
L3698275076L
L216416432L
L4040046960L
L246077176L
L894675685L
L3932282259L
L3097205100L
L2128818650L
L1319010656L
L1601974009L
L2552960957L
L3554016055L
L4209395641L
L2013340102L
L3370447801L
L2307272002L
L1795091354L
L202109401L
L988345070L
L2514870758L
L1132726850L
L582746224L
L3112305421L
L1843020683L
L3600189223L
L1101349165L
L4211905855L
L2866677581L
L2881621130L
L4165324109L
L4238773191L
L3635649550L
L2670481044L
L2996248219L
L1676992480L
L3473067050L
L4205793699L
L4019490897L
L1579990481L
L1899617990L
L1136347713L
L1802842268L
L3591752960L
L1197308739L
L433629786L
L4032142790L
L3148041979L
L3312138845L
L3896860449L
L3298182567L
L907605170L
L1658664067L
L2682980313L
L2523523173L
L1208722103L
L3808530363L
L1079003946L
L4282402864L
L2041010073L
L2667555071L
L688018180L
L1405121012L
L4167994076L
L3504695336L
L1923944749L
L1143598790L
L3936268898L
L3606243846L
L1017420080L
L4026211169L
L596529763L
L1844259624L
L2840216282L
L2673807759L
L3407202575L
L2737971083L
L4075423068L
L3684057432L
L3146627241L
L599650513L
L69773114L
L1257035919L
L807485291L
L2376230687L
L3036593147L
L2642411658L
L106080044L
L2199622729L
L291834511L
L2697611361L
L11689733L
L625123952L
L3226023062L
L3229663265L
L753059444L
L2843610189L
L624L
tp2
Ntp3
b. | 8,004 | 633 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_random.py | import unittest
import unittest.mock
import random
import time
import pickle
import warnings
from functools import partial
from math import log, exp, pi, fsum, sin
from test import support
from fractions import Fraction
class TestBasicOps:
# Superclass with tests common to all generators.
# Subclasses must arrange for self.gen to retrieve the Random instance
# to be tested.
def randomlist(self, n):
"""Helper function to make a list of random numbers"""
return [self.gen.random() for i in range(n)]
def test_autoseed(self):
self.gen.seed()
state1 = self.gen.getstate()
time.sleep(0.1)
self.gen.seed() # different seeds at different times
state2 = self.gen.getstate()
self.assertNotEqual(state1, state2)
def test_saverestore(self):
N = 1000
self.gen.seed()
state = self.gen.getstate()
randseq = self.randomlist(N)
self.gen.setstate(state) # should regenerate the same sequence
self.assertEqual(randseq, self.randomlist(N))
def test_seedargs(self):
# Seed value with a negative hash.
class MySeed(object):
def __hash__(self):
return -1729
for arg in [None, 0, 0, 1, 1, -1, -1, 10**20, -(10**20),
3.14, 1+2j, 'a', tuple('abc'), MySeed()]:
self.gen.seed(arg)
for arg in [list(range(3)), dict(one=1)]:
self.assertRaises(TypeError, self.gen.seed, arg)
self.assertRaises(TypeError, self.gen.seed, 1, 2, 3, 4)
self.assertRaises(TypeError, type(self.gen), [])
@unittest.mock.patch('random._urandom') # os.urandom
def test_seed_when_randomness_source_not_found(self, urandom_mock):
# Random.seed() uses time.time() when an operating system specific
# randomness source is not found. To test this on machines were it
# exists, run the above test, test_seedargs(), again after mocking
# os.urandom() so that it raises the exception expected when the
# randomness source is not available.
urandom_mock.side_effect = NotImplementedError
self.test_seedargs()
def test_shuffle(self):
shuffle = self.gen.shuffle
lst = []
shuffle(lst)
self.assertEqual(lst, [])
lst = [37]
shuffle(lst)
self.assertEqual(lst, [37])
seqs = [list(range(n)) for n in range(10)]
shuffled_seqs = [list(range(n)) for n in range(10)]
for shuffled_seq in shuffled_seqs:
shuffle(shuffled_seq)
for (seq, shuffled_seq) in zip(seqs, shuffled_seqs):
self.assertEqual(len(seq), len(shuffled_seq))
self.assertEqual(set(seq), set(shuffled_seq))
# The above tests all would pass if the shuffle was a
# no-op. The following non-deterministic test covers that. It
# asserts that the shuffled sequence of 1000 distinct elements
# must be different from the original one. Although there is
# mathematically a non-zero probability that this could
# actually happen in a genuinely random shuffle, it is
# completely negligible, given that the number of possible
# permutations of 1000 objects is 1000! (factorial of 1000),
# which is considerably larger than the number of atoms in the
# universe...
lst = list(range(1000))
shuffled_lst = list(range(1000))
shuffle(shuffled_lst)
self.assertTrue(lst != shuffled_lst)
shuffle(lst)
self.assertTrue(lst != shuffled_lst)
def test_choice(self):
choice = self.gen.choice
with self.assertRaises(IndexError):
choice([])
self.assertEqual(choice([50]), 50)
self.assertIn(choice([25, 75]), [25, 75])
def test_sample(self):
# For the entire allowable range of 0 <= k <= N, validate that
# the sample is of the correct length and contains only unique items
N = 100
population = range(N)
for k in range(N+1):
s = self.gen.sample(population, k)
self.assertEqual(len(s), k)
uniq = set(s)
self.assertEqual(len(uniq), k)
self.assertTrue(uniq <= set(population))
self.assertEqual(self.gen.sample([], 0), []) # test edge case N==k==0
# Exception raised if size of sample exceeds that of population
self.assertRaises(ValueError, self.gen.sample, population, N+1)
self.assertRaises(ValueError, self.gen.sample, [], -1)
def test_sample_distribution(self):
# For the entire allowable range of 0 <= k <= N, validate that
# sample generates all possible permutations
n = 5
pop = range(n)
trials = 10000 # large num prevents false negatives without slowing normal case
def factorial(n):
if n == 0:
return 1
return n * factorial(n - 1)
for k in range(n):
expected = factorial(n) // factorial(n-k)
perms = {}
for i in range(trials):
perms[tuple(self.gen.sample(pop, k))] = None
if len(perms) == expected:
break
else:
self.fail()
def test_sample_inputs(self):
# SF bug #801342 -- population can be any iterable defining __len__()
self.gen.sample(set(range(20)), 2)
self.gen.sample(range(20), 2)
self.gen.sample(range(20), 2)
self.gen.sample(str('abcdefghijklmnopqrst'), 2)
self.gen.sample(tuple('abcdefghijklmnopqrst'), 2)
def test_sample_on_dicts(self):
self.assertRaises(TypeError, self.gen.sample, dict.fromkeys('abcdef'), 2)
def test_choices(self):
choices = self.gen.choices
data = ['red', 'green', 'blue', 'yellow']
str_data = 'abcd'
range_data = range(4)
set_data = set(range(4))
# basic functionality
for sample in [
choices(data, k=5),
choices(data, range(4), k=5),
choices(k=5, population=data, weights=range(4)),
choices(k=5, population=data, cum_weights=range(4)),
]:
self.assertEqual(len(sample), 5)
self.assertEqual(type(sample), list)
self.assertTrue(set(sample) <= set(data))
# test argument handling
with self.assertRaises(TypeError): # missing arguments
choices(2)
self.assertEqual(choices(data, k=0), []) # k == 0
self.assertEqual(choices(data, k=-1), []) # negative k behaves like ``[0] * -1``
with self.assertRaises(TypeError):
choices(data, k=2.5) # k is a float
self.assertTrue(set(choices(str_data, k=5)) <= set(str_data)) # population is a string sequence
self.assertTrue(set(choices(range_data, k=5)) <= set(range_data)) # population is a range
with self.assertRaises(TypeError):
choices(set_data, k=2) # population is not a sequence
self.assertTrue(set(choices(data, None, k=5)) <= set(data)) # weights is None
self.assertTrue(set(choices(data, weights=None, k=5)) <= set(data))
with self.assertRaises(ValueError):
choices(data, [1,2], k=5) # len(weights) != len(population)
with self.assertRaises(TypeError):
choices(data, 10, k=5) # non-iterable weights
with self.assertRaises(TypeError):
choices(data, [None]*4, k=5) # non-numeric weights
for weights in [
[15, 10, 25, 30], # integer weights
[15.1, 10.2, 25.2, 30.3], # float weights
[Fraction(1, 3), Fraction(2, 6), Fraction(3, 6), Fraction(4, 6)], # fractional weights
[True, False, True, False] # booleans (include / exclude)
]:
self.assertTrue(set(choices(data, weights, k=5)) <= set(data))
with self.assertRaises(ValueError):
choices(data, cum_weights=[1,2], k=5) # len(weights) != len(population)
with self.assertRaises(TypeError):
choices(data, cum_weights=10, k=5) # non-iterable cum_weights
with self.assertRaises(TypeError):
choices(data, cum_weights=[None]*4, k=5) # non-numeric cum_weights
with self.assertRaises(TypeError):
choices(data, range(4), cum_weights=range(4), k=5) # both weights and cum_weights
for weights in [
[15, 10, 25, 30], # integer cum_weights
[15.1, 10.2, 25.2, 30.3], # float cum_weights
[Fraction(1, 3), Fraction(2, 6), Fraction(3, 6), Fraction(4, 6)], # fractional cum_weights
]:
self.assertTrue(set(choices(data, cum_weights=weights, k=5)) <= set(data))
# Test weight focused on a single element of the population
self.assertEqual(choices('abcd', [1, 0, 0, 0]), ['a'])
self.assertEqual(choices('abcd', [0, 1, 0, 0]), ['b'])
self.assertEqual(choices('abcd', [0, 0, 1, 0]), ['c'])
self.assertEqual(choices('abcd', [0, 0, 0, 1]), ['d'])
# Test consistency with random.choice() for empty population
with self.assertRaises(IndexError):
choices([], k=1)
with self.assertRaises(IndexError):
choices([], weights=[], k=1)
with self.assertRaises(IndexError):
choices([], cum_weights=[], k=5)
def test_choices_subnormal(self):
# Subnormal weights would occassionally trigger an IndexError
# in choices() when the value returned by random() was large
# enough to make `random() * total` round up to the total.
# See https://bugs.python.org/msg275594 for more detail.
choices = self.gen.choices
choices(population=[1, 2], weights=[1e-323, 1e-323], k=5000)
def test_gauss(self):
# Ensure that the seed() method initializes all the hidden state. In
# particular, through 2.2.1 it failed to reset a piece of state used
# by (and only by) the .gauss() method.
for seed in 1, 12, 123, 1234, 12345, 123456, 654321:
self.gen.seed(seed)
x1 = self.gen.random()
y1 = self.gen.gauss(0, 1)
self.gen.seed(seed)
x2 = self.gen.random()
y2 = self.gen.gauss(0, 1)
self.assertEqual(x1, x2)
self.assertEqual(y1, y2)
def test_pickling(self):
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
state = pickle.dumps(self.gen, proto)
origseq = [self.gen.random() for i in range(10)]
newgen = pickle.loads(state)
restoredseq = [newgen.random() for i in range(10)]
self.assertEqual(origseq, restoredseq)
def test_bug_1727780(self):
# verify that version-2-pickles can be loaded
# fine, whether they are created on 32-bit or 64-bit
# platforms, and that version-3-pickles load fine.
files = [("randv2_32.pck", 780),
("randv2_64.pck", 866),
("randv3.pck", 343)]
for file, value in files:
f = open(support.findfile(file),"rb")
r = pickle.load(f)
f.close()
self.assertEqual(int(r.random()*1000), value)
def test_bug_9025(self):
# Had problem with an uneven distribution in int(n*random())
# Verify the fix by checking that distributions fall within expectations.
n = 100000
randrange = self.gen.randrange
k = sum(randrange(6755399441055744) % 3 == 2 for i in range(n))
self.assertTrue(0.30 < k/n < .37, (k/n))
try:
random.SystemRandom().random()
except NotImplementedError:
SystemRandom_available = False
else:
SystemRandom_available = True
@unittest.skipUnless(SystemRandom_available, "random.SystemRandom not available")
class SystemRandom_TestBasicOps(TestBasicOps, unittest.TestCase):
gen = random.SystemRandom()
def test_autoseed(self):
# Doesn't need to do anything except not fail
self.gen.seed()
def test_saverestore(self):
self.assertRaises(NotImplementedError, self.gen.getstate)
self.assertRaises(NotImplementedError, self.gen.setstate, None)
def test_seedargs(self):
# Doesn't need to do anything except not fail
self.gen.seed(100)
def test_gauss(self):
self.gen.gauss_next = None
self.gen.seed(100)
self.assertEqual(self.gen.gauss_next, None)
def test_pickling(self):
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
self.assertRaises(NotImplementedError, pickle.dumps, self.gen, proto)
def test_53_bits_per_float(self):
# This should pass whenever a C double has 53 bit precision.
span = 2 ** 53
cum = 0
for i in range(100):
cum |= int(self.gen.random() * span)
self.assertEqual(cum, span-1)
def test_bigrand(self):
# The randrange routine should build-up the required number of bits
# in stages so that all bit positions are active.
span = 2 ** 500
cum = 0
for i in range(100):
r = self.gen.randrange(span)
self.assertTrue(0 <= r < span)
cum |= r
self.assertEqual(cum, span-1)
def test_bigrand_ranges(self):
for i in [40,80, 160, 200, 211, 250, 375, 512, 550]:
start = self.gen.randrange(2 ** (i-2))
stop = self.gen.randrange(2 ** i)
if stop <= start:
continue
self.assertTrue(start <= self.gen.randrange(start, stop) < stop)
def test_rangelimits(self):
for start, stop in [(-2,0), (-(2**60)-2,-(2**60)), (2**60,2**60+2)]:
self.assertEqual(set(range(start,stop)),
set([self.gen.randrange(start,stop) for i in range(100)]))
def test_randrange_nonunit_step(self):
rint = self.gen.randrange(0, 10, 2)
self.assertIn(rint, (0, 2, 4, 6, 8))
rint = self.gen.randrange(0, 2, 2)
self.assertEqual(rint, 0)
def test_randrange_errors(self):
raises = partial(self.assertRaises, ValueError, self.gen.randrange)
# Empty range
raises(3, 3)
raises(-721)
raises(0, 100, -12)
# Non-integer start/stop
raises(3.14159)
raises(0, 2.71828)
# Zero and non-integer step
raises(0, 42, 0)
raises(0, 42, 3.14159)
def test_genrandbits(self):
# Verify ranges
for k in range(1, 1000):
self.assertTrue(0 <= self.gen.getrandbits(k) < 2**k)
# Verify all bits active
getbits = self.gen.getrandbits
for span in [1, 2, 3, 4, 31, 32, 32, 52, 53, 54, 119, 127, 128, 129]:
cum = 0
for i in range(100):
cum |= getbits(span)
self.assertEqual(cum, 2**span-1)
# Verify argument checking
self.assertRaises(TypeError, self.gen.getrandbits)
self.assertRaises(TypeError, self.gen.getrandbits, 1, 2)
self.assertRaises(ValueError, self.gen.getrandbits, 0)
self.assertRaises(ValueError, self.gen.getrandbits, -1)
self.assertRaises(TypeError, self.gen.getrandbits, 10.1)
def test_randbelow_logic(self, _log=log, int=int):
# check bitcount transition points: 2**i and 2**(i+1)-1
# show that: k = int(1.001 + _log(n, 2))
# is equal to or one greater than the number of bits in n
for i in range(1, 1000):
n = 1 << i # check an exact power of two
numbits = i+1
k = int(1.00001 + _log(n, 2))
self.assertEqual(k, numbits)
self.assertEqual(n, 2**(k-1))
n += n - 1 # check 1 below the next power of two
k = int(1.00001 + _log(n, 2))
self.assertIn(k, [numbits, numbits+1])
self.assertTrue(2**k > n > 2**(k-2))
n -= n >> 15 # check a little farther below the next power of two
k = int(1.00001 + _log(n, 2))
self.assertEqual(k, numbits) # note the stronger assertion
self.assertTrue(2**k > n > 2**(k-1)) # note the stronger assertion
class MersenneTwister_TestBasicOps(TestBasicOps, unittest.TestCase):
gen = random.Random()
def test_guaranteed_stable(self):
# These sequences are guaranteed to stay the same across versions of python
self.gen.seed(3456147, version=1)
self.assertEqual([self.gen.random().hex() for i in range(4)],
['0x1.ac362300d90d2p-1', '0x1.9d16f74365005p-1',
'0x1.1ebb4352e4c4dp-1', '0x1.1a7422abf9c11p-1'])
self.gen.seed("the quick brown fox", version=2)
self.assertEqual([self.gen.random().hex() for i in range(4)],
['0x1.1239ddfb11b7cp-3', '0x1.b3cbb5c51b120p-4',
'0x1.8c4f55116b60fp-1', '0x1.63eb525174a27p-1'])
def test_bug_27706(self):
# Verify that version 1 seeds are unaffected by hash randomization
self.gen.seed('nofar', version=1) # hash('nofar') == 5990528763808513177
self.assertEqual([self.gen.random().hex() for i in range(4)],
['0x1.8645314505ad7p-1', '0x1.afb1f82e40a40p-5',
'0x1.2a59d2285e971p-1', '0x1.56977142a7880p-6'])
self.gen.seed('rachel', version=1) # hash('rachel') == -9091735575445484789
self.assertEqual([self.gen.random().hex() for i in range(4)],
['0x1.0b294cc856fcdp-1', '0x1.2ad22d79e77b8p-3',
'0x1.3052b9c072678p-2', '0x1.578f332106574p-3'])
self.gen.seed('', version=1) # hash('') == 0
self.assertEqual([self.gen.random().hex() for i in range(4)],
['0x1.b0580f98a7dbep-1', '0x1.84129978f9c1ap-1',
'0x1.aeaa51052e978p-2', '0x1.092178fb945a6p-2'])
def test_bug_31478(self):
# There shouldn't be an assertion failure in _random.Random.seed() in
# case the argument has a bad __abs__() method.
class BadInt(int):
def __abs__(self):
return None
try:
self.gen.seed(BadInt())
except TypeError:
pass
def test_bug_31482(self):
# Verify that version 1 seeds are unaffected by hash randomization
# when the seeds are expressed as bytes rather than strings.
# The hash(b) values listed are the Python2.7 hash() values
# which were used for seeding.
self.gen.seed(b'nofar', version=1) # hash('nofar') == 5990528763808513177
self.assertEqual([self.gen.random().hex() for i in range(4)],
['0x1.8645314505ad7p-1', '0x1.afb1f82e40a40p-5',
'0x1.2a59d2285e971p-1', '0x1.56977142a7880p-6'])
self.gen.seed(b'rachel', version=1) # hash('rachel') == -9091735575445484789
self.assertEqual([self.gen.random().hex() for i in range(4)],
['0x1.0b294cc856fcdp-1', '0x1.2ad22d79e77b8p-3',
'0x1.3052b9c072678p-2', '0x1.578f332106574p-3'])
self.gen.seed(b'', version=1) # hash('') == 0
self.assertEqual([self.gen.random().hex() for i in range(4)],
['0x1.b0580f98a7dbep-1', '0x1.84129978f9c1ap-1',
'0x1.aeaa51052e978p-2', '0x1.092178fb945a6p-2'])
b = b'\x00\x20\x40\x60\x80\xA0\xC0\xE0\xF0'
self.gen.seed(b, version=1) # hash(b) == 5015594239749365497
self.assertEqual([self.gen.random().hex() for i in range(4)],
['0x1.52c2fde444d23p-1', '0x1.875174f0daea4p-2',
'0x1.9e9b2c50e5cd2p-1', '0x1.fa57768bd321cp-2'])
def test_setstate_first_arg(self):
self.assertRaises(ValueError, self.gen.setstate, (1, None, None))
def test_setstate_middle_arg(self):
start_state = self.gen.getstate()
# Wrong type, s/b tuple
self.assertRaises(TypeError, self.gen.setstate, (2, None, None))
# Wrong length, s/b 625
self.assertRaises(ValueError, self.gen.setstate, (2, (1,2,3), None))
# Wrong type, s/b tuple of 625 ints
self.assertRaises(TypeError, self.gen.setstate, (2, ('a',)*625, None))
# Last element s/b an int also
self.assertRaises(TypeError, self.gen.setstate, (2, (0,)*624+('a',), None))
# Last element s/b between 0 and 624
with self.assertRaises((ValueError, OverflowError)):
self.gen.setstate((2, (1,)*624+(625,), None))
with self.assertRaises((ValueError, OverflowError)):
self.gen.setstate((2, (1,)*624+(-1,), None))
# Failed calls to setstate() should not have changed the state.
bits100 = self.gen.getrandbits(100)
self.gen.setstate(start_state)
self.assertEqual(self.gen.getrandbits(100), bits100)
# Little trick to make "tuple(x % (2**32) for x in internalstate)"
# raise ValueError. I cannot think of a simple way to achieve this, so
# I am opting for using a generator as the middle argument of setstate
# which attempts to cast a NaN to integer.
state_values = self.gen.getstate()[1]
state_values = list(state_values)
state_values[-1] = float('nan')
state = (int(x) for x in state_values)
self.assertRaises(TypeError, self.gen.setstate, (2, state, None))
def test_referenceImplementation(self):
# Compare the python implementation with results from the original
# code. Create 2000 53-bit precision random floats. Compare only
# the last ten entries to show that the independent implementations
# are tracking. Here is the main() function needed to create the
# list of expected random numbers:
# void main(void){
# int i;
# unsigned long init[4]={61731, 24903, 614, 42143}, length=4;
# init_by_array(init, length);
# for (i=0; i<2000; i++) {
# printf("%.15f ", genrand_res53());
# if (i%5==4) printf("\n");
# }
# }
expected = [0.45839803073713259,
0.86057815201978782,
0.92848331726782152,
0.35932681119782461,
0.081823493762449573,
0.14332226470169329,
0.084297823823520024,
0.53814864671831453,
0.089215024911993401,
0.78486196105372907]
self.gen.seed(61731 + (24903<<32) + (614<<64) + (42143<<96))
actual = self.randomlist(2000)[-10:]
for a, e in zip(actual, expected):
self.assertAlmostEqual(a,e,places=14)
def test_strong_reference_implementation(self):
# Like test_referenceImplementation, but checks for exact bit-level
# equality. This should pass on any box where C double contains
# at least 53 bits of precision (the underlying algorithm suffers
# no rounding errors -- all results are exact).
from math import ldexp
expected = [0x0eab3258d2231f,
0x1b89db315277a5,
0x1db622a5518016,
0x0b7f9af0d575bf,
0x029e4c4db82240,
0x04961892f5d673,
0x02b291598e4589,
0x11388382c15694,
0x02dad977c9e1fe,
0x191d96d4d334c6]
self.gen.seed(61731 + (24903<<32) + (614<<64) + (42143<<96))
actual = self.randomlist(2000)[-10:]
for a, e in zip(actual, expected):
self.assertEqual(int(ldexp(a, 53)), e)
def test_long_seed(self):
# This is most interesting to run in debug mode, just to make sure
# nothing blows up. Under the covers, a dynamically resized array
# is allocated, consuming space proportional to the number of bits
# in the seed. Unfortunately, that's a quadratic-time algorithm,
# so don't make this horribly big.
seed = (1 << (10000 * 8)) - 1 # about 10K bytes
self.gen.seed(seed)
def test_53_bits_per_float(self):
# This should pass whenever a C double has 53 bit precision.
span = 2 ** 53
cum = 0
for i in range(100):
cum |= int(self.gen.random() * span)
self.assertEqual(cum, span-1)
def test_bigrand(self):
# The randrange routine should build-up the required number of bits
# in stages so that all bit positions are active.
span = 2 ** 500
cum = 0
for i in range(100):
r = self.gen.randrange(span)
self.assertTrue(0 <= r < span)
cum |= r
self.assertEqual(cum, span-1)
def test_bigrand_ranges(self):
for i in [40,80, 160, 200, 211, 250, 375, 512, 550]:
start = self.gen.randrange(2 ** (i-2))
stop = self.gen.randrange(2 ** i)
if stop <= start:
continue
self.assertTrue(start <= self.gen.randrange(start, stop) < stop)
def test_rangelimits(self):
for start, stop in [(-2,0), (-(2**60)-2,-(2**60)), (2**60,2**60+2)]:
self.assertEqual(set(range(start,stop)),
set([self.gen.randrange(start,stop) for i in range(100)]))
def test_genrandbits(self):
# Verify cross-platform repeatability
self.gen.seed(1234567)
self.assertEqual(self.gen.getrandbits(100),
97904845777343510404718956115)
# Verify ranges
for k in range(1, 1000):
self.assertTrue(0 <= self.gen.getrandbits(k) < 2**k)
# Verify all bits active
getbits = self.gen.getrandbits
for span in [1, 2, 3, 4, 31, 32, 32, 52, 53, 54, 119, 127, 128, 129]:
cum = 0
for i in range(100):
cum |= getbits(span)
self.assertEqual(cum, 2**span-1)
# Verify argument checking
self.assertRaises(TypeError, self.gen.getrandbits)
self.assertRaises(TypeError, self.gen.getrandbits, 'a')
self.assertRaises(TypeError, self.gen.getrandbits, 1, 2)
self.assertRaises(ValueError, self.gen.getrandbits, 0)
self.assertRaises(ValueError, self.gen.getrandbits, -1)
def test_randbelow_logic(self, _log=log, int=int):
# check bitcount transition points: 2**i and 2**(i+1)-1
# show that: k = int(1.001 + _log(n, 2))
# is equal to or one greater than the number of bits in n
for i in range(1, 1000):
n = 1 << i # check an exact power of two
numbits = i+1
k = int(1.00001 + _log(n, 2))
self.assertEqual(k, numbits)
self.assertEqual(n, 2**(k-1))
n += n - 1 # check 1 below the next power of two
k = int(1.00001 + _log(n, 2))
self.assertIn(k, [numbits, numbits+1])
self.assertTrue(2**k > n > 2**(k-2))
n -= n >> 15 # check a little farther below the next power of two
k = int(1.00001 + _log(n, 2))
self.assertEqual(k, numbits) # note the stronger assertion
self.assertTrue(2**k > n > 2**(k-1)) # note the stronger assertion
@unittest.mock.patch('random.Random.random')
def test_randbelow_overridden_random(self, random_mock):
# Random._randbelow() can only use random() when the built-in one
# has been overridden but no new getrandbits() method was supplied.
random_mock.side_effect = random.SystemRandom().random
maxsize = 1<<random.BPF
with warnings.catch_warnings():
warnings.simplefilter("ignore", UserWarning)
# Population range too large (n >= maxsize)
self.gen._randbelow(maxsize+1, maxsize = maxsize)
self.gen._randbelow(5640, maxsize = maxsize)
# issue 33203: test that _randbelow raises ValueError on
# n == 0 also in its getrandbits-independent branch.
with self.assertRaises(ValueError):
self.gen._randbelow(0, maxsize=maxsize)
# This might be going too far to test a single line, but because of our
# noble aim of achieving 100% test coverage we need to write a case in
# which the following line in Random._randbelow() gets executed:
#
# rem = maxsize % n
# limit = (maxsize - rem) / maxsize
# r = random()
# while r >= limit:
# r = random() # <== *This line* <==<
#
# Therefore, to guarantee that the while loop is executed at least
# once, we need to mock random() so that it returns a number greater
# than 'limit' the first time it gets called.
n = 42
epsilon = 0.01
limit = (maxsize - (maxsize % n)) / maxsize
random_mock.side_effect = [limit + epsilon, limit - epsilon]
self.gen._randbelow(n, maxsize = maxsize)
def test_randrange_bug_1590891(self):
start = 1000000000000
stop = -100000000000000000000
step = -200
x = self.gen.randrange(start, stop, step)
self.assertTrue(stop < x <= start)
self.assertEqual((x+stop)%step, 0)
def test_choices_algorithms(self):
# The various ways of specifying weights should produce the same results
choices = self.gen.choices
n = 104729
self.gen.seed(8675309)
a = self.gen.choices(range(n), k=10000)
self.gen.seed(8675309)
b = self.gen.choices(range(n), [1]*n, k=10000)
self.assertEqual(a, b)
self.gen.seed(8675309)
c = self.gen.choices(range(n), cum_weights=range(1, n+1), k=10000)
self.assertEqual(a, c)
# Amerian Roulette
population = ['Red', 'Black', 'Green']
weights = [18, 18, 2]
cum_weights = [18, 36, 38]
expanded_population = ['Red'] * 18 + ['Black'] * 18 + ['Green'] * 2
self.gen.seed(9035768)
a = self.gen.choices(expanded_population, k=10000)
self.gen.seed(9035768)
b = self.gen.choices(population, weights, k=10000)
self.assertEqual(a, b)
self.gen.seed(9035768)
c = self.gen.choices(population, cum_weights=cum_weights, k=10000)
self.assertEqual(a, c)
def gamma(z, sqrt2pi=(2.0*pi)**0.5):
# Reflection to right half of complex plane
if z < 0.5:
return pi / sin(pi*z) / gamma(1.0-z)
# Lanczos approximation with g=7
az = z + (7.0 - 0.5)
return az ** (z-0.5) / exp(az) * sqrt2pi * fsum([
0.9999999999995183,
676.5203681218835 / z,
-1259.139216722289 / (z+1.0),
771.3234287757674 / (z+2.0),
-176.6150291498386 / (z+3.0),
12.50734324009056 / (z+4.0),
-0.1385710331296526 / (z+5.0),
0.9934937113930748e-05 / (z+6.0),
0.1659470187408462e-06 / (z+7.0),
])
class TestDistributions(unittest.TestCase):
def test_zeroinputs(self):
# Verify that distributions can handle a series of zero inputs'
g = random.Random()
x = [g.random() for i in range(50)] + [0.0]*5
g.random = x[:].pop; g.uniform(1,10)
g.random = x[:].pop; g.paretovariate(1.0)
g.random = x[:].pop; g.expovariate(1.0)
g.random = x[:].pop; g.weibullvariate(1.0, 1.0)
g.random = x[:].pop; g.vonmisesvariate(1.0, 1.0)
g.random = x[:].pop; g.normalvariate(0.0, 1.0)
g.random = x[:].pop; g.gauss(0.0, 1.0)
g.random = x[:].pop; g.lognormvariate(0.0, 1.0)
g.random = x[:].pop; g.vonmisesvariate(0.0, 1.0)
g.random = x[:].pop; g.gammavariate(0.01, 1.0)
g.random = x[:].pop; g.gammavariate(1.0, 1.0)
g.random = x[:].pop; g.gammavariate(200.0, 1.0)
g.random = x[:].pop; g.betavariate(3.0, 3.0)
g.random = x[:].pop; g.triangular(0.0, 1.0, 1.0/3.0)
def test_avg_std(self):
# Use integration to test distribution average and standard deviation.
# Only works for distributions which do not consume variates in pairs
g = random.Random()
N = 5000
x = [i/float(N) for i in range(1,N)]
for variate, args, mu, sigmasqrd in [
(g.uniform, (1.0,10.0), (10.0+1.0)/2, (10.0-1.0)**2/12),
(g.triangular, (0.0, 1.0, 1.0/3.0), 4.0/9.0, 7.0/9.0/18.0),
(g.expovariate, (1.5,), 1/1.5, 1/1.5**2),
(g.vonmisesvariate, (1.23, 0), pi, pi**2/3),
(g.paretovariate, (5.0,), 5.0/(5.0-1),
5.0/((5.0-1)**2*(5.0-2))),
(g.weibullvariate, (1.0, 3.0), gamma(1+1/3.0),
gamma(1+2/3.0)-gamma(1+1/3.0)**2) ]:
g.random = x[:].pop
y = []
for i in range(len(x)):
try:
y.append(variate(*args))
except IndexError:
pass
s1 = s2 = 0
for e in y:
s1 += e
s2 += (e - mu) ** 2
N = len(y)
self.assertAlmostEqual(s1/N, mu, places=2,
msg='%s%r' % (variate.__name__, args))
self.assertAlmostEqual(s2/(N-1), sigmasqrd, places=2,
msg='%s%r' % (variate.__name__, args))
def test_constant(self):
g = random.Random()
N = 100
for variate, args, expected in [
(g.uniform, (10.0, 10.0), 10.0),
(g.triangular, (10.0, 10.0), 10.0),
(g.triangular, (10.0, 10.0, 10.0), 10.0),
(g.expovariate, (float('inf'),), 0.0),
(g.vonmisesvariate, (3.0, float('inf')), 3.0),
(g.gauss, (10.0, 0.0), 10.0),
(g.lognormvariate, (0.0, 0.0), 1.0),
(g.lognormvariate, (-float('inf'), 0.0), 0.0),
(g.normalvariate, (10.0, 0.0), 10.0),
(g.paretovariate, (float('inf'),), 1.0),
(g.weibullvariate, (10.0, float('inf')), 10.0),
(g.weibullvariate, (0.0, 10.0), 0.0),
]:
for i in range(N):
self.assertEqual(variate(*args), expected)
def test_von_mises_range(self):
# Issue 17149: von mises variates were not consistently in the
# range [0, 2*PI].
g = random.Random()
N = 100
for mu in 0.0, 0.1, 3.1, 6.2:
for kappa in 0.0, 2.3, 500.0:
for _ in range(N):
sample = g.vonmisesvariate(mu, kappa)
self.assertTrue(
0 <= sample <= random.TWOPI,
msg=("vonmisesvariate({}, {}) produced a result {} out"
" of range [0, 2*pi]").format(mu, kappa, sample))
def test_von_mises_large_kappa(self):
# Issue #17141: vonmisesvariate() was hang for large kappas
random.vonmisesvariate(0, 1e15)
random.vonmisesvariate(0, 1e100)
def test_gammavariate_errors(self):
# Both alpha and beta must be > 0.0
self.assertRaises(ValueError, random.gammavariate, -1, 3)
self.assertRaises(ValueError, random.gammavariate, 0, 2)
self.assertRaises(ValueError, random.gammavariate, 2, 0)
self.assertRaises(ValueError, random.gammavariate, 1, -3)
@unittest.mock.patch('random.Random.random')
def test_gammavariate_full_code_coverage(self, random_mock):
# There are three different possibilities in the current implementation
# of random.gammavariate(), depending on the value of 'alpha'. What we
# are going to do here is to fix the values returned by random() to
# generate test cases that provide 100% line coverage of the method.
# #1: alpha > 1.0: we want the first random number to be outside the
# [1e-7, .9999999] range, so that the continue statement executes
# once. The values of u1 and u2 will be 0.5 and 0.3, respectively.
random_mock.side_effect = [1e-8, 0.5, 0.3]
returned_value = random.gammavariate(1.1, 2.3)
self.assertAlmostEqual(returned_value, 2.53)
# #2: alpha == 1: first random number less than 1e-7 to that the body
# of the while loop executes once. Then random.random() returns 0.45,
# which causes while to stop looping and the algorithm to terminate.
random_mock.side_effect = [1e-8, 0.45]
returned_value = random.gammavariate(1.0, 3.14)
self.assertAlmostEqual(returned_value, 2.507314166123803)
# #3: 0 < alpha < 1. This is the most complex region of code to cover,
# as there are multiple if-else statements. Let's take a look at the
# source code, and determine the values that we need accordingly:
#
# while 1:
# u = random()
# b = (_e + alpha)/_e
# p = b*u
# if p <= 1.0: # <=== (A)
# x = p ** (1.0/alpha)
# else: # <=== (B)
# x = -_log((b-p)/alpha)
# u1 = random()
# if p > 1.0: # <=== (C)
# if u1 <= x ** (alpha - 1.0): # <=== (D)
# break
# elif u1 <= _exp(-x): # <=== (E)
# break
# return x * beta
#
# First, we want (A) to be True. For that we need that:
# b*random() <= 1.0
# r1 = random() <= 1.0 / b
#
# We now get to the second if-else branch, and here, since p <= 1.0,
# (C) is False and we take the elif branch, (E). For it to be True,
# so that the break is executed, we need that:
# r2 = random() <= _exp(-x)
# r2 <= _exp(-(p ** (1.0/alpha)))
# r2 <= _exp(-((b*r1) ** (1.0/alpha)))
_e = random._e
_exp = random._exp
_log = random._log
alpha = 0.35
beta = 1.45
b = (_e + alpha)/_e
epsilon = 0.01
r1 = 0.8859296441566 # 1.0 / b
r2 = 0.3678794411714 # _exp(-((b*r1) ** (1.0/alpha)))
# These four "random" values result in the following trace:
# (A) True, (E) False --> [next iteration of while]
# (A) True, (E) True --> [while loop breaks]
random_mock.side_effect = [r1, r2 + epsilon, r1, r2]
returned_value = random.gammavariate(alpha, beta)
self.assertAlmostEqual(returned_value, 1.4499999999997544)
# Let's now make (A) be False. If this is the case, when we get to the
# second if-else 'p' is greater than 1, so (C) evaluates to True. We
# now encounter a second if statement, (D), which in order to execute
# must satisfy the following condition:
# r2 <= x ** (alpha - 1.0)
# r2 <= (-_log((b-p)/alpha)) ** (alpha - 1.0)
# r2 <= (-_log((b-(b*r1))/alpha)) ** (alpha - 1.0)
r1 = 0.8959296441566 # (1.0 / b) + epsilon -- so that (A) is False
r2 = 0.9445400408898141
# And these four values result in the following trace:
# (B) and (C) True, (D) False --> [next iteration of while]
# (B) and (C) True, (D) True [while loop breaks]
random_mock.side_effect = [r1, r2 + epsilon, r1, r2]
returned_value = random.gammavariate(alpha, beta)
self.assertAlmostEqual(returned_value, 1.5830349561760781)
@unittest.mock.patch('random.Random.gammavariate')
def test_betavariate_return_zero(self, gammavariate_mock):
# betavariate() returns zero when the Gamma distribution
# that it uses internally returns this same value.
gammavariate_mock.return_value = 0.0
self.assertEqual(0.0, random.betavariate(2.71828, 3.14159))
class TestModule(unittest.TestCase):
def testMagicConstants(self):
self.assertAlmostEqual(random.NV_MAGICCONST, 1.71552776992141)
self.assertAlmostEqual(random.TWOPI, 6.28318530718)
self.assertAlmostEqual(random.LOG4, 1.38629436111989)
self.assertAlmostEqual(random.SG_MAGICCONST, 2.50407739677627)
def test__all__(self):
# tests validity but not completeness of the __all__ list
self.assertTrue(set(random.__all__) <= set(dir(random)))
def test_random_subclass_with_kwargs(self):
# SF bug #1486663 -- this used to erroneously raise a TypeError
class Subclass(random.Random):
def __init__(self, newarg=None):
random.Random.__init__(self)
Subclass(newarg=1)
if __name__ == "__main__":
unittest.main()
| 41,043 | 951 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_normalization.py | from test.support import open_urlresource
import unittest
from http.client import HTTPException
import sys
from unicodedata import normalize, unidata_version
TESTDATAFILE = "NormalizationTest.txt"
TESTDATAURL = "http://www.pythontest.net/unicode/" + unidata_version + "/" + TESTDATAFILE
def check_version(testfile):
hdr = testfile.readline()
return unidata_version in hdr
class RangeError(Exception):
pass
def NFC(str):
return normalize("NFC", str)
def NFKC(str):
return normalize("NFKC", str)
def NFD(str):
return normalize("NFD", str)
def NFKD(str):
return normalize("NFKD", str)
def unistr(data):
data = [int(x, 16) for x in data.split(" ")]
for x in data:
if x > sys.maxunicode:
raise RangeError
return "".join([chr(x) for x in data])
class NormalizationTest(unittest.TestCase):
def test_main(self):
# Hit the exception early
try:
testdata = open_urlresource(TESTDATAURL, encoding="utf-8",
check=check_version)
except PermissionError:
self.skipTest(f"Permission error when downloading {TESTDATAURL} "
f"into the test data directory")
except (OSError, HTTPException):
self.fail(f"Could not retrieve {TESTDATAURL}")
with testdata:
self.run_normalization_tests(testdata)
def run_normalization_tests(self, testdata):
part = None
part1_data = {}
for line in testdata:
if '#' in line:
line = line.split('#')[0]
line = line.strip()
if not line:
continue
if line.startswith("@Part"):
part = line.split()[0]
continue
try:
c1,c2,c3,c4,c5 = [unistr(x) for x in line.split(';')[:-1]]
except RangeError:
# Skip unsupported characters;
# try at least adding c1 if we are in part1
if part == "@Part1":
try:
c1 = unistr(line.split(';')[0])
except RangeError:
pass
else:
part1_data[c1] = 1
continue
# Perform tests
self.assertTrue(c2 == NFC(c1) == NFC(c2) == NFC(c3), line)
self.assertTrue(c4 == NFC(c4) == NFC(c5), line)
self.assertTrue(c3 == NFD(c1) == NFD(c2) == NFD(c3), line)
self.assertTrue(c5 == NFD(c4) == NFD(c5), line)
self.assertTrue(c4 == NFKC(c1) == NFKC(c2) == \
NFKC(c3) == NFKC(c4) == NFKC(c5),
line)
self.assertTrue(c5 == NFKD(c1) == NFKD(c2) == \
NFKD(c3) == NFKD(c4) == NFKD(c5),
line)
# Record part 1 data
if part == "@Part1":
part1_data[c1] = 1
# Perform tests for all other data
for c in range(sys.maxunicode+1):
X = chr(c)
if X in part1_data:
continue
self.assertTrue(X == NFC(X) == NFD(X) == NFKC(X) == NFKD(X), c)
def test_bug_834676(self):
# Check for bug 834676
normalize('NFC', '\ud55c\uae00')
if __name__ == "__main__":
unittest.main()
| 3,403 | 109 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/CP936.TXT | #
# Name: cp936 to Unicode table
# Unicode version: 2.0
# Table version: 2.01
# Table format: Format A
# Date: 1/7/2000
#
# Contact: [email protected]
#
# General notes: none
#
# Format: Three tab-separated columns
# Column #1 is the cp936 code (in hex)
# Column #2 is the Unicode (in hex as 0xXXXX)
# Column #3 is the Unicode name (follows a comment sign, '#')
#
# The entries are in cp936 order
#
00 0000
01 0001
02 0002
03 0003
04 0004
05 0005
06 0006
07 0007
08 0008
09 0009
0A 000A
0B 000B
0C 000C
0D 000D
0E 000E
0F 000F
10 0010
11 0011
12 0012
13 0013
14 0014
15 0015
16 0016
17 0017
18 0018
19 0019
1A 001A
1B 001B
1C 001C
1D 001D
1E 001E
1F 001F
20 0020
21 0021
22 0022
23 0023
24 0024
25 0025
26 0026
27 0027
28 0028
29 0029
2A 002A
2B 002B
2C 002C
2D 002D
2E 002E
2F 002F
30 0030
31 0031
32 0032
33 0033
34 0034
35 0035
36 0036
37 0037
38 0038
39 0039
3A 003A
3B 003B
3C 003C
3D 003D
3E 003E
3F 003F
40 0040
41 0041
42 0042
43 0043
44 0044
45 0045
46 0046
47 0047
48 0048
49 0049
4A 004A
4B 004B
4C 004C
4D 004D
4E 004E
4F 004F
50 0050
51 0051
52 0052
53 0053
54 0054
55 0055
56 0056
57 0057
58 0058
59 0059
5A 005A
5B 005B
5C 005C
5D 005D
5E 005E
5F 005F
60 0060
61 0061
62 0062
63 0063
64 0064
65 0065
66 0066
67 0067
68 0068
69 0069
6A 006A
6B 006B
6C 006C
6D 006D
6E 006E
6F 006F
70 0070
71 0071
72 0072
73 0073
74 0074
75 0075
76 0076
77 0077
78 0078
79 0079
7A 007A
7B 007B
7C 007C
7D 007D
7E 007E
7F 007F
80 20AC
81
82
83
84
85
86
87
88
89
8A
8B
8C
8D
8E
8F
90
91
92
93
94
95
96
97
98
99
9A
9B
9C
9D
9E
9F
A0
A1
A2
A3
A4
A5
A6
A7
A8
A9
AA
AB
AC
AD
AE
AF
B0
B1
B2
B3
B4
B5
B6
B7
B8
B9
BA
BB
BC
BD
BE
BF
C0
C1
C2
C3
C4
C5
C6
C7
C8
C9
CA
CB
CC
CD
CE
CF
D0
D1
D2
D3
D4
D5
D6
D7
D8
D9
DA
DB
DC
DD
DE
DF
E0
E1
E2
E3
E4
E5
E6
E7
E8
E9
EA
EB
EC
ED
EE
EF
F0
F1
F2
F3
F4
F5
F6
F7
F8
F9
FA
FB
FC
FD
FE
FF
8140 4E02
8141 4E04
8142 4E05
8143 4E06
8144 4E0F
8145 4E12
8146 4E17
8147 4E1F
8148 4E20
8149 4E21
814A 4E23
814B 4E26
814C 4E29
814D 4E2E
814E 4E2F
814F 4E31
8150 4E33
8151 4E35
8152 4E37
8153 4E3C
8154 4E40
8155 4E41
8156 4E42
8157 4E44
8158 4E46
8159 4E4A
815A 4E51
815B 4E55
815C 4E57
815D 4E5A
815E 4E5B
815F 4E62
8160 4E63
8161 4E64
8162 4E65
8163 4E67
8164 4E68
8165 4E6A
8166 4E6B
8167 4E6C
8168 4E6D
8169 4E6E
816A 4E6F
816B 4E72
816C 4E74
816D 4E75
816E 4E76
816F 4E77
8170 4E78
8171 4E79
8172 4E7A
8173 4E7B
8174 4E7C
8175 4E7D
8176 4E7F
8177 4E80
8178 4E81
8179 4E82
817A 4E83
817B 4E84
817C 4E85
817D 4E87
817E 4E8A
8180 4E90
8181 4E96
8182 4E97
8183 4E99
8184 4E9C
8185 4E9D
8186 4E9E
8187 4EA3
8188 4EAA
8189 4EAF
818A 4EB0
818B 4EB1
818C 4EB4
818D 4EB6
818E 4EB7
818F 4EB8
8190 4EB9
8191 4EBC
8192 4EBD
8193 4EBE
8194 4EC8
8195 4ECC
8196 4ECF
8197 4ED0
8198 4ED2
8199 4EDA
819A 4EDB
819B 4EDC
819C 4EE0
819D 4EE2
819E 4EE6
819F 4EE7
81A0 4EE9
81A1 4EED
81A2 4EEE
81A3 4EEF
81A4 4EF1
81A5 4EF4
81A6 4EF8
81A7 4EF9
81A8 4EFA
81A9 4EFC
81AA 4EFE
81AB 4F00
81AC 4F02
81AD 4F03
81AE 4F04
81AF 4F05
81B0 4F06
81B1 4F07
81B2 4F08
81B3 4F0B
81B4 4F0C
81B5 4F12
81B6 4F13
81B7 4F14
81B8 4F15
81B9 4F16
81BA 4F1C
81BB 4F1D
81BC 4F21
81BD 4F23
81BE 4F28
81BF 4F29
81C0 4F2C
81C1 4F2D
81C2 4F2E
81C3 4F31
81C4 4F33
81C5 4F35
81C6 4F37
81C7 4F39
81C8 4F3B
81C9 4F3E
81CA 4F3F
81CB 4F40
81CC 4F41
81CD 4F42
81CE 4F44
81CF 4F45
81D0 4F47
81D1 4F48
81D2 4F49
81D3 4F4A
81D4 4F4B
81D5 4F4C
81D6 4F52
81D7 4F54
81D8 4F56
81D9 4F61
81DA 4F62
81DB 4F66
81DC 4F68
81DD 4F6A
81DE 4F6B
81DF 4F6D
81E0 4F6E
81E1 4F71
81E2 4F72
81E3 4F75
81E4 4F77
81E5 4F78
81E6 4F79
81E7 4F7A
81E8 4F7D
81E9 4F80
81EA 4F81
81EB 4F82
81EC 4F85
81ED 4F86
81EE 4F87
81EF 4F8A
81F0 4F8C
81F1 4F8E
81F2 4F90
81F3 4F92
81F4 4F93
81F5 4F95
81F6 4F96
81F7 4F98
81F8 4F99
81F9 4F9A
81FA 4F9C
81FB 4F9E
81FC 4F9F
81FD 4FA1
81FE 4FA2
8240 4FA4
8241 4FAB
8242 4FAD
8243 4FB0
8244 4FB1
8245 4FB2
8246 4FB3
8247 4FB4
8248 4FB6
8249 4FB7
824A 4FB8
824B 4FB9
824C 4FBA
824D 4FBB
824E 4FBC
824F 4FBD
8250 4FBE
8251 4FC0
8252 4FC1
8253 4FC2
8254 4FC6
8255 4FC7
8256 4FC8
8257 4FC9
8258 4FCB
8259 4FCC
825A 4FCD
825B 4FD2
825C 4FD3
825D 4FD4
825E 4FD5
825F 4FD6
8260 4FD9
8261 4FDB
8262 4FE0
8263 4FE2
8264 4FE4
8265 4FE5
8266 4FE7
8267 4FEB
8268 4FEC
8269 4FF0
826A 4FF2
826B 4FF4
826C 4FF5
826D 4FF6
826E 4FF7
826F 4FF9
8270 4FFB
8271 4FFC
8272 4FFD
8273 4FFF
8274 5000
8275 5001
8276 5002
8277 5003
8278 5004
8279 5005
827A 5006
827B 5007
827C 5008
827D 5009
827E 500A
8280 500B
8281 500E
8282 5010
8283 5011
8284 5013
8285 5015
8286 5016
8287 5017
8288 501B
8289 501D
828A 501E
828B 5020
828C 5022
828D 5023
828E 5024
828F 5027
8290 502B
8291 502F
8292 5030
8293 5031
8294 5032
8295 5033
8296 5034
8297 5035
8298 5036
8299 5037
829A 5038
829B 5039
829C 503B
829D 503D
829E 503F
829F 5040
82A0 5041
82A1 5042
82A2 5044
82A3 5045
82A4 5046
82A5 5049
82A6 504A
82A7 504B
82A8 504D
82A9 5050
82AA 5051
82AB 5052
82AC 5053
82AD 5054
82AE 5056
82AF 5057
82B0 5058
82B1 5059
82B2 505B
82B3 505D
82B4 505E
82B5 505F
82B6 5060
82B7 5061
82B8 5062
82B9 5063
82BA 5064
82BB 5066
82BC 5067
82BD 5068
82BE 5069
82BF 506A
82C0 506B
82C1 506D
82C2 506E
82C3 506F
82C4 5070
82C5 5071
82C6 5072
82C7 5073
82C8 5074
82C9 5075
82CA 5078
82CB 5079
82CC 507A
82CD 507C
82CE 507D
82CF 5081
82D0 5082
82D1 5083
82D2 5084
82D3 5086
82D4 5087
82D5 5089
82D6 508A
82D7 508B
82D8 508C
82D9 508E
82DA 508F
82DB 5090
82DC 5091
82DD 5092
82DE 5093
82DF 5094
82E0 5095
82E1 5096
82E2 5097
82E3 5098
82E4 5099
82E5 509A
82E6 509B
82E7 509C
82E8 509D
82E9 509E
82EA 509F
82EB 50A0
82EC 50A1
82ED 50A2
82EE 50A4
82EF 50A6
82F0 50AA
82F1 50AB
82F2 50AD
82F3 50AE
82F4 50AF
82F5 50B0
82F6 50B1
82F7 50B3
82F8 50B4
82F9 50B5
82FA 50B6
82FB 50B7
82FC 50B8
82FD 50B9
82FE 50BC
8340 50BD
8341 50BE
8342 50BF
8343 50C0
8344 50C1
8345 50C2
8346 50C3
8347 50C4
8348 50C5
8349 50C6
834A 50C7
834B 50C8
834C 50C9
834D 50CA
834E 50CB
834F 50CC
8350 50CD
8351 50CE
8352 50D0
8353 50D1
8354 50D2
8355 50D3
8356 50D4
8357 50D5
8358 50D7
8359 50D8
835A 50D9
835B 50DB
835C 50DC
835D 50DD
835E 50DE
835F 50DF
8360 50E0
8361 50E1
8362 50E2
8363 50E3
8364 50E4
8365 50E5
8366 50E8
8367 50E9
8368 50EA
8369 50EB
836A 50EF
836B 50F0
836C 50F1
836D 50F2
836E 50F4
836F 50F6
8370 50F7
8371 50F8
8372 50F9
8373 50FA
8374 50FC
8375 50FD
8376 50FE
8377 50FF
8378 5100
8379 5101
837A 5102
837B 5103
837C 5104
837D 5105
837E 5108
8380 5109
8381 510A
8382 510C
8383 510D
8384 510E
8385 510F
8386 5110
8387 5111
8388 5113
8389 5114
838A 5115
838B 5116
838C 5117
838D 5118
838E 5119
838F 511A
8390 511B
8391 511C
8392 511D
8393 511E
8394 511F
8395 5120
8396 5122
8397 5123
8398 5124
8399 5125
839A 5126
839B 5127
839C 5128
839D 5129
839E 512A
839F 512B
83A0 512C
83A1 512D
83A2 512E
83A3 512F
83A4 5130
83A5 5131
83A6 5132
83A7 5133
83A8 5134
83A9 5135
83AA 5136
83AB 5137
83AC 5138
83AD 5139
83AE 513A
83AF 513B
83B0 513C
83B1 513D
83B2 513E
83B3 5142
83B4 5147
83B5 514A
83B6 514C
83B7 514E
83B8 514F
83B9 5150
83BA 5152
83BB 5153
83BC 5157
83BD 5158
83BE 5159
83BF 515B
83C0 515D
83C1 515E
83C2 515F
83C3 5160
83C4 5161
83C5 5163
83C6 5164
83C7 5166
83C8 5167
83C9 5169
83CA 516A
83CB 516F
83CC 5172
83CD 517A
83CE 517E
83CF 517F
83D0 5183
83D1 5184
83D2 5186
83D3 5187
83D4 518A
83D5 518B
83D6 518E
83D7 518F
83D8 5190
83D9 5191
83DA 5193
83DB 5194
83DC 5198
83DD 519A
83DE 519D
83DF 519E
83E0 519F
83E1 51A1
83E2 51A3
83E3 51A6
83E4 51A7
83E5 51A8
83E6 51A9
83E7 51AA
83E8 51AD
83E9 51AE
83EA 51B4
83EB 51B8
83EC 51B9
83ED 51BA
83EE 51BE
83EF 51BF
83F0 51C1
83F1 51C2
83F2 51C3
83F3 51C5
83F4 51C8
83F5 51CA
83F6 51CD
83F7 51CE
83F8 51D0
83F9 51D2
83FA 51D3
83FB 51D4
83FC 51D5
83FD 51D6
83FE 51D7
8440 51D8
8441 51D9
8442 51DA
8443 51DC
8444 51DE
8445 51DF
8446 51E2
8447 51E3
8448 51E5
8449 51E6
844A 51E7
844B 51E8
844C 51E9
844D 51EA
844E 51EC
844F 51EE
8450 51F1
8451 51F2
8452 51F4
8453 51F7
8454 51FE
8455 5204
8456 5205
8457 5209
8458 520B
8459 520C
845A 520F
845B 5210
845C 5213
845D 5214
845E 5215
845F 521C
8460 521E
8461 521F
8462 5221
8463 5222
8464 5223
8465 5225
8466 5226
8467 5227
8468 522A
8469 522C
846A 522F
846B 5231
846C 5232
846D 5234
846E 5235
846F 523C
8470 523E
8471 5244
8472 5245
8473 5246
8474 5247
8475 5248
8476 5249
8477 524B
8478 524E
8479 524F
847A 5252
847B 5253
847C 5255
847D 5257
847E 5258
8480 5259
8481 525A
8482 525B
8483 525D
8484 525F
8485 5260
8486 5262
8487 5263
8488 5264
8489 5266
848A 5268
848B 526B
848C 526C
848D 526D
848E 526E
848F 5270
8490 5271
8491 5273
8492 5274
8493 5275
8494 5276
8495 5277
8496 5278
8497 5279
8498 527A
8499 527B
849A 527C
849B 527E
849C 5280
849D 5283
849E 5284
849F 5285
84A0 5286
84A1 5287
84A2 5289
84A3 528A
84A4 528B
84A5 528C
84A6 528D
84A7 528E
84A8 528F
84A9 5291
84AA 5292
84AB 5294
84AC 5295
84AD 5296
84AE 5297
84AF 5298
84B0 5299
84B1 529A
84B2 529C
84B3 52A4
84B4 52A5
84B5 52A6
84B6 52A7
84B7 52AE
84B8 52AF
84B9 52B0
84BA 52B4
84BB 52B5
84BC 52B6
84BD 52B7
84BE 52B8
84BF 52B9
84C0 52BA
84C1 52BB
84C2 52BC
84C3 52BD
84C4 52C0
84C5 52C1
84C6 52C2
84C7 52C4
84C8 52C5
84C9 52C6
84CA 52C8
84CB 52CA
84CC 52CC
84CD 52CD
84CE 52CE
84CF 52CF
84D0 52D1
84D1 52D3
84D2 52D4
84D3 52D5
84D4 52D7
84D5 52D9
84D6 52DA
84D7 52DB
84D8 52DC
84D9 52DD
84DA 52DE
84DB 52E0
84DC 52E1
84DD 52E2
84DE 52E3
84DF 52E5
84E0 52E6
84E1 52E7
84E2 52E8
84E3 52E9
84E4 52EA
84E5 52EB
84E6 52EC
84E7 52ED
84E8 52EE
84E9 52EF
84EA 52F1
84EB 52F2
84EC 52F3
84ED 52F4
84EE 52F5
84EF 52F6
84F0 52F7
84F1 52F8
84F2 52FB
84F3 52FC
84F4 52FD
84F5 5301
84F6 5302
84F7 5303
84F8 5304
84F9 5307
84FA 5309
84FB 530A
84FC 530B
84FD 530C
84FE 530E
8540 5311
8541 5312
8542 5313
8543 5314
8544 5318
8545 531B
8546 531C
8547 531E
8548 531F
8549 5322
854A 5324
854B 5325
854C 5327
854D 5328
854E 5329
854F 532B
8550 532C
8551 532D
8552 532F
8553 5330
8554 5331
8555 5332
8556 5333
8557 5334
8558 5335
8559 5336
855A 5337
855B 5338
855C 533C
855D 533D
855E 5340
855F 5342
8560 5344
8561 5346
8562 534B
8563 534C
8564 534D
8565 5350
8566 5354
8567 5358
8568 5359
8569 535B
856A 535D
856B 5365
856C 5368
856D 536A
856E 536C
856F 536D
8570 5372
8571 5376
8572 5379
8573 537B
8574 537C
8575 537D
8576 537E
8577 5380
8578 5381
8579 5383
857A 5387
857B 5388
857C 538A
857D 538E
857E 538F
8580 5390
8581 5391
8582 5392
8583 5393
8584 5394
8585 5396
8586 5397
8587 5399
8588 539B
8589 539C
858A 539E
858B 53A0
858C 53A1
858D 53A4
858E 53A7
858F 53AA
8590 53AB
8591 53AC
8592 53AD
8593 53AF
8594 53B0
8595 53B1
8596 53B2
8597 53B3
8598 53B4
8599 53B5
859A 53B7
859B 53B8
859C 53B9
859D 53BA
859E 53BC
859F 53BD
85A0 53BE
85A1 53C0
85A2 53C3
85A3 53C4
85A4 53C5
85A5 53C6
85A6 53C7
85A7 53CE
85A8 53CF
85A9 53D0
85AA 53D2
85AB 53D3
85AC 53D5
85AD 53DA
85AE 53DC
85AF 53DD
85B0 53DE
85B1 53E1
85B2 53E2
85B3 53E7
85B4 53F4
85B5 53FA
85B6 53FE
85B7 53FF
85B8 5400
85B9 5402
85BA 5405
85BB 5407
85BC 540B
85BD 5414
85BE 5418
85BF 5419
85C0 541A
85C1 541C
85C2 5422
85C3 5424
85C4 5425
85C5 542A
85C6 5430
85C7 5433
85C8 5436
85C9 5437
85CA 543A
85CB 543D
85CC 543F
85CD 5441
85CE 5442
85CF 5444
85D0 5445
85D1 5447
85D2 5449
85D3 544C
85D4 544D
85D5 544E
85D6 544F
85D7 5451
85D8 545A
85D9 545D
85DA 545E
85DB 545F
85DC 5460
85DD 5461
85DE 5463
85DF 5465
85E0 5467
85E1 5469
85E2 546A
85E3 546B
85E4 546C
85E5 546D
85E6 546E
85E7 546F
85E8 5470
85E9 5474
85EA 5479
85EB 547A
85EC 547E
85ED 547F
85EE 5481
85EF 5483
85F0 5485
85F1 5487
85F2 5488
85F3 5489
85F4 548A
85F5 548D
85F6 5491
85F7 5493
85F8 5497
85F9 5498
85FA 549C
85FB 549E
85FC 549F
85FD 54A0
85FE 54A1
8640 54A2
8641 54A5
8642 54AE
8643 54B0
8644 54B2
8645 54B5
8646 54B6
8647 54B7
8648 54B9
8649 54BA
864A 54BC
864B 54BE
864C 54C3
864D 54C5
864E 54CA
864F 54CB
8650 54D6
8651 54D8
8652 54DB
8653 54E0
8654 54E1
8655 54E2
8656 54E3
8657 54E4
8658 54EB
8659 54EC
865A 54EF
865B 54F0
865C 54F1
865D 54F4
865E 54F5
865F 54F6
8660 54F7
8661 54F8
8662 54F9
8663 54FB
8664 54FE
8665 5500
8666 5502
8667 5503
8668 5504
8669 5505
866A 5508
866B 550A
866C 550B
866D 550C
866E 550D
866F 550E
8670 5512
8671 5513
8672 5515
8673 5516
8674 5517
8675 5518
8676 5519
8677 551A
8678 551C
8679 551D
867A 551E
867B 551F
867C 5521
867D 5525
867E 5526
8680 5528
8681 5529
8682 552B
8683 552D
8684 5532
8685 5534
8686 5535
8687 5536
8688 5538
8689 5539
868A 553A
868B 553B
868C 553D
868D 5540
868E 5542
868F 5545
8690 5547
8691 5548
8692 554B
8693 554C
8694 554D
8695 554E
8696 554F
8697 5551
8698 5552
8699 5553
869A 5554
869B 5557
869C 5558
869D 5559
869E 555A
869F 555B
86A0 555D
86A1 555E
86A2 555F
86A3 5560
86A4 5562
86A5 5563
86A6 5568
86A7 5569
86A8 556B
86A9 556F
86AA 5570
86AB 5571
86AC 5572
86AD 5573
86AE 5574
86AF 5579
86B0 557A
86B1 557D
86B2 557F
86B3 5585
86B4 5586
86B5 558C
86B6 558D
86B7 558E
86B8 5590
86B9 5592
86BA 5593
86BB 5595
86BC 5596
86BD 5597
86BE 559A
86BF 559B
86C0 559E
86C1 55A0
86C2 55A1
86C3 55A2
86C4 55A3
86C5 55A4
86C6 55A5
86C7 55A6
86C8 55A8
86C9 55A9
86CA 55AA
86CB 55AB
86CC 55AC
86CD 55AD
86CE 55AE
86CF 55AF
86D0 55B0
86D1 55B2
86D2 55B4
86D3 55B6
86D4 55B8
86D5 55BA
86D6 55BC
86D7 55BF
86D8 55C0
86D9 55C1
86DA 55C2
86DB 55C3
86DC 55C6
86DD 55C7
86DE 55C8
86DF 55CA
86E0 55CB
86E1 55CE
86E2 55CF
86E3 55D0
86E4 55D5
86E5 55D7
86E6 55D8
86E7 55D9
86E8 55DA
86E9 55DB
86EA 55DE
86EB 55E0
86EC 55E2
86ED 55E7
86EE 55E9
86EF 55ED
86F0 55EE
86F1 55F0
86F2 55F1
86F3 55F4
86F4 55F6
86F5 55F8
86F6 55F9
86F7 55FA
86F8 55FB
86F9 55FC
86FA 55FF
86FB 5602
86FC 5603
86FD 5604
86FE 5605
8740 5606
8741 5607
8742 560A
8743 560B
8744 560D
8745 5610
8746 5611
8747 5612
8748 5613
8749 5614
874A 5615
874B 5616
874C 5617
874D 5619
874E 561A
874F 561C
8750 561D
8751 5620
8752 5621
8753 5622
8754 5625
8755 5626
8756 5628
8757 5629
8758 562A
8759 562B
875A 562E
875B 562F
875C 5630
875D 5633
875E 5635
875F 5637
8760 5638
8761 563A
8762 563C
8763 563D
8764 563E
8765 5640
8766 5641
8767 5642
8768 5643
8769 5644
876A 5645
876B 5646
876C 5647
876D 5648
876E 5649
876F 564A
8770 564B
8771 564F
8772 5650
8773 5651
8774 5652
8775 5653
8776 5655
8777 5656
8778 565A
8779 565B
877A 565D
877B 565E
877C 565F
877D 5660
877E 5661
8780 5663
8781 5665
8782 5666
8783 5667
8784 566D
8785 566E
8786 566F
8787 5670
8788 5672
8789 5673
878A 5674
878B 5675
878C 5677
878D 5678
878E 5679
878F 567A
8790 567D
8791 567E
8792 567F
8793 5680
8794 5681
8795 5682
8796 5683
8797 5684
8798 5687
8799 5688
879A 5689
879B 568A
879C 568B
879D 568C
879E 568D
879F 5690
87A0 5691
87A1 5692
87A2 5694
87A3 5695
87A4 5696
87A5 5697
87A6 5698
87A7 5699
87A8 569A
87A9 569B
87AA 569C
87AB 569D
87AC 569E
87AD 569F
87AE 56A0
87AF 56A1
87B0 56A2
87B1 56A4
87B2 56A5
87B3 56A6
87B4 56A7
87B5 56A8
87B6 56A9
87B7 56AA
87B8 56AB
87B9 56AC
87BA 56AD
87BB 56AE
87BC 56B0
87BD 56B1
87BE 56B2
87BF 56B3
87C0 56B4
87C1 56B5
87C2 56B6
87C3 56B8
87C4 56B9
87C5 56BA
87C6 56BB
87C7 56BD
87C8 56BE
87C9 56BF
87CA 56C0
87CB 56C1
87CC 56C2
87CD 56C3
87CE 56C4
87CF 56C5
87D0 56C6
87D1 56C7
87D2 56C8
87D3 56C9
87D4 56CB
87D5 56CC
87D6 56CD
87D7 56CE
87D8 56CF
87D9 56D0
87DA 56D1
87DB 56D2
87DC 56D3
87DD 56D5
87DE 56D6
87DF 56D8
87E0 56D9
87E1 56DC
87E2 56E3
87E3 56E5
87E4 56E6
87E5 56E7
87E6 56E8
87E7 56E9
87E8 56EA
87E9 56EC
87EA 56EE
87EB 56EF
87EC 56F2
87ED 56F3
87EE 56F6
87EF 56F7
87F0 56F8
87F1 56FB
87F2 56FC
87F3 5700
87F4 5701
87F5 5702
87F6 5705
87F7 5707
87F8 570B
87F9 570C
87FA 570D
87FB 570E
87FC 570F
87FD 5710
87FE 5711
8840 5712
8841 5713
8842 5714
8843 5715
8844 5716
8845 5717
8846 5718
8847 5719
8848 571A
8849 571B
884A 571D
884B 571E
884C 5720
884D 5721
884E 5722
884F 5724
8850 5725
8851 5726
8852 5727
8853 572B
8854 5731
8855 5732
8856 5734
8857 5735
8858 5736
8859 5737
885A 5738
885B 573C
885C 573D
885D 573F
885E 5741
885F 5743
8860 5744
8861 5745
8862 5746
8863 5748
8864 5749
8865 574B
8866 5752
8867 5753
8868 5754
8869 5755
886A 5756
886B 5758
886C 5759
886D 5762
886E 5763
886F 5765
8870 5767
8871 576C
8872 576E
8873 5770
8874 5771
8875 5772
8876 5774
8877 5775
8878 5778
8879 5779
887A 577A
887B 577D
887C 577E
887D 577F
887E 5780
8880 5781
8881 5787
8882 5788
8883 5789
8884 578A
8885 578D
8886 578E
8887 578F
8888 5790
8889 5791
888A 5794
888B 5795
888C 5796
888D 5797
888E 5798
888F 5799
8890 579A
8891 579C
8892 579D
8893 579E
8894 579F
8895 57A5
8896 57A8
8897 57AA
8898 57AC
8899 57AF
889A 57B0
889B 57B1
889C 57B3
889D 57B5
889E 57B6
889F 57B7
88A0 57B9
88A1 57BA
88A2 57BB
88A3 57BC
88A4 57BD
88A5 57BE
88A6 57BF
88A7 57C0
88A8 57C1
88A9 57C4
88AA 57C5
88AB 57C6
88AC 57C7
88AD 57C8
88AE 57C9
88AF 57CA
88B0 57CC
88B1 57CD
88B2 57D0
88B3 57D1
88B4 57D3
88B5 57D6
88B6 57D7
88B7 57DB
88B8 57DC
88B9 57DE
88BA 57E1
88BB 57E2
88BC 57E3
88BD 57E5
88BE 57E6
88BF 57E7
88C0 57E8
88C1 57E9
88C2 57EA
88C3 57EB
88C4 57EC
88C5 57EE
88C6 57F0
88C7 57F1
88C8 57F2
88C9 57F3
88CA 57F5
88CB 57F6
88CC 57F7
88CD 57FB
88CE 57FC
88CF 57FE
88D0 57FF
88D1 5801
88D2 5803
88D3 5804
88D4 5805
88D5 5808
88D6 5809
88D7 580A
88D8 580C
88D9 580E
88DA 580F
88DB 5810
88DC 5812
88DD 5813
88DE 5814
88DF 5816
88E0 5817
88E1 5818
88E2 581A
88E3 581B
88E4 581C
88E5 581D
88E6 581F
88E7 5822
88E8 5823
88E9 5825
88EA 5826
88EB 5827
88EC 5828
88ED 5829
88EE 582B
88EF 582C
88F0 582D
88F1 582E
88F2 582F
88F3 5831
88F4 5832
88F5 5833
88F6 5834
88F7 5836
88F8 5837
88F9 5838
88FA 5839
88FB 583A
88FC 583B
88FD 583C
88FE 583D
8940 583E
8941 583F
8942 5840
8943 5841
8944 5842
8945 5843
8946 5845
8947 5846
8948 5847
8949 5848
894A 5849
894B 584A
894C 584B
894D 584E
894E 584F
894F 5850
8950 5852
8951 5853
8952 5855
8953 5856
8954 5857
8955 5859
8956 585A
8957 585B
8958 585C
8959 585D
895A 585F
895B 5860
895C 5861
895D 5862
895E 5863
895F 5864
8960 5866
8961 5867
8962 5868
8963 5869
8964 586A
8965 586D
8966 586E
8967 586F
8968 5870
8969 5871
896A 5872
896B 5873
896C 5874
896D 5875
896E 5876
896F 5877
8970 5878
8971 5879
8972 587A
8973 587B
8974 587C
8975 587D
8976 587F
8977 5882
8978 5884
8979 5886
897A 5887
897B 5888
897C 588A
897D 588B
897E 588C
8980 588D
8981 588E
8982 588F
8983 5890
8984 5891
8985 5894
8986 5895
8987 5896
8988 5897
8989 5898
898A 589B
898B 589C
898C 589D
898D 58A0
898E 58A1
898F 58A2
8990 58A3
8991 58A4
8992 58A5
8993 58A6
8994 58A7
8995 58AA
8996 58AB
8997 58AC
8998 58AD
8999 58AE
899A 58AF
899B 58B0
899C 58B1
899D 58B2
899E 58B3
899F 58B4
89A0 58B5
89A1 58B6
89A2 58B7
89A3 58B8
89A4 58B9
89A5 58BA
89A6 58BB
89A7 58BD
89A8 58BE
89A9 58BF
89AA 58C0
89AB 58C2
89AC 58C3
89AD 58C4
89AE 58C6
89AF 58C7
89B0 58C8
89B1 58C9
89B2 58CA
89B3 58CB
89B4 58CC
89B5 58CD
89B6 58CE
89B7 58CF
89B8 58D0
89B9 58D2
89BA 58D3
89BB 58D4
89BC 58D6
89BD 58D7
89BE 58D8
89BF 58D9
89C0 58DA
89C1 58DB
89C2 58DC
89C3 58DD
89C4 58DE
89C5 58DF
89C6 58E0
89C7 58E1
89C8 58E2
89C9 58E3
89CA 58E5
89CB 58E6
89CC 58E7
89CD 58E8
89CE 58E9
89CF 58EA
89D0 58ED
89D1 58EF
89D2 58F1
89D3 58F2
89D4 58F4
89D5 58F5
89D6 58F7
89D7 58F8
89D8 58FA
89D9 58FB
89DA 58FC
89DB 58FD
89DC 58FE
89DD 58FF
89DE 5900
89DF 5901
89E0 5903
89E1 5905
89E2 5906
89E3 5908
89E4 5909
89E5 590A
89E6 590B
89E7 590C
89E8 590E
89E9 5910
89EA 5911
89EB 5912
89EC 5913
89ED 5917
89EE 5918
89EF 591B
89F0 591D
89F1 591E
89F2 5920
89F3 5921
89F4 5922
89F5 5923
89F6 5926
89F7 5928
89F8 592C
89F9 5930
89FA 5932
89FB 5933
89FC 5935
89FD 5936
89FE 593B
8A40 593D
8A41 593E
8A42 593F
8A43 5940
8A44 5943
8A45 5945
8A46 5946
8A47 594A
8A48 594C
8A49 594D
8A4A 5950
8A4B 5952
8A4C 5953
8A4D 5959
8A4E 595B
8A4F 595C
8A50 595D
8A51 595E
8A52 595F
8A53 5961
8A54 5963
8A55 5964
8A56 5966
8A57 5967
8A58 5968
8A59 5969
8A5A 596A
8A5B 596B
8A5C 596C
8A5D 596D
8A5E 596E
8A5F 596F
8A60 5970
8A61 5971
8A62 5972
8A63 5975
8A64 5977
8A65 597A
8A66 597B
8A67 597C
8A68 597E
8A69 597F
8A6A 5980
8A6B 5985
8A6C 5989
8A6D 598B
8A6E 598C
8A6F 598E
8A70 598F
8A71 5990
8A72 5991
8A73 5994
8A74 5995
8A75 5998
8A76 599A
8A77 599B
8A78 599C
8A79 599D
8A7A 599F
8A7B 59A0
8A7C 59A1
8A7D 59A2
8A7E 59A6
8A80 59A7
8A81 59AC
8A82 59AD
8A83 59B0
8A84 59B1
8A85 59B3
8A86 59B4
8A87 59B5
8A88 59B6
8A89 59B7
8A8A 59B8
8A8B 59BA
8A8C 59BC
8A8D 59BD
8A8E 59BF
8A8F 59C0
8A90 59C1
8A91 59C2
8A92 59C3
8A93 59C4
8A94 59C5
8A95 59C7
8A96 59C8
8A97 59C9
8A98 59CC
8A99 59CD
8A9A 59CE
8A9B 59CF
8A9C 59D5
8A9D 59D6
8A9E 59D9
8A9F 59DB
8AA0 59DE
8AA1 59DF
8AA2 59E0
8AA3 59E1
8AA4 59E2
8AA5 59E4
8AA6 59E6
8AA7 59E7
8AA8 59E9
8AA9 59EA
8AAA 59EB
8AAB 59ED
8AAC 59EE
8AAD 59EF
8AAE 59F0
8AAF 59F1
8AB0 59F2
8AB1 59F3
8AB2 59F4
8AB3 59F5
8AB4 59F6
8AB5 59F7
8AB6 59F8
8AB7 59FA
8AB8 59FC
8AB9 59FD
8ABA 59FE
8ABB 5A00
8ABC 5A02
8ABD 5A0A
8ABE 5A0B
8ABF 5A0D
8AC0 5A0E
8AC1 5A0F
8AC2 5A10
8AC3 5A12
8AC4 5A14
8AC5 5A15
8AC6 5A16
8AC7 5A17
8AC8 5A19
8AC9 5A1A
8ACA 5A1B
8ACB 5A1D
8ACC 5A1E
8ACD 5A21
8ACE 5A22
8ACF 5A24
8AD0 5A26
8AD1 5A27
8AD2 5A28
8AD3 5A2A
8AD4 5A2B
8AD5 5A2C
8AD6 5A2D
8AD7 5A2E
8AD8 5A2F
8AD9 5A30
8ADA 5A33
8ADB 5A35
8ADC 5A37
8ADD 5A38
8ADE 5A39
8ADF 5A3A
8AE0 5A3B
8AE1 5A3D
8AE2 5A3E
8AE3 5A3F
8AE4 5A41
8AE5 5A42
8AE6 5A43
8AE7 5A44
8AE8 5A45
8AE9 5A47
8AEA 5A48
8AEB 5A4B
8AEC 5A4C
8AED 5A4D
8AEE 5A4E
8AEF 5A4F
8AF0 5A50
8AF1 5A51
8AF2 5A52
8AF3 5A53
8AF4 5A54
8AF5 5A56
8AF6 5A57
8AF7 5A58
8AF8 5A59
8AF9 5A5B
8AFA 5A5C
8AFB 5A5D
8AFC 5A5E
8AFD 5A5F
8AFE 5A60
8B40 5A61
8B41 5A63
8B42 5A64
8B43 5A65
8B44 5A66
8B45 5A68
8B46 5A69
8B47 5A6B
8B48 5A6C
8B49 5A6D
8B4A 5A6E
8B4B 5A6F
8B4C 5A70
8B4D 5A71
8B4E 5A72
8B4F 5A73
8B50 5A78
8B51 5A79
8B52 5A7B
8B53 5A7C
8B54 5A7D
8B55 5A7E
8B56 5A80
8B57 5A81
8B58 5A82
8B59 5A83
8B5A 5A84
8B5B 5A85
8B5C 5A86
8B5D 5A87
8B5E 5A88
8B5F 5A89
8B60 5A8A
8B61 5A8B
8B62 5A8C
8B63 5A8D
8B64 5A8E
8B65 5A8F
8B66 5A90
8B67 5A91
8B68 5A93
8B69 5A94
8B6A 5A95
8B6B 5A96
8B6C 5A97
8B6D 5A98
8B6E 5A99
8B6F 5A9C
8B70 5A9D
8B71 5A9E
8B72 5A9F
8B73 5AA0
8B74 5AA1
8B75 5AA2
8B76 5AA3
8B77 5AA4
8B78 5AA5
8B79 5AA6
8B7A 5AA7
8B7B 5AA8
8B7C 5AA9
8B7D 5AAB
8B7E 5AAC
8B80 5AAD
8B81 5AAE
8B82 5AAF
8B83 5AB0
8B84 5AB1
8B85 5AB4
8B86 5AB6
8B87 5AB7
8B88 5AB9
8B89 5ABA
8B8A 5ABB
8B8B 5ABC
8B8C 5ABD
8B8D 5ABF
8B8E 5AC0
8B8F 5AC3
8B90 5AC4
8B91 5AC5
8B92 5AC6
8B93 5AC7
8B94 5AC8
8B95 5ACA
8B96 5ACB
8B97 5ACD
8B98 5ACE
8B99 5ACF
8B9A 5AD0
8B9B 5AD1
8B9C 5AD3
8B9D 5AD5
8B9E 5AD7
8B9F 5AD9
8BA0 5ADA
8BA1 5ADB
8BA2 5ADD
8BA3 5ADE
8BA4 5ADF
8BA5 5AE2
8BA6 5AE4
8BA7 5AE5
8BA8 5AE7
8BA9 5AE8
8BAA 5AEA
8BAB 5AEC
8BAC 5AED
8BAD 5AEE
8BAE 5AEF
8BAF 5AF0
8BB0 5AF2
8BB1 5AF3
8BB2 5AF4
8BB3 5AF5
8BB4 5AF6
8BB5 5AF7
8BB6 5AF8
8BB7 5AF9
8BB8 5AFA
8BB9 5AFB
8BBA 5AFC
8BBB 5AFD
8BBC 5AFE
8BBD 5AFF
8BBE 5B00
8BBF 5B01
8BC0 5B02
8BC1 5B03
8BC2 5B04
8BC3 5B05
8BC4 5B06
8BC5 5B07
8BC6 5B08
8BC7 5B0A
8BC8 5B0B
8BC9 5B0C
8BCA 5B0D
8BCB 5B0E
8BCC 5B0F
8BCD 5B10
8BCE 5B11
8BCF 5B12
8BD0 5B13
8BD1 5B14
8BD2 5B15
8BD3 5B18
8BD4 5B19
8BD5 5B1A
8BD6 5B1B
8BD7 5B1C
8BD8 5B1D
8BD9 5B1E
8BDA 5B1F
8BDB 5B20
8BDC 5B21
8BDD 5B22
8BDE 5B23
8BDF 5B24
8BE0 5B25
8BE1 5B26
8BE2 5B27
8BE3 5B28
8BE4 5B29
8BE5 5B2A
8BE6 5B2B
8BE7 5B2C
8BE8 5B2D
8BE9 5B2E
8BEA 5B2F
8BEB 5B30
8BEC 5B31
8BED 5B33
8BEE 5B35
8BEF 5B36
8BF0 5B38
8BF1 5B39
8BF2 5B3A
8BF3 5B3B
8BF4 5B3C
8BF5 5B3D
8BF6 5B3E
8BF7 5B3F
8BF8 5B41
8BF9 5B42
8BFA 5B43
8BFB 5B44
8BFC 5B45
8BFD 5B46
8BFE 5B47
8C40 5B48
8C41 5B49
8C42 5B4A
8C43 5B4B
8C44 5B4C
8C45 5B4D
8C46 5B4E
8C47 5B4F
8C48 5B52
8C49 5B56
8C4A 5B5E
8C4B 5B60
8C4C 5B61
8C4D 5B67
8C4E 5B68
8C4F 5B6B
8C50 5B6D
8C51 5B6E
8C52 5B6F
8C53 5B72
8C54 5B74
8C55 5B76
8C56 5B77
8C57 5B78
8C58 5B79
8C59 5B7B
8C5A 5B7C
8C5B 5B7E
8C5C 5B7F
8C5D 5B82
8C5E 5B86
8C5F 5B8A
8C60 5B8D
8C61 5B8E
8C62 5B90
8C63 5B91
8C64 5B92
8C65 5B94
8C66 5B96
8C67 5B9F
8C68 5BA7
8C69 5BA8
8C6A 5BA9
8C6B 5BAC
8C6C 5BAD
8C6D 5BAE
8C6E 5BAF
8C6F 5BB1
8C70 5BB2
8C71 5BB7
8C72 5BBA
8C73 5BBB
8C74 5BBC
8C75 5BC0
8C76 5BC1
8C77 5BC3
8C78 5BC8
8C79 5BC9
8C7A 5BCA
8C7B 5BCB
8C7C 5BCD
8C7D 5BCE
8C7E 5BCF
8C80 5BD1
8C81 5BD4
8C82 5BD5
8C83 5BD6
8C84 5BD7
8C85 5BD8
8C86 5BD9
8C87 5BDA
8C88 5BDB
8C89 5BDC
8C8A 5BE0
8C8B 5BE2
8C8C 5BE3
8C8D 5BE6
8C8E 5BE7
8C8F 5BE9
8C90 5BEA
8C91 5BEB
8C92 5BEC
8C93 5BED
8C94 5BEF
8C95 5BF1
8C96 5BF2
8C97 5BF3
8C98 5BF4
8C99 5BF5
8C9A 5BF6
8C9B 5BF7
8C9C 5BFD
8C9D 5BFE
8C9E 5C00
8C9F 5C02
8CA0 5C03
8CA1 5C05
8CA2 5C07
8CA3 5C08
8CA4 5C0B
8CA5 5C0C
8CA6 5C0D
8CA7 5C0E
8CA8 5C10
8CA9 5C12
8CAA 5C13
8CAB 5C17
8CAC 5C19
8CAD 5C1B
8CAE 5C1E
8CAF 5C1F
8CB0 5C20
8CB1 5C21
8CB2 5C23
8CB3 5C26
8CB4 5C28
8CB5 5C29
8CB6 5C2A
8CB7 5C2B
8CB8 5C2D
8CB9 5C2E
8CBA 5C2F
8CBB 5C30
8CBC 5C32
8CBD 5C33
8CBE 5C35
8CBF 5C36
8CC0 5C37
8CC1 5C43
8CC2 5C44
8CC3 5C46
8CC4 5C47
8CC5 5C4C
8CC6 5C4D
8CC7 5C52
8CC8 5C53
8CC9 5C54
8CCA 5C56
8CCB 5C57
8CCC 5C58
8CCD 5C5A
8CCE 5C5B
8CCF 5C5C
8CD0 5C5D
8CD1 5C5F
8CD2 5C62
8CD3 5C64
8CD4 5C67
8CD5 5C68
8CD6 5C69
8CD7 5C6A
8CD8 5C6B
8CD9 5C6C
8CDA 5C6D
8CDB 5C70
8CDC 5C72
8CDD 5C73
8CDE 5C74
8CDF 5C75
8CE0 5C76
8CE1 5C77
8CE2 5C78
8CE3 5C7B
8CE4 5C7C
8CE5 5C7D
8CE6 5C7E
8CE7 5C80
8CE8 5C83
8CE9 5C84
8CEA 5C85
8CEB 5C86
8CEC 5C87
8CED 5C89
8CEE 5C8A
8CEF 5C8B
8CF0 5C8E
8CF1 5C8F
8CF2 5C92
8CF3 5C93
8CF4 5C95
8CF5 5C9D
8CF6 5C9E
8CF7 5C9F
8CF8 5CA0
8CF9 5CA1
8CFA 5CA4
8CFB 5CA5
8CFC 5CA6
8CFD 5CA7
8CFE 5CA8
8D40 5CAA
8D41 5CAE
8D42 5CAF
8D43 5CB0
8D44 5CB2
8D45 5CB4
8D46 5CB6
8D47 5CB9
8D48 5CBA
8D49 5CBB
8D4A 5CBC
8D4B 5CBE
8D4C 5CC0
8D4D 5CC2
8D4E 5CC3
8D4F 5CC5
8D50 5CC6
8D51 5CC7
8D52 5CC8
8D53 5CC9
8D54 5CCA
8D55 5CCC
8D56 5CCD
8D57 5CCE
8D58 5CCF
8D59 5CD0
8D5A 5CD1
8D5B 5CD3
8D5C 5CD4
8D5D 5CD5
8D5E 5CD6
8D5F 5CD7
8D60 5CD8
8D61 5CDA
8D62 5CDB
8D63 5CDC
8D64 5CDD
8D65 5CDE
8D66 5CDF
8D67 5CE0
8D68 5CE2
8D69 5CE3
8D6A 5CE7
8D6B 5CE9
8D6C 5CEB
8D6D 5CEC
8D6E 5CEE
8D6F 5CEF
8D70 5CF1
8D71 5CF2
8D72 5CF3
8D73 5CF4
8D74 5CF5
8D75 5CF6
8D76 5CF7
8D77 5CF8
8D78 5CF9
8D79 5CFA
8D7A 5CFC
8D7B 5CFD
8D7C 5CFE
8D7D 5CFF
8D7E 5D00
8D80 5D01
8D81 5D04
8D82 5D05
8D83 5D08
8D84 5D09
8D85 5D0A
8D86 5D0B
8D87 5D0C
8D88 5D0D
8D89 5D0F
8D8A 5D10
8D8B 5D11
8D8C 5D12
8D8D 5D13
8D8E 5D15
8D8F 5D17
8D90 5D18
8D91 5D19
8D92 5D1A
8D93 5D1C
8D94 5D1D
8D95 5D1F
8D96 5D20
8D97 5D21
8D98 5D22
8D99 5D23
8D9A 5D25
8D9B 5D28
8D9C 5D2A
8D9D 5D2B
8D9E 5D2C
8D9F 5D2F
8DA0 5D30
8DA1 5D31
8DA2 5D32
8DA3 5D33
8DA4 5D35
8DA5 5D36
8DA6 5D37
8DA7 5D38
8DA8 5D39
8DA9 5D3A
8DAA 5D3B
8DAB 5D3C
8DAC 5D3F
8DAD 5D40
8DAE 5D41
8DAF 5D42
8DB0 5D43
8DB1 5D44
8DB2 5D45
8DB3 5D46
8DB4 5D48
8DB5 5D49
8DB6 5D4D
8DB7 5D4E
8DB8 5D4F
8DB9 5D50
8DBA 5D51
8DBB 5D52
8DBC 5D53
8DBD 5D54
8DBE 5D55
8DBF 5D56
8DC0 5D57
8DC1 5D59
8DC2 5D5A
8DC3 5D5C
8DC4 5D5E
8DC5 5D5F
8DC6 5D60
8DC7 5D61
8DC8 5D62
8DC9 5D63
8DCA 5D64
8DCB 5D65
8DCC 5D66
8DCD 5D67
8DCE 5D68
8DCF 5D6A
8DD0 5D6D
8DD1 5D6E
8DD2 5D70
8DD3 5D71
8DD4 5D72
8DD5 5D73
8DD6 5D75
8DD7 5D76
8DD8 5D77
8DD9 5D78
8DDA 5D79
8DDB 5D7A
8DDC 5D7B
8DDD 5D7C
8DDE 5D7D
8DDF 5D7E
8DE0 5D7F
8DE1 5D80
8DE2 5D81
8DE3 5D83
8DE4 5D84
8DE5 5D85
8DE6 5D86
8DE7 5D87
8DE8 5D88
8DE9 5D89
8DEA 5D8A
8DEB 5D8B
8DEC 5D8C
8DED 5D8D
8DEE 5D8E
8DEF 5D8F
8DF0 5D90
8DF1 5D91
8DF2 5D92
8DF3 5D93
8DF4 5D94
8DF5 5D95
8DF6 5D96
8DF7 5D97
8DF8 5D98
8DF9 5D9A
8DFA 5D9B
8DFB 5D9C
8DFC 5D9E
8DFD 5D9F
8DFE 5DA0
8E40 5DA1
8E41 5DA2
8E42 5DA3
8E43 5DA4
8E44 5DA5
8E45 5DA6
8E46 5DA7
8E47 5DA8
8E48 5DA9
8E49 5DAA
8E4A 5DAB
8E4B 5DAC
8E4C 5DAD
8E4D 5DAE
8E4E 5DAF
8E4F 5DB0
8E50 5DB1
8E51 5DB2
8E52 5DB3
8E53 5DB4
8E54 5DB5
8E55 5DB6
8E56 5DB8
8E57 5DB9
8E58 5DBA
8E59 5DBB
8E5A 5DBC
8E5B 5DBD
8E5C 5DBE
8E5D 5DBF
8E5E 5DC0
8E5F 5DC1
8E60 5DC2
8E61 5DC3
8E62 5DC4
8E63 5DC6
8E64 5DC7
8E65 5DC8
8E66 5DC9
8E67 5DCA
8E68 5DCB
8E69 5DCC
8E6A 5DCE
8E6B 5DCF
8E6C 5DD0
8E6D 5DD1
8E6E 5DD2
8E6F 5DD3
8E70 5DD4
8E71 5DD5
8E72 5DD6
8E73 5DD7
8E74 5DD8
8E75 5DD9
8E76 5DDA
8E77 5DDC
8E78 5DDF
8E79 5DE0
8E7A 5DE3
8E7B 5DE4
8E7C 5DEA
8E7D 5DEC
8E7E 5DED
8E80 5DF0
8E81 5DF5
8E82 5DF6
8E83 5DF8
8E84 5DF9
8E85 5DFA
8E86 5DFB
8E87 5DFC
8E88 5DFF
8E89 5E00
8E8A 5E04
8E8B 5E07
8E8C 5E09
8E8D 5E0A
8E8E 5E0B
8E8F 5E0D
8E90 5E0E
8E91 5E12
8E92 5E13
8E93 5E17
8E94 5E1E
8E95 5E1F
8E96 5E20
8E97 5E21
8E98 5E22
8E99 5E23
8E9A 5E24
8E9B 5E25
8E9C 5E28
8E9D 5E29
8E9E 5E2A
8E9F 5E2B
8EA0 5E2C
8EA1 5E2F
8EA2 5E30
8EA3 5E32
8EA4 5E33
8EA5 5E34
8EA6 5E35
8EA7 5E36
8EA8 5E39
8EA9 5E3A
8EAA 5E3E
8EAB 5E3F
8EAC 5E40
8EAD 5E41
8EAE 5E43
8EAF 5E46
8EB0 5E47
8EB1 5E48
8EB2 5E49
8EB3 5E4A
8EB4 5E4B
8EB5 5E4D
8EB6 5E4E
8EB7 5E4F
8EB8 5E50
8EB9 5E51
8EBA 5E52
8EBB 5E53
8EBC 5E56
8EBD 5E57
8EBE 5E58
8EBF 5E59
8EC0 5E5A
8EC1 5E5C
8EC2 5E5D
8EC3 5E5F
8EC4 5E60
8EC5 5E63
8EC6 5E64
8EC7 5E65
8EC8 5E66
8EC9 5E67
8ECA 5E68
8ECB 5E69
8ECC 5E6A
8ECD 5E6B
8ECE 5E6C
8ECF 5E6D
8ED0 5E6E
8ED1 5E6F
8ED2 5E70
8ED3 5E71
8ED4 5E75
8ED5 5E77
8ED6 5E79
8ED7 5E7E
8ED8 5E81
8ED9 5E82
8EDA 5E83
8EDB 5E85
8EDC 5E88
8EDD 5E89
8EDE 5E8C
8EDF 5E8D
8EE0 5E8E
8EE1 5E92
8EE2 5E98
8EE3 5E9B
8EE4 5E9D
8EE5 5EA1
8EE6 5EA2
8EE7 5EA3
8EE8 5EA4
8EE9 5EA8
8EEA 5EA9
8EEB 5EAA
8EEC 5EAB
8EED 5EAC
8EEE 5EAE
8EEF 5EAF
8EF0 5EB0
8EF1 5EB1
8EF2 5EB2
8EF3 5EB4
8EF4 5EBA
8EF5 5EBB
8EF6 5EBC
8EF7 5EBD
8EF8 5EBF
8EF9 5EC0
8EFA 5EC1
8EFB 5EC2
8EFC 5EC3
8EFD 5EC4
8EFE 5EC5
8F40 5EC6
8F41 5EC7
8F42 5EC8
8F43 5ECB
8F44 5ECC
8F45 5ECD
8F46 5ECE
8F47 5ECF
8F48 5ED0
8F49 5ED4
8F4A 5ED5
8F4B 5ED7
8F4C 5ED8
8F4D 5ED9
8F4E 5EDA
8F4F 5EDC
8F50 5EDD
8F51 5EDE
8F52 5EDF
8F53 5EE0
8F54 5EE1
8F55 5EE2
8F56 5EE3
8F57 5EE4
8F58 5EE5
8F59 5EE6
8F5A 5EE7
8F5B 5EE9
8F5C 5EEB
8F5D 5EEC
8F5E 5EED
8F5F 5EEE
8F60 5EEF
8F61 5EF0
8F62 5EF1
8F63 5EF2
8F64 5EF3
8F65 5EF5
8F66 5EF8
8F67 5EF9
8F68 5EFB
8F69 5EFC
8F6A 5EFD
8F6B 5F05
8F6C 5F06
8F6D 5F07
8F6E 5F09
8F6F 5F0C
8F70 5F0D
8F71 5F0E
8F72 5F10
8F73 5F12
8F74 5F14
8F75 5F16
8F76 5F19
8F77 5F1A
8F78 5F1C
8F79 5F1D
8F7A 5F1E
8F7B 5F21
8F7C 5F22
8F7D 5F23
8F7E 5F24
8F80 5F28
8F81 5F2B
8F82 5F2C
8F83 5F2E
8F84 5F30
8F85 5F32
8F86 5F33
8F87 5F34
8F88 5F35
8F89 5F36
8F8A 5F37
8F8B 5F38
8F8C 5F3B
8F8D 5F3D
8F8E 5F3E
8F8F 5F3F
8F90 5F41
8F91 5F42
8F92 5F43
8F93 5F44
8F94 5F45
8F95 5F46
8F96 5F47
8F97 5F48
8F98 5F49
8F99 5F4A
8F9A 5F4B
8F9B 5F4C
8F9C 5F4D
8F9D 5F4E
8F9E 5F4F
8F9F 5F51
8FA0 5F54
8FA1 5F59
8FA2 5F5A
8FA3 5F5B
8FA4 5F5C
8FA5 5F5E
8FA6 5F5F
8FA7 5F60
8FA8 5F63
8FA9 5F65
8FAA 5F67
8FAB 5F68
8FAC 5F6B
8FAD 5F6E
8FAE 5F6F
8FAF 5F72
8FB0 5F74
8FB1 5F75
8FB2 5F76
8FB3 5F78
8FB4 5F7A
8FB5 5F7D
8FB6 5F7E
8FB7 5F7F
8FB8 5F83
8FB9 5F86
8FBA 5F8D
8FBB 5F8E
8FBC 5F8F
8FBD 5F91
8FBE 5F93
8FBF 5F94
8FC0 5F96
8FC1 5F9A
8FC2 5F9B
8FC3 5F9D
8FC4 5F9E
8FC5 5F9F
8FC6 5FA0
8FC7 5FA2
8FC8 5FA3
8FC9 5FA4
8FCA 5FA5
8FCB 5FA6
8FCC 5FA7
8FCD 5FA9
8FCE 5FAB
8FCF 5FAC
8FD0 5FAF
8FD1 5FB0
8FD2 5FB1
8FD3 5FB2
8FD4 5FB3
8FD5 5FB4
8FD6 5FB6
8FD7 5FB8
8FD8 5FB9
8FD9 5FBA
8FDA 5FBB
8FDB 5FBE
8FDC 5FBF
8FDD 5FC0
8FDE 5FC1
8FDF 5FC2
8FE0 5FC7
8FE1 5FC8
8FE2 5FCA
8FE3 5FCB
8FE4 5FCE
8FE5 5FD3
8FE6 5FD4
8FE7 5FD5
8FE8 5FDA
8FE9 5FDB
8FEA 5FDC
8FEB 5FDE
8FEC 5FDF
8FED 5FE2
8FEE 5FE3
8FEF 5FE5
8FF0 5FE6
8FF1 5FE8
8FF2 5FE9
8FF3 5FEC
8FF4 5FEF
8FF5 5FF0
8FF6 5FF2
8FF7 5FF3
8FF8 5FF4
8FF9 5FF6
8FFA 5FF7
8FFB 5FF9
8FFC 5FFA
8FFD 5FFC
8FFE 6007
9040 6008
9041 6009
9042 600B
9043 600C
9044 6010
9045 6011
9046 6013
9047 6017
9048 6018
9049 601A
904A 601E
904B 601F
904C 6022
904D 6023
904E 6024
904F 602C
9050 602D
9051 602E
9052 6030
9053 6031
9054 6032
9055 6033
9056 6034
9057 6036
9058 6037
9059 6038
905A 6039
905B 603A
905C 603D
905D 603E
905E 6040
905F 6044
9060 6045
9061 6046
9062 6047
9063 6048
9064 6049
9065 604A
9066 604C
9067 604E
9068 604F
9069 6051
906A 6053
906B 6054
906C 6056
906D 6057
906E 6058
906F 605B
9070 605C
9071 605E
9072 605F
9073 6060
9074 6061
9075 6065
9076 6066
9077 606E
9078 6071
9079 6072
907A 6074
907B 6075
907C 6077
907D 607E
907E 6080
9080 6081
9081 6082
9082 6085
9083 6086
9084 6087
9085 6088
9086 608A
9087 608B
9088 608E
9089 608F
908A 6090
908B 6091
908C 6093
908D 6095
908E 6097
908F 6098
9090 6099
9091 609C
9092 609E
9093 60A1
9094 60A2
9095 60A4
9096 60A5
9097 60A7
9098 60A9
9099 60AA
909A 60AE
909B 60B0
909C 60B3
909D 60B5
909E 60B6
909F 60B7
90A0 60B9
90A1 60BA
90A2 60BD
90A3 60BE
90A4 60BF
90A5 60C0
90A6 60C1
90A7 60C2
90A8 60C3
90A9 60C4
90AA 60C7
90AB 60C8
90AC 60C9
90AD 60CC
90AE 60CD
90AF 60CE
90B0 60CF
90B1 60D0
90B2 60D2
90B3 60D3
90B4 60D4
90B5 60D6
90B6 60D7
90B7 60D9
90B8 60DB
90B9 60DE
90BA 60E1
90BB 60E2
90BC 60E3
90BD 60E4
90BE 60E5
90BF 60EA
90C0 60F1
90C1 60F2
90C2 60F5
90C3 60F7
90C4 60F8
90C5 60FB
90C6 60FC
90C7 60FD
90C8 60FE
90C9 60FF
90CA 6102
90CB 6103
90CC 6104
90CD 6105
90CE 6107
90CF 610A
90D0 610B
90D1 610C
90D2 6110
90D3 6111
90D4 6112
90D5 6113
90D6 6114
90D7 6116
90D8 6117
90D9 6118
90DA 6119
90DB 611B
90DC 611C
90DD 611D
90DE 611E
90DF 6121
90E0 6122
90E1 6125
90E2 6128
90E3 6129
90E4 612A
90E5 612C
90E6 612D
90E7 612E
90E8 612F
90E9 6130
90EA 6131
90EB 6132
90EC 6133
90ED 6134
90EE 6135
90EF 6136
90F0 6137
90F1 6138
90F2 6139
90F3 613A
90F4 613B
90F5 613C
90F6 613D
90F7 613E
90F8 6140
90F9 6141
90FA 6142
90FB 6143
90FC 6144
90FD 6145
90FE 6146
9140 6147
9141 6149
9142 614B
9143 614D
9144 614F
9145 6150
9146 6152
9147 6153
9148 6154
9149 6156
914A 6157
914B 6158
914C 6159
914D 615A
914E 615B
914F 615C
9150 615E
9151 615F
9152 6160
9153 6161
9154 6163
9155 6164
9156 6165
9157 6166
9158 6169
9159 616A
915A 616B
915B 616C
915C 616D
915D 616E
915E 616F
915F 6171
9160 6172
9161 6173
9162 6174
9163 6176
9164 6178
9165 6179
9166 617A
9167 617B
9168 617C
9169 617D
916A 617E
916B 617F
916C 6180
916D 6181
916E 6182
916F 6183
9170 6184
9171 6185
9172 6186
9173 6187
9174 6188
9175 6189
9176 618A
9177 618C
9178 618D
9179 618F
917A 6190
917B 6191
917C 6192
917D 6193
917E 6195
9180 6196
9181 6197
9182 6198
9183 6199
9184 619A
9185 619B
9186 619C
9187 619E
9188 619F
9189 61A0
918A 61A1
918B 61A2
918C 61A3
918D 61A4
918E 61A5
918F 61A6
9190 61AA
9191 61AB
9192 61AD
9193 61AE
9194 61AF
9195 61B0
9196 61B1
9197 61B2
9198 61B3
9199 61B4
919A 61B5
919B 61B6
919C 61B8
919D 61B9
919E 61BA
919F 61BB
91A0 61BC
91A1 61BD
91A2 61BF
91A3 61C0
91A4 61C1
91A5 61C3
91A6 61C4
91A7 61C5
91A8 61C6
91A9 61C7
91AA 61C9
91AB 61CC
91AC 61CD
91AD 61CE
91AE 61CF
91AF 61D0
91B0 61D3
91B1 61D5
91B2 61D6
91B3 61D7
91B4 61D8
91B5 61D9
91B6 61DA
91B7 61DB
91B8 61DC
91B9 61DD
91BA 61DE
91BB 61DF
91BC 61E0
91BD 61E1
91BE 61E2
91BF 61E3
91C0 61E4
91C1 61E5
91C2 61E7
91C3 61E8
91C4 61E9
91C5 61EA
91C6 61EB
91C7 61EC
91C8 61ED
91C9 61EE
91CA 61EF
91CB 61F0
91CC 61F1
91CD 61F2
91CE 61F3
91CF 61F4
91D0 61F6
91D1 61F7
91D2 61F8
91D3 61F9
91D4 61FA
91D5 61FB
91D6 61FC
91D7 61FD
91D8 61FE
91D9 6200
91DA 6201
91DB 6202
91DC 6203
91DD 6204
91DE 6205
91DF 6207
91E0 6209
91E1 6213
91E2 6214
91E3 6219
91E4 621C
91E5 621D
91E6 621E
91E7 6220
91E8 6223
91E9 6226
91EA 6227
91EB 6228
91EC 6229
91ED 622B
91EE 622D
91EF 622F
91F0 6230
91F1 6231
91F2 6232
91F3 6235
91F4 6236
91F5 6238
91F6 6239
91F7 623A
91F8 623B
91F9 623C
91FA 6242
91FB 6244
91FC 6245
91FD 6246
91FE 624A
9240 624F
9241 6250
9242 6255
9243 6256
9244 6257
9245 6259
9246 625A
9247 625C
9248 625D
9249 625E
924A 625F
924B 6260
924C 6261
924D 6262
924E 6264
924F 6265
9250 6268
9251 6271
9252 6272
9253 6274
9254 6275
9255 6277
9256 6278
9257 627A
9258 627B
9259 627D
925A 6281
925B 6282
925C 6283
925D 6285
925E 6286
925F 6287
9260 6288
9261 628B
9262 628C
9263 628D
9264 628E
9265 628F
9266 6290
9267 6294
9268 6299
9269 629C
926A 629D
926B 629E
926C 62A3
926D 62A6
926E 62A7
926F 62A9
9270 62AA
9271 62AD
9272 62AE
9273 62AF
9274 62B0
9275 62B2
9276 62B3
9277 62B4
9278 62B6
9279 62B7
927A 62B8
927B 62BA
927C 62BE
927D 62C0
927E 62C1
9280 62C3
9281 62CB
9282 62CF
9283 62D1
9284 62D5
9285 62DD
9286 62DE
9287 62E0
9288 62E1
9289 62E4
928A 62EA
928B 62EB
928C 62F0
928D 62F2
928E 62F5
928F 62F8
9290 62F9
9291 62FA
9292 62FB
9293 6300
9294 6303
9295 6304
9296 6305
9297 6306
9298 630A
9299 630B
929A 630C
929B 630D
929C 630F
929D 6310
929E 6312
929F 6313
92A0 6314
92A1 6315
92A2 6317
92A3 6318
92A4 6319
92A5 631C
92A6 6326
92A7 6327
92A8 6329
92A9 632C
92AA 632D
92AB 632E
92AC 6330
92AD 6331
92AE 6333
92AF 6334
92B0 6335
92B1 6336
92B2 6337
92B3 6338
92B4 633B
92B5 633C
92B6 633E
92B7 633F
92B8 6340
92B9 6341
92BA 6344
92BB 6347
92BC 6348
92BD 634A
92BE 6351
92BF 6352
92C0 6353
92C1 6354
92C2 6356
92C3 6357
92C4 6358
92C5 6359
92C6 635A
92C7 635B
92C8 635C
92C9 635D
92CA 6360
92CB 6364
92CC 6365
92CD 6366
92CE 6368
92CF 636A
92D0 636B
92D1 636C
92D2 636F
92D3 6370
92D4 6372
92D5 6373
92D6 6374
92D7 6375
92D8 6378
92D9 6379
92DA 637C
92DB 637D
92DC 637E
92DD 637F
92DE 6381
92DF 6383
92E0 6384
92E1 6385
92E2 6386
92E3 638B
92E4 638D
92E5 6391
92E6 6393
92E7 6394
92E8 6395
92E9 6397
92EA 6399
92EB 639A
92EC 639B
92ED 639C
92EE 639D
92EF 639E
92F0 639F
92F1 63A1
92F2 63A4
92F3 63A6
92F4 63AB
92F5 63AF
92F6 63B1
92F7 63B2
92F8 63B5
92F9 63B6
92FA 63B9
92FB 63BB
92FC 63BD
92FD 63BF
92FE 63C0
9340 63C1
9341 63C2
9342 63C3
9343 63C5
9344 63C7
9345 63C8
9346 63CA
9347 63CB
9348 63CC
9349 63D1
934A 63D3
934B 63D4
934C 63D5
934D 63D7
934E 63D8
934F 63D9
9350 63DA
9351 63DB
9352 63DC
9353 63DD
9354 63DF
9355 63E2
9356 63E4
9357 63E5
9358 63E6
9359 63E7
935A 63E8
935B 63EB
935C 63EC
935D 63EE
935E 63EF
935F 63F0
9360 63F1
9361 63F3
9362 63F5
9363 63F7
9364 63F9
9365 63FA
9366 63FB
9367 63FC
9368 63FE
9369 6403
936A 6404
936B 6406
936C 6407
936D 6408
936E 6409
936F 640A
9370 640D
9371 640E
9372 6411
9373 6412
9374 6415
9375 6416
9376 6417
9377 6418
9378 6419
9379 641A
937A 641D
937B 641F
937C 6422
937D 6423
937E 6424
9380 6425
9381 6427
9382 6428
9383 6429
9384 642B
9385 642E
9386 642F
9387 6430
9388 6431
9389 6432
938A 6433
938B 6435
938C 6436
938D 6437
938E 6438
938F 6439
9390 643B
9391 643C
9392 643E
9393 6440
9394 6442
9395 6443
9396 6449
9397 644B
9398 644C
9399 644D
939A 644E
939B 644F
939C 6450
939D 6451
939E 6453
939F 6455
93A0 6456
93A1 6457
93A2 6459
93A3 645A
93A4 645B
93A5 645C
93A6 645D
93A7 645F
93A8 6460
93A9 6461
93AA 6462
93AB 6463
93AC 6464
93AD 6465
93AE 6466
93AF 6468
93B0 646A
93B1 646B
93B2 646C
93B3 646E
93B4 646F
93B5 6470
93B6 6471
93B7 6472
93B8 6473
93B9 6474
93BA 6475
93BB 6476
93BC 6477
93BD 647B
93BE 647C
93BF 647D
93C0 647E
93C1 647F
93C2 6480
93C3 6481
93C4 6483
93C5 6486
93C6 6488
93C7 6489
93C8 648A
93C9 648B
93CA 648C
93CB 648D
93CC 648E
93CD 648F
93CE 6490
93CF 6493
93D0 6494
93D1 6497
93D2 6498
93D3 649A
93D4 649B
93D5 649C
93D6 649D
93D7 649F
93D8 64A0
93D9 64A1
93DA 64A2
93DB 64A3
93DC 64A5
93DD 64A6
93DE 64A7
93DF 64A8
93E0 64AA
93E1 64AB
93E2 64AF
93E3 64B1
93E4 64B2
93E5 64B3
93E6 64B4
93E7 64B6
93E8 64B9
93E9 64BB
93EA 64BD
93EB 64BE
93EC 64BF
93ED 64C1
93EE 64C3
93EF 64C4
93F0 64C6
93F1 64C7
93F2 64C8
93F3 64C9
93F4 64CA
93F5 64CB
93F6 64CC
93F7 64CF
93F8 64D1
93F9 64D3
93FA 64D4
93FB 64D5
93FC 64D6
93FD 64D9
93FE 64DA
9440 64DB
9441 64DC
9442 64DD
9443 64DF
9444 64E0
9445 64E1
9446 64E3
9447 64E5
9448 64E7
9449 64E8
944A 64E9
944B 64EA
944C 64EB
944D 64EC
944E 64ED
944F 64EE
9450 64EF
9451 64F0
9452 64F1
9453 64F2
9454 64F3
9455 64F4
9456 64F5
9457 64F6
9458 64F7
9459 64F8
945A 64F9
945B 64FA
945C 64FB
945D 64FC
945E 64FD
945F 64FE
9460 64FF
9461 6501
9462 6502
9463 6503
9464 6504
9465 6505
9466 6506
9467 6507
9468 6508
9469 650A
946A 650B
946B 650C
946C 650D
946D 650E
946E 650F
946F 6510
9470 6511
9471 6513
9472 6514
9473 6515
9474 6516
9475 6517
9476 6519
9477 651A
9478 651B
9479 651C
947A 651D
947B 651E
947C 651F
947D 6520
947E 6521
9480 6522
9481 6523
9482 6524
9483 6526
9484 6527
9485 6528
9486 6529
9487 652A
9488 652C
9489 652D
948A 6530
948B 6531
948C 6532
948D 6533
948E 6537
948F 653A
9490 653C
9491 653D
9492 6540
9493 6541
9494 6542
9495 6543
9496 6544
9497 6546
9498 6547
9499 654A
949A 654B
949B 654D
949C 654E
949D 6550
949E 6552
949F 6553
94A0 6554
94A1 6557
94A2 6558
94A3 655A
94A4 655C
94A5 655F
94A6 6560
94A7 6561
94A8 6564
94A9 6565
94AA 6567
94AB 6568
94AC 6569
94AD 656A
94AE 656D
94AF 656E
94B0 656F
94B1 6571
94B2 6573
94B3 6575
94B4 6576
94B5 6578
94B6 6579
94B7 657A
94B8 657B
94B9 657C
94BA 657D
94BB 657E
94BC 657F
94BD 6580
94BE 6581
94BF 6582
94C0 6583
94C1 6584
94C2 6585
94C3 6586
94C4 6588
94C5 6589
94C6 658A
94C7 658D
94C8 658E
94C9 658F
94CA 6592
94CB 6594
94CC 6595
94CD 6596
94CE 6598
94CF 659A
94D0 659D
94D1 659E
94D2 65A0
94D3 65A2
94D4 65A3
94D5 65A6
94D6 65A8
94D7 65AA
94D8 65AC
94D9 65AE
94DA 65B1
94DB 65B2
94DC 65B3
94DD 65B4
94DE 65B5
94DF 65B6
94E0 65B7
94E1 65B8
94E2 65BA
94E3 65BB
94E4 65BE
94E5 65BF
94E6 65C0
94E7 65C2
94E8 65C7
94E9 65C8
94EA 65C9
94EB 65CA
94EC 65CD
94ED 65D0
94EE 65D1
94EF 65D3
94F0 65D4
94F1 65D5
94F2 65D8
94F3 65D9
94F4 65DA
94F5 65DB
94F6 65DC
94F7 65DD
94F8 65DE
94F9 65DF
94FA 65E1
94FB 65E3
94FC 65E4
94FD 65EA
94FE 65EB
9540 65F2
9541 65F3
9542 65F4
9543 65F5
9544 65F8
9545 65F9
9546 65FB
9547 65FC
9548 65FD
9549 65FE
954A 65FF
954B 6601
954C 6604
954D 6605
954E 6607
954F 6608
9550 6609
9551 660B
9552 660D
9553 6610
9554 6611
9555 6612
9556 6616
9557 6617
9558 6618
9559 661A
955A 661B
955B 661C
955C 661E
955D 6621
955E 6622
955F 6623
9560 6624
9561 6626
9562 6629
9563 662A
9564 662B
9565 662C
9566 662E
9567 6630
9568 6632
9569 6633
956A 6637
956B 6638
956C 6639
956D 663A
956E 663B
956F 663D
9570 663F
9571 6640
9572 6642
9573 6644
9574 6645
9575 6646
9576 6647
9577 6648
9578 6649
9579 664A
957A 664D
957B 664E
957C 6650
957D 6651
957E 6658
9580 6659
9581 665B
9582 665C
9583 665D
9584 665E
9585 6660
9586 6662
9587 6663
9588 6665
9589 6667
958A 6669
958B 666A
958C 666B
958D 666C
958E 666D
958F 6671
9590 6672
9591 6673
9592 6675
9593 6678
9594 6679
9595 667B
9596 667C
9597 667D
9598 667F
9599 6680
959A 6681
959B 6683
959C 6685
959D 6686
959E 6688
959F 6689
95A0 668A
95A1 668B
95A2 668D
95A3 668E
95A4 668F
95A5 6690
95A6 6692
95A7 6693
95A8 6694
95A9 6695
95AA 6698
95AB 6699
95AC 669A
95AD 669B
95AE 669C
95AF 669E
95B0 669F
95B1 66A0
95B2 66A1
95B3 66A2
95B4 66A3
95B5 66A4
95B6 66A5
95B7 66A6
95B8 66A9
95B9 66AA
95BA 66AB
95BB 66AC
95BC 66AD
95BD 66AF
95BE 66B0
95BF 66B1
95C0 66B2
95C1 66B3
95C2 66B5
95C3 66B6
95C4 66B7
95C5 66B8
95C6 66BA
95C7 66BB
95C8 66BC
95C9 66BD
95CA 66BF
95CB 66C0
95CC 66C1
95CD 66C2
95CE 66C3
95CF 66C4
95D0 66C5
95D1 66C6
95D2 66C7
95D3 66C8
95D4 66C9
95D5 66CA
95D6 66CB
95D7 66CC
95D8 66CD
95D9 66CE
95DA 66CF
95DB 66D0
95DC 66D1
95DD 66D2
95DE 66D3
95DF 66D4
95E0 66D5
95E1 66D6
95E2 66D7
95E3 66D8
95E4 66DA
95E5 66DE
95E6 66DF
95E7 66E0
95E8 66E1
95E9 66E2
95EA 66E3
95EB 66E4
95EC 66E5
95ED 66E7
95EE 66E8
95EF 66EA
95F0 66EB
95F1 66EC
95F2 66ED
95F3 66EE
95F4 66EF
95F5 66F1
95F6 66F5
95F7 66F6
95F8 66F8
95F9 66FA
95FA 66FB
95FB 66FD
95FC 6701
95FD 6702
95FE 6703
9640 6704
9641 6705
9642 6706
9643 6707
9644 670C
9645 670E
9646 670F
9647 6711
9648 6712
9649 6713
964A 6716
964B 6718
964C 6719
964D 671A
964E 671C
964F 671E
9650 6720
9651 6721
9652 6722
9653 6723
9654 6724
9655 6725
9656 6727
9657 6729
9658 672E
9659 6730
965A 6732
965B 6733
965C 6736
965D 6737
965E 6738
965F 6739
9660 673B
9661 673C
9662 673E
9663 673F
9664 6741
9665 6744
9666 6745
9667 6747
9668 674A
9669 674B
966A 674D
966B 6752
966C 6754
966D 6755
966E 6757
966F 6758
9670 6759
9671 675A
9672 675B
9673 675D
9674 6762
9675 6763
9676 6764
9677 6766
9678 6767
9679 676B
967A 676C
967B 676E
967C 6771
967D 6774
967E 6776
9680 6778
9681 6779
9682 677A
9683 677B
9684 677D
9685 6780
9686 6782
9687 6783
9688 6785
9689 6786
968A 6788
968B 678A
968C 678C
968D 678D
968E 678E
968F 678F
9690 6791
9691 6792
9692 6793
9693 6794
9694 6796
9695 6799
9696 679B
9697 679F
9698 67A0
9699 67A1
969A 67A4
969B 67A6
969C 67A9
969D 67AC
969E 67AE
969F 67B1
96A0 67B2
96A1 67B4
96A2 67B9
96A3 67BA
96A4 67BB
96A5 67BC
96A6 67BD
96A7 67BE
96A8 67BF
96A9 67C0
96AA 67C2
96AB 67C5
96AC 67C6
96AD 67C7
96AE 67C8
96AF 67C9
96B0 67CA
96B1 67CB
96B2 67CC
96B3 67CD
96B4 67CE
96B5 67D5
96B6 67D6
96B7 67D7
96B8 67DB
96B9 67DF
96BA 67E1
96BB 67E3
96BC 67E4
96BD 67E6
96BE 67E7
96BF 67E8
96C0 67EA
96C1 67EB
96C2 67ED
96C3 67EE
96C4 67F2
96C5 67F5
96C6 67F6
96C7 67F7
96C8 67F8
96C9 67F9
96CA 67FA
96CB 67FB
96CC 67FC
96CD 67FE
96CE 6801
96CF 6802
96D0 6803
96D1 6804
96D2 6806
96D3 680D
96D4 6810
96D5 6812
96D6 6814
96D7 6815
96D8 6818
96D9 6819
96DA 681A
96DB 681B
96DC 681C
96DD 681E
96DE 681F
96DF 6820
96E0 6822
96E1 6823
96E2 6824
96E3 6825
96E4 6826
96E5 6827
96E6 6828
96E7 682B
96E8 682C
96E9 682D
96EA 682E
96EB 682F
96EC 6830
96ED 6831
96EE 6834
96EF 6835
96F0 6836
96F1 683A
96F2 683B
96F3 683F
96F4 6847
96F5 684B
96F6 684D
96F7 684F
96F8 6852
96F9 6856
96FA 6857
96FB 6858
96FC 6859
96FD 685A
96FE 685B
9740 685C
9741 685D
9742 685E
9743 685F
9744 686A
9745 686C
9746 686D
9747 686E
9748 686F
9749 6870
974A 6871
974B 6872
974C 6873
974D 6875
974E 6878
974F 6879
9750 687A
9751 687B
9752 687C
9753 687D
9754 687E
9755 687F
9756 6880
9757 6882
9758 6884
9759 6887
975A 6888
975B 6889
975C 688A
975D 688B
975E 688C
975F 688D
9760 688E
9761 6890
9762 6891
9763 6892
9764 6894
9765 6895
9766 6896
9767 6898
9768 6899
9769 689A
976A 689B
976B 689C
976C 689D
976D 689E
976E 689F
976F 68A0
9770 68A1
9771 68A3
9772 68A4
9773 68A5
9774 68A9
9775 68AA
9776 68AB
9777 68AC
9778 68AE
9779 68B1
977A 68B2
977B 68B4
977C 68B6
977D 68B7
977E 68B8
9780 68B9
9781 68BA
9782 68BB
9783 68BC
9784 68BD
9785 68BE
9786 68BF
9787 68C1
9788 68C3
9789 68C4
978A 68C5
978B 68C6
978C 68C7
978D 68C8
978E 68CA
978F 68CC
9790 68CE
9791 68CF
9792 68D0
9793 68D1
9794 68D3
9795 68D4
9796 68D6
9797 68D7
9798 68D9
9799 68DB
979A 68DC
979B 68DD
979C 68DE
979D 68DF
979E 68E1
979F 68E2
97A0 68E4
97A1 68E5
97A2 68E6
97A3 68E7
97A4 68E8
97A5 68E9
97A6 68EA
97A7 68EB
97A8 68EC
97A9 68ED
97AA 68EF
97AB 68F2
97AC 68F3
97AD 68F4
97AE 68F6
97AF 68F7
97B0 68F8
97B1 68FB
97B2 68FD
97B3 68FE
97B4 68FF
97B5 6900
97B6 6902
97B7 6903
97B8 6904
97B9 6906
97BA 6907
97BB 6908
97BC 6909
97BD 690A
97BE 690C
97BF 690F
97C0 6911
97C1 6913
97C2 6914
97C3 6915
97C4 6916
97C5 6917
97C6 6918
97C7 6919
97C8 691A
97C9 691B
97CA 691C
97CB 691D
97CC 691E
97CD 6921
97CE 6922
97CF 6923
97D0 6925
97D1 6926
97D2 6927
97D3 6928
97D4 6929
97D5 692A
97D6 692B
97D7 692C
97D8 692E
97D9 692F
97DA 6931
97DB 6932
97DC 6933
97DD 6935
97DE 6936
97DF 6937
97E0 6938
97E1 693A
97E2 693B
97E3 693C
97E4 693E
97E5 6940
97E6 6941
97E7 6943
97E8 6944
97E9 6945
97EA 6946
97EB 6947
97EC 6948
97ED 6949
97EE 694A
97EF 694B
97F0 694C
97F1 694D
97F2 694E
97F3 694F
97F4 6950
97F5 6951
97F6 6952
97F7 6953
97F8 6955
97F9 6956
97FA 6958
97FB 6959
97FC 695B
97FD 695C
97FE 695F
9840 6961
9841 6962
9842 6964
9843 6965
9844 6967
9845 6968
9846 6969
9847 696A
9848 696C
9849 696D
984A 696F
984B 6970
984C 6972
984D 6973
984E 6974
984F 6975
9850 6976
9851 697A
9852 697B
9853 697D
9854 697E
9855 697F
9856 6981
9857 6983
9858 6985
9859 698A
985A 698B
985B 698C
985C 698E
985D 698F
985E 6990
985F 6991
9860 6992
9861 6993
9862 6996
9863 6997
9864 6999
9865 699A
9866 699D
9867 699E
9868 699F
9869 69A0
986A 69A1
986B 69A2
986C 69A3
986D 69A4
986E 69A5
986F 69A6
9870 69A9
9871 69AA
9872 69AC
9873 69AE
9874 69AF
9875 69B0
9876 69B2
9877 69B3
9878 69B5
9879 69B6
987A 69B8
987B 69B9
987C 69BA
987D 69BC
987E 69BD
9880 69BE
9881 69BF
9882 69C0
9883 69C2
9884 69C3
9885 69C4
9886 69C5
9887 69C6
9888 69C7
9889 69C8
988A 69C9
988B 69CB
988C 69CD
988D 69CF
988E 69D1
988F 69D2
9890 69D3
9891 69D5
9892 69D6
9893 69D7
9894 69D8
9895 69D9
9896 69DA
9897 69DC
9898 69DD
9899 69DE
989A 69E1
989B 69E2
989C 69E3
989D 69E4
989E 69E5
989F 69E6
98A0 69E7
98A1 69E8
98A2 69E9
98A3 69EA
98A4 69EB
98A5 69EC
98A6 69EE
98A7 69EF
98A8 69F0
98A9 69F1
98AA 69F3
98AB 69F4
98AC 69F5
98AD 69F6
98AE 69F7
98AF 69F8
98B0 69F9
98B1 69FA
98B2 69FB
98B3 69FC
98B4 69FE
98B5 6A00
98B6 6A01
98B7 6A02
98B8 6A03
98B9 6A04
98BA 6A05
98BB 6A06
98BC 6A07
98BD 6A08
98BE 6A09
98BF 6A0B
98C0 6A0C
98C1 6A0D
98C2 6A0E
98C3 6A0F
98C4 6A10
98C5 6A11
98C6 6A12
98C7 6A13
98C8 6A14
98C9 6A15
98CA 6A16
98CB 6A19
98CC 6A1A
98CD 6A1B
98CE 6A1C
98CF 6A1D
98D0 6A1E
98D1 6A20
98D2 6A22
98D3 6A23
98D4 6A24
98D5 6A25
98D6 6A26
98D7 6A27
98D8 6A29
98D9 6A2B
98DA 6A2C
98DB 6A2D
98DC 6A2E
98DD 6A30
98DE 6A32
98DF 6A33
98E0 6A34
98E1 6A36
98E2 6A37
98E3 6A38
98E4 6A39
98E5 6A3A
98E6 6A3B
98E7 6A3C
98E8 6A3F
98E9 6A40
98EA 6A41
98EB 6A42
98EC 6A43
98ED 6A45
98EE 6A46
98EF 6A48
98F0 6A49
98F1 6A4A
98F2 6A4B
98F3 6A4C
98F4 6A4D
98F5 6A4E
98F6 6A4F
98F7 6A51
98F8 6A52
98F9 6A53
98FA 6A54
98FB 6A55
98FC 6A56
98FD 6A57
98FE 6A5A
9940 6A5C
9941 6A5D
9942 6A5E
9943 6A5F
9944 6A60
9945 6A62
9946 6A63
9947 6A64
9948 6A66
9949 6A67
994A 6A68
994B 6A69
994C 6A6A
994D 6A6B
994E 6A6C
994F 6A6D
9950 6A6E
9951 6A6F
9952 6A70
9953 6A72
9954 6A73
9955 6A74
9956 6A75
9957 6A76
9958 6A77
9959 6A78
995A 6A7A
995B 6A7B
995C 6A7D
995D 6A7E
995E 6A7F
995F 6A81
9960 6A82
9961 6A83
9962 6A85
9963 6A86
9964 6A87
9965 6A88
9966 6A89
9967 6A8A
9968 6A8B
9969 6A8C
996A 6A8D
996B 6A8F
996C 6A92
996D 6A93
996E 6A94
996F 6A95
9970 6A96
9971 6A98
9972 6A99
9973 6A9A
9974 6A9B
9975 6A9C
9976 6A9D
9977 6A9E
9978 6A9F
9979 6AA1
997A 6AA2
997B 6AA3
997C 6AA4
997D 6AA5
997E 6AA6
9980 6AA7
9981 6AA8
9982 6AAA
9983 6AAD
9984 6AAE
9985 6AAF
9986 6AB0
9987 6AB1
9988 6AB2
9989 6AB3
998A 6AB4
998B 6AB5
998C 6AB6
998D 6AB7
998E 6AB8
998F 6AB9
9990 6ABA
9991 6ABB
9992 6ABC
9993 6ABD
9994 6ABE
9995 6ABF
9996 6AC0
9997 6AC1
9998 6AC2
9999 6AC3
999A 6AC4
999B 6AC5
999C 6AC6
999D 6AC7
999E 6AC8
999F 6AC9
99A0 6ACA
99A1 6ACB
99A2 6ACC
99A3 6ACD
99A4 6ACE
99A5 6ACF
99A6 6AD0
99A7 6AD1
99A8 6AD2
99A9 6AD3
99AA 6AD4
99AB 6AD5
99AC 6AD6
99AD 6AD7
99AE 6AD8
99AF 6AD9
99B0 6ADA
99B1 6ADB
99B2 6ADC
99B3 6ADD
99B4 6ADE
99B5 6ADF
99B6 6AE0
99B7 6AE1
99B8 6AE2
99B9 6AE3
99BA 6AE4
99BB 6AE5
99BC 6AE6
99BD 6AE7
99BE 6AE8
99BF 6AE9
99C0 6AEA
99C1 6AEB
99C2 6AEC
99C3 6AED
99C4 6AEE
99C5 6AEF
99C6 6AF0
99C7 6AF1
99C8 6AF2
99C9 6AF3
99CA 6AF4
99CB 6AF5
99CC 6AF6
99CD 6AF7
99CE 6AF8
99CF 6AF9
99D0 6AFA
99D1 6AFB
99D2 6AFC
99D3 6AFD
99D4 6AFE
99D5 6AFF
99D6 6B00
99D7 6B01
99D8 6B02
99D9 6B03
99DA 6B04
99DB 6B05
99DC 6B06
99DD 6B07
99DE 6B08
99DF 6B09
99E0 6B0A
99E1 6B0B
99E2 6B0C
99E3 6B0D
99E4 6B0E
99E5 6B0F
99E6 6B10
99E7 6B11
99E8 6B12
99E9 6B13
99EA 6B14
99EB 6B15
99EC 6B16
99ED 6B17
99EE 6B18
99EF 6B19
99F0 6B1A
99F1 6B1B
99F2 6B1C
99F3 6B1D
99F4 6B1E
99F5 6B1F
99F6 6B25
99F7 6B26
99F8 6B28
99F9 6B29
99FA 6B2A
99FB 6B2B
99FC 6B2C
99FD 6B2D
99FE 6B2E
9A40 6B2F
9A41 6B30
9A42 6B31
9A43 6B33
9A44 6B34
9A45 6B35
9A46 6B36
9A47 6B38
9A48 6B3B
9A49 6B3C
9A4A 6B3D
9A4B 6B3F
9A4C 6B40
9A4D 6B41
9A4E 6B42
9A4F 6B44
9A50 6B45
9A51 6B48
9A52 6B4A
9A53 6B4B
9A54 6B4D
9A55 6B4E
9A56 6B4F
9A57 6B50
9A58 6B51
9A59 6B52
9A5A 6B53
9A5B 6B54
9A5C 6B55
9A5D 6B56
9A5E 6B57
9A5F 6B58
9A60 6B5A
9A61 6B5B
9A62 6B5C
9A63 6B5D
9A64 6B5E
9A65 6B5F
9A66 6B60
9A67 6B61
9A68 6B68
9A69 6B69
9A6A 6B6B
9A6B 6B6C
9A6C 6B6D
9A6D 6B6E
9A6E 6B6F
9A6F 6B70
9A70 6B71
9A71 6B72
9A72 6B73
9A73 6B74
9A74 6B75
9A75 6B76
9A76 6B77
9A77 6B78
9A78 6B7A
9A79 6B7D
9A7A 6B7E
9A7B 6B7F
9A7C 6B80
9A7D 6B85
9A7E 6B88
9A80 6B8C
9A81 6B8E
9A82 6B8F
9A83 6B90
9A84 6B91
9A85 6B94
9A86 6B95
9A87 6B97
9A88 6B98
9A89 6B99
9A8A 6B9C
9A8B 6B9D
9A8C 6B9E
9A8D 6B9F
9A8E 6BA0
9A8F 6BA2
9A90 6BA3
9A91 6BA4
9A92 6BA5
9A93 6BA6
9A94 6BA7
9A95 6BA8
9A96 6BA9
9A97 6BAB
9A98 6BAC
9A99 6BAD
9A9A 6BAE
9A9B 6BAF
9A9C 6BB0
9A9D 6BB1
9A9E 6BB2
9A9F 6BB6
9AA0 6BB8
9AA1 6BB9
9AA2 6BBA
9AA3 6BBB
9AA4 6BBC
9AA5 6BBD
9AA6 6BBE
9AA7 6BC0
9AA8 6BC3
9AA9 6BC4
9AAA 6BC6
9AAB 6BC7
9AAC 6BC8
9AAD 6BC9
9AAE 6BCA
9AAF 6BCC
9AB0 6BCE
9AB1 6BD0
9AB2 6BD1
9AB3 6BD8
9AB4 6BDA
9AB5 6BDC
9AB6 6BDD
9AB7 6BDE
9AB8 6BDF
9AB9 6BE0
9ABA 6BE2
9ABB 6BE3
9ABC 6BE4
9ABD 6BE5
9ABE 6BE6
9ABF 6BE7
9AC0 6BE8
9AC1 6BE9
9AC2 6BEC
9AC3 6BED
9AC4 6BEE
9AC5 6BF0
9AC6 6BF1
9AC7 6BF2
9AC8 6BF4
9AC9 6BF6
9ACA 6BF7
9ACB 6BF8
9ACC 6BFA
9ACD 6BFB
9ACE 6BFC
9ACF 6BFE
9AD0 6BFF
9AD1 6C00
9AD2 6C01
9AD3 6C02
9AD4 6C03
9AD5 6C04
9AD6 6C08
9AD7 6C09
9AD8 6C0A
9AD9 6C0B
9ADA 6C0C
9ADB 6C0E
9ADC 6C12
9ADD 6C17
9ADE 6C1C
9ADF 6C1D
9AE0 6C1E
9AE1 6C20
9AE2 6C23
9AE3 6C25
9AE4 6C2B
9AE5 6C2C
9AE6 6C2D
9AE7 6C31
9AE8 6C33
9AE9 6C36
9AEA 6C37
9AEB 6C39
9AEC 6C3A
9AED 6C3B
9AEE 6C3C
9AEF 6C3E
9AF0 6C3F
9AF1 6C43
9AF2 6C44
9AF3 6C45
9AF4 6C48
9AF5 6C4B
9AF6 6C4C
9AF7 6C4D
9AF8 6C4E
9AF9 6C4F
9AFA 6C51
9AFB 6C52
9AFC 6C53
9AFD 6C56
9AFE 6C58
9B40 6C59
9B41 6C5A
9B42 6C62
9B43 6C63
9B44 6C65
9B45 6C66
9B46 6C67
9B47 6C6B
9B48 6C6C
9B49 6C6D
9B4A 6C6E
9B4B 6C6F
9B4C 6C71
9B4D 6C73
9B4E 6C75
9B4F 6C77
9B50 6C78
9B51 6C7A
9B52 6C7B
9B53 6C7C
9B54 6C7F
9B55 6C80
9B56 6C84
9B57 6C87
9B58 6C8A
9B59 6C8B
9B5A 6C8D
9B5B 6C8E
9B5C 6C91
9B5D 6C92
9B5E 6C95
9B5F 6C96
9B60 6C97
9B61 6C98
9B62 6C9A
9B63 6C9C
9B64 6C9D
9B65 6C9E
9B66 6CA0
9B67 6CA2
9B68 6CA8
9B69 6CAC
9B6A 6CAF
9B6B 6CB0
9B6C 6CB4
9B6D 6CB5
9B6E 6CB6
9B6F 6CB7
9B70 6CBA
9B71 6CC0
9B72 6CC1
9B73 6CC2
9B74 6CC3
9B75 6CC6
9B76 6CC7
9B77 6CC8
9B78 6CCB
9B79 6CCD
9B7A 6CCE
9B7B 6CCF
9B7C 6CD1
9B7D 6CD2
9B7E 6CD8
9B80 6CD9
9B81 6CDA
9B82 6CDC
9B83 6CDD
9B84 6CDF
9B85 6CE4
9B86 6CE6
9B87 6CE7
9B88 6CE9
9B89 6CEC
9B8A 6CED
9B8B 6CF2
9B8C 6CF4
9B8D 6CF9
9B8E 6CFF
9B8F 6D00
9B90 6D02
9B91 6D03
9B92 6D05
9B93 6D06
9B94 6D08
9B95 6D09
9B96 6D0A
9B97 6D0D
9B98 6D0F
9B99 6D10
9B9A 6D11
9B9B 6D13
9B9C 6D14
9B9D 6D15
9B9E 6D16
9B9F 6D18
9BA0 6D1C
9BA1 6D1D
9BA2 6D1F
9BA3 6D20
9BA4 6D21
9BA5 6D22
9BA6 6D23
9BA7 6D24
9BA8 6D26
9BA9 6D28
9BAA 6D29
9BAB 6D2C
9BAC 6D2D
9BAD 6D2F
9BAE 6D30
9BAF 6D34
9BB0 6D36
9BB1 6D37
9BB2 6D38
9BB3 6D3A
9BB4 6D3F
9BB5 6D40
9BB6 6D42
9BB7 6D44
9BB8 6D49
9BB9 6D4C
9BBA 6D50
9BBB 6D55
9BBC 6D56
9BBD 6D57
9BBE 6D58
9BBF 6D5B
9BC0 6D5D
9BC1 6D5F
9BC2 6D61
9BC3 6D62
9BC4 6D64
9BC5 6D65
9BC6 6D67
9BC7 6D68
9BC8 6D6B
9BC9 6D6C
9BCA 6D6D
9BCB 6D70
9BCC 6D71
9BCD 6D72
9BCE 6D73
9BCF 6D75
9BD0 6D76
9BD1 6D79
9BD2 6D7A
9BD3 6D7B
9BD4 6D7D
9BD5 6D7E
9BD6 6D7F
9BD7 6D80
9BD8 6D81
9BD9 6D83
9BDA 6D84
9BDB 6D86
9BDC 6D87
9BDD 6D8A
9BDE 6D8B
9BDF 6D8D
9BE0 6D8F
9BE1 6D90
9BE2 6D92
9BE3 6D96
9BE4 6D97
9BE5 6D98
9BE6 6D99
9BE7 6D9A
9BE8 6D9C
9BE9 6DA2
9BEA 6DA5
9BEB 6DAC
9BEC 6DAD
9BED 6DB0
9BEE 6DB1
9BEF 6DB3
9BF0 6DB4
9BF1 6DB6
9BF2 6DB7
9BF3 6DB9
9BF4 6DBA
9BF5 6DBB
9BF6 6DBC
9BF7 6DBD
9BF8 6DBE
9BF9 6DC1
9BFA 6DC2
9BFB 6DC3
9BFC 6DC8
9BFD 6DC9
9BFE 6DCA
9C40 6DCD
9C41 6DCE
9C42 6DCF
9C43 6DD0
9C44 6DD2
9C45 6DD3
9C46 6DD4
9C47 6DD5
9C48 6DD7
9C49 6DDA
9C4A 6DDB
9C4B 6DDC
9C4C 6DDF
9C4D 6DE2
9C4E 6DE3
9C4F 6DE5
9C50 6DE7
9C51 6DE8
9C52 6DE9
9C53 6DEA
9C54 6DED
9C55 6DEF
9C56 6DF0
9C57 6DF2
9C58 6DF4
9C59 6DF5
9C5A 6DF6
9C5B 6DF8
9C5C 6DFA
9C5D 6DFD
9C5E 6DFE
9C5F 6DFF
9C60 6E00
9C61 6E01
9C62 6E02
9C63 6E03
9C64 6E04
9C65 6E06
9C66 6E07
9C67 6E08
9C68 6E09
9C69 6E0B
9C6A 6E0F
9C6B 6E12
9C6C 6E13
9C6D 6E15
9C6E 6E18
9C6F 6E19
9C70 6E1B
9C71 6E1C
9C72 6E1E
9C73 6E1F
9C74 6E22
9C75 6E26
9C76 6E27
9C77 6E28
9C78 6E2A
9C79 6E2C
9C7A 6E2E
9C7B 6E30
9C7C 6E31
9C7D 6E33
9C7E 6E35
9C80 6E36
9C81 6E37
9C82 6E39
9C83 6E3B
9C84 6E3C
9C85 6E3D
9C86 6E3E
9C87 6E3F
9C88 6E40
9C89 6E41
9C8A 6E42
9C8B 6E45
9C8C 6E46
9C8D 6E47
9C8E 6E48
9C8F 6E49
9C90 6E4A
9C91 6E4B
9C92 6E4C
9C93 6E4F
9C94 6E50
9C95 6E51
9C96 6E52
9C97 6E55
9C98 6E57
9C99 6E59
9C9A 6E5A
9C9B 6E5C
9C9C 6E5D
9C9D 6E5E
9C9E 6E60
9C9F 6E61
9CA0 6E62
9CA1 6E63
9CA2 6E64
9CA3 6E65
9CA4 6E66
9CA5 6E67
9CA6 6E68
9CA7 6E69
9CA8 6E6A
9CA9 6E6C
9CAA 6E6D
9CAB 6E6F
9CAC 6E70
9CAD 6E71
9CAE 6E72
9CAF 6E73
9CB0 6E74
9CB1 6E75
9CB2 6E76
9CB3 6E77
9CB4 6E78
9CB5 6E79
9CB6 6E7A
9CB7 6E7B
9CB8 6E7C
9CB9 6E7D
9CBA 6E80
9CBB 6E81
9CBC 6E82
9CBD 6E84
9CBE 6E87
9CBF 6E88
9CC0 6E8A
9CC1 6E8B
9CC2 6E8C
9CC3 6E8D
9CC4 6E8E
9CC5 6E91
9CC6 6E92
9CC7 6E93
9CC8 6E94
9CC9 6E95
9CCA 6E96
9CCB 6E97
9CCC 6E99
9CCD 6E9A
9CCE 6E9B
9CCF 6E9D
9CD0 6E9E
9CD1 6EA0
9CD2 6EA1
9CD3 6EA3
9CD4 6EA4
9CD5 6EA6
9CD6 6EA8
9CD7 6EA9
9CD8 6EAB
9CD9 6EAC
9CDA 6EAD
9CDB 6EAE
9CDC 6EB0
9CDD 6EB3
9CDE 6EB5
9CDF 6EB8
9CE0 6EB9
9CE1 6EBC
9CE2 6EBE
9CE3 6EBF
9CE4 6EC0
9CE5 6EC3
9CE6 6EC4
9CE7 6EC5
9CE8 6EC6
9CE9 6EC8
9CEA 6EC9
9CEB 6ECA
9CEC 6ECC
9CED 6ECD
9CEE 6ECE
9CEF 6ED0
9CF0 6ED2
9CF1 6ED6
9CF2 6ED8
9CF3 6ED9
9CF4 6EDB
9CF5 6EDC
9CF6 6EDD
9CF7 6EE3
9CF8 6EE7
9CF9 6EEA
9CFA 6EEB
9CFB 6EEC
9CFC 6EED
9CFD 6EEE
9CFE 6EEF
9D40 6EF0
9D41 6EF1
9D42 6EF2
9D43 6EF3
9D44 6EF5
9D45 6EF6
9D46 6EF7
9D47 6EF8
9D48 6EFA
9D49 6EFB
9D4A 6EFC
9D4B 6EFD
9D4C 6EFE
9D4D 6EFF
9D4E 6F00
9D4F 6F01
9D50 6F03
9D51 6F04
9D52 6F05
9D53 6F07
9D54 6F08
9D55 6F0A
9D56 6F0B
9D57 6F0C
9D58 6F0D
9D59 6F0E
9D5A 6F10
9D5B 6F11
9D5C 6F12
9D5D 6F16
9D5E 6F17
9D5F 6F18
9D60 6F19
9D61 6F1A
9D62 6F1B
9D63 6F1C
9D64 6F1D
9D65 6F1E
9D66 6F1F
9D67 6F21
9D68 6F22
9D69 6F23
9D6A 6F25
9D6B 6F26
9D6C 6F27
9D6D 6F28
9D6E 6F2C
9D6F 6F2E
9D70 6F30
9D71 6F32
9D72 6F34
9D73 6F35
9D74 6F37
9D75 6F38
9D76 6F39
9D77 6F3A
9D78 6F3B
9D79 6F3C
9D7A 6F3D
9D7B 6F3F
9D7C 6F40
9D7D 6F41
9D7E 6F42
9D80 6F43
9D81 6F44
9D82 6F45
9D83 6F48
9D84 6F49
9D85 6F4A
9D86 6F4C
9D87 6F4E
9D88 6F4F
9D89 6F50
9D8A 6F51
9D8B 6F52
9D8C 6F53
9D8D 6F54
9D8E 6F55
9D8F 6F56
9D90 6F57
9D91 6F59
9D92 6F5A
9D93 6F5B
9D94 6F5D
9D95 6F5F
9D96 6F60
9D97 6F61
9D98 6F63
9D99 6F64
9D9A 6F65
9D9B 6F67
9D9C 6F68
9D9D 6F69
9D9E 6F6A
9D9F 6F6B
9DA0 6F6C
9DA1 6F6F
9DA2 6F70
9DA3 6F71
9DA4 6F73
9DA5 6F75
9DA6 6F76
9DA7 6F77
9DA8 6F79
9DA9 6F7B
9DAA 6F7D
9DAB 6F7E
9DAC 6F7F
9DAD 6F80
9DAE 6F81
9DAF 6F82
9DB0 6F83
9DB1 6F85
9DB2 6F86
9DB3 6F87
9DB4 6F8A
9DB5 6F8B
9DB6 6F8F
9DB7 6F90
9DB8 6F91
9DB9 6F92
9DBA 6F93
9DBB 6F94
9DBC 6F95
9DBD 6F96
9DBE 6F97
9DBF 6F98
9DC0 6F99
9DC1 6F9A
9DC2 6F9B
9DC3 6F9D
9DC4 6F9E
9DC5 6F9F
9DC6 6FA0
9DC7 6FA2
9DC8 6FA3
9DC9 6FA4
9DCA 6FA5
9DCB 6FA6
9DCC 6FA8
9DCD 6FA9
9DCE 6FAA
9DCF 6FAB
9DD0 6FAC
9DD1 6FAD
9DD2 6FAE
9DD3 6FAF
9DD4 6FB0
9DD5 6FB1
9DD6 6FB2
9DD7 6FB4
9DD8 6FB5
9DD9 6FB7
9DDA 6FB8
9DDB 6FBA
9DDC 6FBB
9DDD 6FBC
9DDE 6FBD
9DDF 6FBE
9DE0 6FBF
9DE1 6FC1
9DE2 6FC3
9DE3 6FC4
9DE4 6FC5
9DE5 6FC6
9DE6 6FC7
9DE7 6FC8
9DE8 6FCA
9DE9 6FCB
9DEA 6FCC
9DEB 6FCD
9DEC 6FCE
9DED 6FCF
9DEE 6FD0
9DEF 6FD3
9DF0 6FD4
9DF1 6FD5
9DF2 6FD6
9DF3 6FD7
9DF4 6FD8
9DF5 6FD9
9DF6 6FDA
9DF7 6FDB
9DF8 6FDC
9DF9 6FDD
9DFA 6FDF
9DFB 6FE2
9DFC 6FE3
9DFD 6FE4
9DFE 6FE5
9E40 6FE6
9E41 6FE7
9E42 6FE8
9E43 6FE9
9E44 6FEA
9E45 6FEB
9E46 6FEC
9E47 6FED
9E48 6FF0
9E49 6FF1
9E4A 6FF2
9E4B 6FF3
9E4C 6FF4
9E4D 6FF5
9E4E 6FF6
9E4F 6FF7
9E50 6FF8
9E51 6FF9
9E52 6FFA
9E53 6FFB
9E54 6FFC
9E55 6FFD
9E56 6FFE
9E57 6FFF
9E58 7000
9E59 7001
9E5A 7002
9E5B 7003
9E5C 7004
9E5D 7005
9E5E 7006
9E5F 7007
9E60 7008
9E61 7009
9E62 700A
9E63 700B
9E64 700C
9E65 700D
9E66 700E
9E67 700F
9E68 7010
9E69 7012
9E6A 7013
9E6B 7014
9E6C 7015
9E6D 7016
9E6E 7017
9E6F 7018
9E70 7019
9E71 701C
9E72 701D
9E73 701E
9E74 701F
9E75 7020
9E76 7021
9E77 7022
9E78 7024
9E79 7025
9E7A 7026
9E7B 7027
9E7C 7028
9E7D 7029
9E7E 702A
9E80 702B
9E81 702C
9E82 702D
9E83 702E
9E84 702F
9E85 7030
9E86 7031
9E87 7032
9E88 7033
9E89 7034
9E8A 7036
9E8B 7037
9E8C 7038
9E8D 703A
9E8E 703B
9E8F 703C
9E90 703D
9E91 703E
9E92 703F
9E93 7040
9E94 7041
9E95 7042
9E96 7043
9E97 7044
9E98 7045
9E99 7046
9E9A 7047
9E9B 7048
9E9C 7049
9E9D 704A
9E9E 704B
9E9F 704D
9EA0 704E
9EA1 7050
9EA2 7051
9EA3 7052
9EA4 7053
9EA5 7054
9EA6 7055
9EA7 7056
9EA8 7057
9EA9 7058
9EAA 7059
9EAB 705A
9EAC 705B
9EAD 705C
9EAE 705D
9EAF 705F
9EB0 7060
9EB1 7061
9EB2 7062
9EB3 7063
9EB4 7064
9EB5 7065
9EB6 7066
9EB7 7067
9EB8 7068
9EB9 7069
9EBA 706A
9EBB 706E
9EBC 7071
9EBD 7072
9EBE 7073
9EBF 7074
9EC0 7077
9EC1 7079
9EC2 707A
9EC3 707B
9EC4 707D
9EC5 7081
9EC6 7082
9EC7 7083
9EC8 7084
9EC9 7086
9ECA 7087
9ECB 7088
9ECC 708B
9ECD 708C
9ECE 708D
9ECF 708F
9ED0 7090
9ED1 7091
9ED2 7093
9ED3 7097
9ED4 7098
9ED5 709A
9ED6 709B
9ED7 709E
9ED8 709F
9ED9 70A0
9EDA 70A1
9EDB 70A2
9EDC 70A3
9EDD 70A4
9EDE 70A5
9EDF 70A6
9EE0 70A7
9EE1 70A8
9EE2 70A9
9EE3 70AA
9EE4 70B0
9EE5 70B2
9EE6 70B4
9EE7 70B5
9EE8 70B6
9EE9 70BA
9EEA 70BE
9EEB 70BF
9EEC 70C4
9EED 70C5
9EEE 70C6
9EEF 70C7
9EF0 70C9
9EF1 70CB
9EF2 70CC
9EF3 70CD
9EF4 70CE
9EF5 70CF
9EF6 70D0
9EF7 70D1
9EF8 70D2
9EF9 70D3
9EFA 70D4
9EFB 70D5
9EFC 70D6
9EFD 70D7
9EFE 70DA
9F40 70DC
9F41 70DD
9F42 70DE
9F43 70E0
9F44 70E1
9F45 70E2
9F46 70E3
9F47 70E5
9F48 70EA
9F49 70EE
9F4A 70F0
9F4B 70F1
9F4C 70F2
9F4D 70F3
9F4E 70F4
9F4F 70F5
9F50 70F6
9F51 70F8
9F52 70FA
9F53 70FB
9F54 70FC
9F55 70FE
9F56 70FF
9F57 7100
9F58 7101
9F59 7102
9F5A 7103
9F5B 7104
9F5C 7105
9F5D 7106
9F5E 7107
9F5F 7108
9F60 710B
9F61 710C
9F62 710D
9F63 710E
9F64 710F
9F65 7111
9F66 7112
9F67 7114
9F68 7117
9F69 711B
9F6A 711C
9F6B 711D
9F6C 711E
9F6D 711F
9F6E 7120
9F6F 7121
9F70 7122
9F71 7123
9F72 7124
9F73 7125
9F74 7127
9F75 7128
9F76 7129
9F77 712A
9F78 712B
9F79 712C
9F7A 712D
9F7B 712E
9F7C 7132
9F7D 7133
9F7E 7134
9F80 7135
9F81 7137
9F82 7138
9F83 7139
9F84 713A
9F85 713B
9F86 713C
9F87 713D
9F88 713E
9F89 713F
9F8A 7140
9F8B 7141
9F8C 7142
9F8D 7143
9F8E 7144
9F8F 7146
9F90 7147
9F91 7148
9F92 7149
9F93 714B
9F94 714D
9F95 714F
9F96 7150
9F97 7151
9F98 7152
9F99 7153
9F9A 7154
9F9B 7155
9F9C 7156
9F9D 7157
9F9E 7158
9F9F 7159
9FA0 715A
9FA1 715B
9FA2 715D
9FA3 715F
9FA4 7160
9FA5 7161
9FA6 7162
9FA7 7163
9FA8 7165
9FA9 7169
9FAA 716A
9FAB 716B
9FAC 716C
9FAD 716D
9FAE 716F
9FAF 7170
9FB0 7171
9FB1 7174
9FB2 7175
9FB3 7176
9FB4 7177
9FB5 7179
9FB6 717B
9FB7 717C
9FB8 717E
9FB9 717F
9FBA 7180
9FBB 7181
9FBC 7182
9FBD 7183
9FBE 7185
9FBF 7186
9FC0 7187
9FC1 7188
9FC2 7189
9FC3 718B
9FC4 718C
9FC5 718D
9FC6 718E
9FC7 7190
9FC8 7191
9FC9 7192
9FCA 7193
9FCB 7195
9FCC 7196
9FCD 7197
9FCE 719A
9FCF 719B
9FD0 719C
9FD1 719D
9FD2 719E
9FD3 71A1
9FD4 71A2
9FD5 71A3
9FD6 71A4
9FD7 71A5
9FD8 71A6
9FD9 71A7
9FDA 71A9
9FDB 71AA
9FDC 71AB
9FDD 71AD
9FDE 71AE
9FDF 71AF
9FE0 71B0
9FE1 71B1
9FE2 71B2
9FE3 71B4
9FE4 71B6
9FE5 71B7
9FE6 71B8
9FE7 71BA
9FE8 71BB
9FE9 71BC
9FEA 71BD
9FEB 71BE
9FEC 71BF
9FED 71C0
9FEE 71C1
9FEF 71C2
9FF0 71C4
9FF1 71C5
9FF2 71C6
9FF3 71C7
9FF4 71C8
9FF5 71C9
9FF6 71CA
9FF7 71CB
9FF8 71CC
9FF9 71CD
9FFA 71CF
9FFB 71D0
9FFC 71D1
9FFD 71D2
9FFE 71D3
A040 71D6
A041 71D7
A042 71D8
A043 71D9
A044 71DA
A045 71DB
A046 71DC
A047 71DD
A048 71DE
A049 71DF
A04A 71E1
A04B 71E2
A04C 71E3
A04D 71E4
A04E 71E6
A04F 71E8
A050 71E9
A051 71EA
A052 71EB
A053 71EC
A054 71ED
A055 71EF
A056 71F0
A057 71F1
A058 71F2
A059 71F3
A05A 71F4
A05B 71F5
A05C 71F6
A05D 71F7
A05E 71F8
A05F 71FA
A060 71FB
A061 71FC
A062 71FD
A063 71FE
A064 71FF
A065 7200
A066 7201
A067 7202
A068 7203
A069 7204
A06A 7205
A06B 7207
A06C 7208
A06D 7209
A06E 720A
A06F 720B
A070 720C
A071 720D
A072 720E
A073 720F
A074 7210
A075 7211
A076 7212
A077 7213
A078 7214
A079 7215
A07A 7216
A07B 7217
A07C 7218
A07D 7219
A07E 721A
A080 721B
A081 721C
A082 721E
A083 721F
A084 7220
A085 7221
A086 7222
A087 7223
A088 7224
A089 7225
A08A 7226
A08B 7227
A08C 7229
A08D 722B
A08E 722D
A08F 722E
A090 722F
A091 7232
A092 7233
A093 7234
A094 723A
A095 723C
A096 723E
A097 7240
A098 7241
A099 7242
A09A 7243
A09B 7244
A09C 7245
A09D 7246
A09E 7249
A09F 724A
A0A0 724B
A0A1 724E
A0A2 724F
A0A3 7250
A0A4 7251
A0A5 7253
A0A6 7254
A0A7 7255
A0A8 7257
A0A9 7258
A0AA 725A
A0AB 725C
A0AC 725E
A0AD 7260
A0AE 7263
A0AF 7264
A0B0 7265
A0B1 7268
A0B2 726A
A0B3 726B
A0B4 726C
A0B5 726D
A0B6 7270
A0B7 7271
A0B8 7273
A0B9 7274
A0BA 7276
A0BB 7277
A0BC 7278
A0BD 727B
A0BE 727C
A0BF 727D
A0C0 7282
A0C1 7283
A0C2 7285
A0C3 7286
A0C4 7287
A0C5 7288
A0C6 7289
A0C7 728C
A0C8 728E
A0C9 7290
A0CA 7291
A0CB 7293
A0CC 7294
A0CD 7295
A0CE 7296
A0CF 7297
A0D0 7298
A0D1 7299
A0D2 729A
A0D3 729B
A0D4 729C
A0D5 729D
A0D6 729E
A0D7 72A0
A0D8 72A1
A0D9 72A2
A0DA 72A3
A0DB 72A4
A0DC 72A5
A0DD 72A6
A0DE 72A7
A0DF 72A8
A0E0 72A9
A0E1 72AA
A0E2 72AB
A0E3 72AE
A0E4 72B1
A0E5 72B2
A0E6 72B3
A0E7 72B5
A0E8 72BA
A0E9 72BB
A0EA 72BC
A0EB 72BD
A0EC 72BE
A0ED 72BF
A0EE 72C0
A0EF 72C5
A0F0 72C6
A0F1 72C7
A0F2 72C9
A0F3 72CA
A0F4 72CB
A0F5 72CC
A0F6 72CF
A0F7 72D1
A0F8 72D3
A0F9 72D4
A0FA 72D5
A0FB 72D6
A0FC 72D8
A0FD 72DA
A0FE 72DB
A1A1 3000
A1A2 3001
A1A3 3002
A1A4 00B7
A1A5 02C9
A1A6 02C7
A1A7 00A8
A1A8 3003
A1A9 3005
A1AA 2014
A1AB FF5E
A1AC 2016
A1AD 2026
A1AE 2018
A1AF 2019
A1B0 201C
A1B1 201D
A1B2 3014
A1B3 3015
A1B4 3008
A1B5 3009
A1B6 300A
A1B7 300B
A1B8 300C
A1B9 300D
A1BA 300E
A1BB 300F
A1BC 3016
A1BD 3017
A1BE 3010
A1BF 3011
A1C0 00B1
A1C1 00D7
A1C2 00F7
A1C3 2236
A1C4 2227
A1C5 2228
A1C6 2211
A1C7 220F
A1C8 222A
A1C9 2229
A1CA 2208
A1CB 2237
A1CC 221A
A1CD 22A5
A1CE 2225
A1CF 2220
A1D0 2312
A1D1 2299
A1D2 222B
A1D3 222E
A1D4 2261
A1D5 224C
A1D6 2248
A1D7 223D
A1D8 221D
A1D9 2260
A1DA 226E
A1DB 226F
A1DC 2264
A1DD 2265
A1DE 221E
A1DF 2235
A1E0 2234
A1E1 2642
A1E2 2640
A1E3 00B0
A1E4 2032
A1E5 2033
A1E6 2103
A1E7 FF04
A1E8 00A4
A1E9 FFE0
A1EA FFE1
A1EB 2030
A1EC 00A7
A1ED 2116
A1EE 2606
A1EF 2605
A1F0 25CB
A1F1 25CF
A1F2 25CE
A1F3 25C7
A1F4 25C6
A1F5 25A1
A1F6 25A0
A1F7 25B3
A1F8 25B2
A1F9 203B
A1FA 2192
A1FB 2190
A1FC 2191
A1FD 2193
A1FE 3013
A2A1 2170
A2A2 2171
A2A3 2172
A2A4 2173
A2A5 2174
A2A6 2175
A2A7 2176
A2A8 2177
A2A9 2178
A2AA 2179
A2B1 2488
A2B2 2489
A2B3 248A
A2B4 248B
A2B5 248C
A2B6 248D
A2B7 248E
A2B8 248F
A2B9 2490
A2BA 2491
A2BB 2492
A2BC 2493
A2BD 2494
A2BE 2495
A2BF 2496
A2C0 2497
A2C1 2498
A2C2 2499
A2C3 249A
A2C4 249B
A2C5 2474
A2C6 2475
A2C7 2476
A2C8 2477
A2C9 2478
A2CA 2479
A2CB 247A
A2CC 247B
A2CD 247C
A2CE 247D
A2CF 247E
A2D0 247F
A2D1 2480
A2D2 2481
A2D3 2482
A2D4 2483
A2D5 2484
A2D6 2485
A2D7 2486
A2D8 2487
A2D9 2460
A2DA 2461
A2DB 2462
A2DC 2463
A2DD 2464
A2DE 2465
A2DF 2466
A2E0 2467
A2E1 2468
A2E2 2469
A2E5 3220
A2E6 3221
A2E7 3222
A2E8 3223
A2E9 3224
A2EA 3225
A2EB 3226
A2EC 3227
A2ED 3228
A2EE 3229
A2F1 2160
A2F2 2161
A2F3 2162
A2F4 2163
A2F5 2164
A2F6 2165
A2F7 2166
A2F8 2167
A2F9 2168
A2FA 2169
A2FB 216A
A2FC 216B
A3A1 FF01
A3A2 FF02
A3A3 FF03
A3A4 FFE5
A3A5 FF05
A3A6 FF06
A3A7 FF07
A3A8 FF08
A3A9 FF09
A3AA FF0A
A3AB FF0B
A3AC FF0C
A3AD FF0D
A3AE FF0E
A3AF FF0F
A3B0 FF10
A3B1 FF11
A3B2 FF12
A3B3 FF13
A3B4 FF14
A3B5 FF15
A3B6 FF16
A3B7 FF17
A3B8 FF18
A3B9 FF19
A3BA FF1A
A3BB FF1B
A3BC FF1C
A3BD FF1D
A3BE FF1E
A3BF FF1F
A3C0 FF20
A3C1 FF21
A3C2 FF22
A3C3 FF23
A3C4 FF24
A3C5 FF25
A3C6 FF26
A3C7 FF27
A3C8 FF28
A3C9 FF29
A3CA FF2A
A3CB FF2B
A3CC FF2C
A3CD FF2D
A3CE FF2E
A3CF FF2F
A3D0 FF30
A3D1 FF31
A3D2 FF32
A3D3 FF33
A3D4 FF34
A3D5 FF35
A3D6 FF36
A3D7 FF37
A3D8 FF38
A3D9 FF39
A3DA FF3A
A3DB FF3B
A3DC FF3C
A3DD FF3D
A3DE FF3E
A3DF FF3F
A3E0 FF40
A3E1 FF41
A3E2 FF42
A3E3 FF43
A3E4 FF44
A3E5 FF45
A3E6 FF46
A3E7 FF47
A3E8 FF48
A3E9 FF49
A3EA FF4A
A3EB FF4B
A3EC FF4C
A3ED FF4D
A3EE FF4E
A3EF FF4F
A3F0 FF50
A3F1 FF51
A3F2 FF52
A3F3 FF53
A3F4 FF54
A3F5 FF55
A3F6 FF56
A3F7 FF57
A3F8 FF58
A3F9 FF59
A3FA FF5A
A3FB FF5B
A3FC FF5C
A3FD FF5D
A3FE FFE3
A4A1 3041
A4A2 3042
A4A3 3043
A4A4 3044
A4A5 3045
A4A6 3046
A4A7 3047
A4A8 3048
A4A9 3049
A4AA 304A
A4AB 304B
A4AC 304C
A4AD 304D
A4AE 304E
A4AF 304F
A4B0 3050
A4B1 3051
A4B2 3052
A4B3 3053
A4B4 3054
A4B5 3055
A4B6 3056
A4B7 3057
A4B8 3058
A4B9 3059
A4BA 305A
A4BB 305B
A4BC 305C
A4BD 305D
A4BE 305E
A4BF 305F
A4C0 3060
A4C1 3061
A4C2 3062
A4C3 3063
A4C4 3064
A4C5 3065
A4C6 3066
A4C7 3067
A4C8 3068
A4C9 3069
A4CA 306A
A4CB 306B
A4CC 306C
A4CD 306D
A4CE 306E
A4CF 306F
A4D0 3070
A4D1 3071
A4D2 3072
A4D3 3073
A4D4 3074
A4D5 3075
A4D6 3076
A4D7 3077
A4D8 3078
A4D9 3079
A4DA 307A
A4DB 307B
A4DC 307C
A4DD 307D
A4DE 307E
A4DF 307F
A4E0 3080
A4E1 3081
A4E2 3082
A4E3 3083
A4E4 3084
A4E5 3085
A4E6 3086
A4E7 3087
A4E8 3088
A4E9 3089
A4EA 308A
A4EB 308B
A4EC 308C
A4ED 308D
A4EE 308E
A4EF 308F
A4F0 3090
A4F1 3091
A4F2 3092
A4F3 3093
A5A1 30A1
A5A2 30A2
A5A3 30A3
A5A4 30A4
A5A5 30A5
A5A6 30A6
A5A7 30A7
A5A8 30A8
A5A9 30A9
A5AA 30AA
A5AB 30AB
A5AC 30AC
A5AD 30AD
A5AE 30AE
A5AF 30AF
A5B0 30B0
A5B1 30B1
A5B2 30B2
A5B3 30B3
A5B4 30B4
A5B5 30B5
A5B6 30B6
A5B7 30B7
A5B8 30B8
A5B9 30B9
A5BA 30BA
A5BB 30BB
A5BC 30BC
A5BD 30BD
A5BE 30BE
A5BF 30BF
A5C0 30C0
A5C1 30C1
A5C2 30C2
A5C3 30C3
A5C4 30C4
A5C5 30C5
A5C6 30C6
A5C7 30C7
A5C8 30C8
A5C9 30C9
A5CA 30CA
A5CB 30CB
A5CC 30CC
A5CD 30CD
A5CE 30CE
A5CF 30CF
A5D0 30D0
A5D1 30D1
A5D2 30D2
A5D3 30D3
A5D4 30D4
A5D5 30D5
A5D6 30D6
A5D7 30D7
A5D8 30D8
A5D9 30D9
A5DA 30DA
A5DB 30DB
A5DC 30DC
A5DD 30DD
A5DE 30DE
A5DF 30DF
A5E0 30E0
A5E1 30E1
A5E2 30E2
A5E3 30E3
A5E4 30E4
A5E5 30E5
A5E6 30E6
A5E7 30E7
A5E8 30E8
A5E9 30E9
A5EA 30EA
A5EB 30EB
A5EC 30EC
A5ED 30ED
A5EE 30EE
A5EF 30EF
A5F0 30F0
A5F1 30F1
A5F2 30F2
A5F3 30F3
A5F4 30F4
A5F5 30F5
A5F6 30F6
A6A1 0391
A6A2 0392
A6A3 0393
A6A4 0394
A6A5 0395
A6A6 0396
A6A7 0397
A6A8 0398
A6A9 0399
A6AA 039A
A6AB 039B
A6AC 039C
A6AD 039D
A6AE 039E
A6AF 039F
A6B0 03A0
A6B1 03A1
A6B2 03A3
A6B3 03A4
A6B4 03A5
A6B5 03A6
A6B6 03A7
A6B7 03A8
A6B8 03A9
A6C1 03B1
A6C2 03B2
A6C3 03B3
A6C4 03B4
A6C5 03B5
A6C6 03B6
A6C7 03B7
A6C8 03B8
A6C9 03B9
A6CA 03BA
A6CB 03BB
A6CC 03BC
A6CD 03BD
A6CE 03BE
A6CF 03BF
A6D0 03C0
A6D1 03C1
A6D2 03C3
A6D3 03C4
A6D4 03C5
A6D5 03C6
A6D6 03C7
A6D7 03C8
A6D8 03C9
A6E0 FE35
A6E1 FE36
A6E2 FE39
A6E3 FE3A
A6E4 FE3F
A6E5 FE40
A6E6 FE3D
A6E7 FE3E
A6E8 FE41
A6E9 FE42
A6EA FE43
A6EB FE44
A6EE FE3B
A6EF FE3C
A6F0 FE37
A6F1 FE38
A6F2 FE31
A6F4 FE33
A6F5 FE34
A7A1 0410
A7A2 0411
A7A3 0412
A7A4 0413
A7A5 0414
A7A6 0415
A7A7 0401
A7A8 0416
A7A9 0417
A7AA 0418
A7AB 0419
A7AC 041A
A7AD 041B
A7AE 041C
A7AF 041D
A7B0 041E
A7B1 041F
A7B2 0420
A7B3 0421
A7B4 0422
A7B5 0423
A7B6 0424
A7B7 0425
A7B8 0426
A7B9 0427
A7BA 0428
A7BB 0429
A7BC 042A
A7BD 042B
A7BE 042C
A7BF 042D
A7C0 042E
A7C1 042F
A7D1 0430
A7D2 0431
A7D3 0432
A7D4 0433
A7D5 0434
A7D6 0435
A7D7 0451
A7D8 0436
A7D9 0437
A7DA 0438
A7DB 0439
A7DC 043A
A7DD 043B
A7DE 043C
A7DF 043D
A7E0 043E
A7E1 043F
A7E2 0440
A7E3 0441
A7E4 0442
A7E5 0443
A7E6 0444
A7E7 0445
A7E8 0446
A7E9 0447
A7EA 0448
A7EB 0449
A7EC 044A
A7ED 044B
A7EE 044C
A7EF 044D
A7F0 044E
A7F1 044F
A840 02CA
A841 02CB
A842 02D9
A843 2013
A844 2015
A845 2025
A846 2035
A847 2105
A848 2109
A849 2196
A84A 2197
A84B 2198
A84C 2199
A84D 2215
A84E 221F
A84F 2223
A850 2252
A851 2266
A852 2267
A853 22BF
A854 2550
A855 2551
A856 2552
A857 2553
A858 2554
A859 2555
A85A 2556
A85B 2557
A85C 2558
A85D 2559
A85E 255A
A85F 255B
A860 255C
A861 255D
A862 255E
A863 255F
A864 2560
A865 2561
A866 2562
A867 2563
A868 2564
A869 2565
A86A 2566
A86B 2567
A86C 2568
A86D 2569
A86E 256A
A86F 256B
A870 256C
A871 256D
A872 256E
A873 256F
A874 2570
A875 2571
A876 2572
A877 2573
A878 2581
A879 2582
A87A 2583
A87B 2584
A87C 2585
A87D 2586
A87E 2587
A880 2588
A881 2589
A882 258A
A883 258B
A884 258C
A885 258D
A886 258E
A887 258F
A888 2593
A889 2594
A88A 2595
A88B 25BC
A88C 25BD
A88D 25E2
A88E 25E3
A88F 25E4
A890 25E5
A891 2609
A892 2295
A893 3012
A894 301D
A895 301E
A8A1 0101
A8A2 00E1
A8A3 01CE
A8A4 00E0
A8A5 0113
A8A6 00E9
A8A7 011B
A8A8 00E8
A8A9 012B
A8AA 00ED
A8AB 01D0
A8AC 00EC
A8AD 014D
A8AE 00F3
A8AF 01D2
A8B0 00F2
A8B1 016B
A8B2 00FA
A8B3 01D4
A8B4 00F9
A8B5 01D6
A8B6 01D8
A8B7 01DA
A8B8 01DC
A8B9 00FC
A8BA 00EA
A8BB 0251
A8BD 0144
A8BE 0148
A8C0 0261
A8C5 3105
A8C6 3106
A8C7 3107
A8C8 3108
A8C9 3109
A8CA 310A
A8CB 310B
A8CC 310C
A8CD 310D
A8CE 310E
A8CF 310F
A8D0 3110
A8D1 3111
A8D2 3112
A8D3 3113
A8D4 3114
A8D5 3115
A8D6 3116
A8D7 3117
A8D8 3118
A8D9 3119
A8DA 311A
A8DB 311B
A8DC 311C
A8DD 311D
A8DE 311E
A8DF 311F
A8E0 3120
A8E1 3121
A8E2 3122
A8E3 3123
A8E4 3124
A8E5 3125
A8E6 3126
A8E7 3127
A8E8 3128
A8E9 3129
A940 3021
A941 3022
A942 3023
A943 3024
A944 3025
A945 3026
A946 3027
A947 3028
A948 3029
A949 32A3
A94A 338E
A94B 338F
A94C 339C
A94D 339D
A94E 339E
A94F 33A1
A950 33C4
A951 33CE
A952 33D1
A953 33D2
A954 33D5
A955 FE30
A956 FFE2
A957 FFE4
A959 2121
A95A 3231
A95C 2010
A960 30FC
A961 309B
A962 309C
A963 30FD
A964 30FE
A965 3006
A966 309D
A967 309E
A968 FE49
A969 FE4A
A96A FE4B
A96B FE4C
A96C FE4D
A96D FE4E
A96E FE4F
A96F FE50
A970 FE51
A971 FE52
A972 FE54
A973 FE55
A974 FE56
A975 FE57
A976 FE59
A977 FE5A
A978 FE5B
A979 FE5C
A97A FE5D
A97B FE5E
A97C FE5F
A97D FE60
A97E FE61
A980 FE62
A981 FE63
A982 FE64
A983 FE65
A984 FE66
A985 FE68
A986 FE69
A987 FE6A
A988 FE6B
A996 3007
A9A4 2500
A9A5 2501
A9A6 2502
A9A7 2503
A9A8 2504
A9A9 2505
A9AA 2506
A9AB 2507
A9AC 2508
A9AD 2509
A9AE 250A
A9AF 250B
A9B0 250C
A9B1 250D
A9B2 250E
A9B3 250F
A9B4 2510
A9B5 2511
A9B6 2512
A9B7 2513
A9B8 2514
A9B9 2515
A9BA 2516
A9BB 2517
A9BC 2518
A9BD 2519
A9BE 251A
A9BF 251B
A9C0 251C
A9C1 251D
A9C2 251E
A9C3 251F
A9C4 2520
A9C5 2521
A9C6 2522
A9C7 2523
A9C8 2524
A9C9 2525
A9CA 2526
A9CB 2527
A9CC 2528
A9CD 2529
A9CE 252A
A9CF 252B
A9D0 252C
A9D1 252D
A9D2 252E
A9D3 252F
A9D4 2530
A9D5 2531
A9D6 2532
A9D7 2533
A9D8 2534
A9D9 2535
A9DA 2536
A9DB 2537
A9DC 2538
A9DD 2539
A9DE 253A
A9DF 253B
A9E0 253C
A9E1 253D
A9E2 253E
A9E3 253F
A9E4 2540
A9E5 2541
A9E6 2542
A9E7 2543
A9E8 2544
A9E9 2545
A9EA 2546
A9EB 2547
A9EC 2548
A9ED 2549
A9EE 254A
A9EF 254B
AA40 72DC
AA41 72DD
AA42 72DF
AA43 72E2
AA44 72E3
AA45 72E4
AA46 72E5
AA47 72E6
AA48 72E7
AA49 72EA
AA4A 72EB
AA4B 72F5
AA4C 72F6
AA4D 72F9
AA4E 72FD
AA4F 72FE
AA50 72FF
AA51 7300
AA52 7302
AA53 7304
AA54 7305
AA55 7306
AA56 7307
AA57 7308
AA58 7309
AA59 730B
AA5A 730C
AA5B 730D
AA5C 730F
AA5D 7310
AA5E 7311
AA5F 7312
AA60 7314
AA61 7318
AA62 7319
AA63 731A
AA64 731F
AA65 7320
AA66 7323
AA67 7324
AA68 7326
AA69 7327
AA6A 7328
AA6B 732D
AA6C 732F
AA6D 7330
AA6E 7332
AA6F 7333
AA70 7335
AA71 7336
AA72 733A
AA73 733B
AA74 733C
AA75 733D
AA76 7340
AA77 7341
AA78 7342
AA79 7343
AA7A 7344
AA7B 7345
AA7C 7346
AA7D 7347
AA7E 7348
AA80 7349
AA81 734A
AA82 734B
AA83 734C
AA84 734E
AA85 734F
AA86 7351
AA87 7353
AA88 7354
AA89 7355
AA8A 7356
AA8B 7358
AA8C 7359
AA8D 735A
AA8E 735B
AA8F 735C
AA90 735D
AA91 735E
AA92 735F
AA93 7361
AA94 7362
AA95 7363
AA96 7364
AA97 7365
AA98 7366
AA99 7367
AA9A 7368
AA9B 7369
AA9C 736A
AA9D 736B
AA9E 736E
AA9F 7370
AAA0 7371
AB40 7372
AB41 7373
AB42 7374
AB43 7375
AB44 7376
AB45 7377
AB46 7378
AB47 7379
AB48 737A
AB49 737B
AB4A 737C
AB4B 737D
AB4C 737F
AB4D 7380
AB4E 7381
AB4F 7382
AB50 7383
AB51 7385
AB52 7386
AB53 7388
AB54 738A
AB55 738C
AB56 738D
AB57 738F
AB58 7390
AB59 7392
AB5A 7393
AB5B 7394
AB5C 7395
AB5D 7397
AB5E 7398
AB5F 7399
AB60 739A
AB61 739C
AB62 739D
AB63 739E
AB64 73A0
AB65 73A1
AB66 73A3
AB67 73A4
AB68 73A5
AB69 73A6
AB6A 73A7
AB6B 73A8
AB6C 73AA
AB6D 73AC
AB6E 73AD
AB6F 73B1
AB70 73B4
AB71 73B5
AB72 73B6
AB73 73B8
AB74 73B9
AB75 73BC
AB76 73BD
AB77 73BE
AB78 73BF
AB79 73C1
AB7A 73C3
AB7B 73C4
AB7C 73C5
AB7D 73C6
AB7E 73C7
AB80 73CB
AB81 73CC
AB82 73CE
AB83 73D2
AB84 73D3
AB85 73D4
AB86 73D5
AB87 73D6
AB88 73D7
AB89 73D8
AB8A 73DA
AB8B 73DB
AB8C 73DC
AB8D 73DD
AB8E 73DF
AB8F 73E1
AB90 73E2
AB91 73E3
AB92 73E4
AB93 73E6
AB94 73E8
AB95 73EA
AB96 73EB
AB97 73EC
AB98 73EE
AB99 73EF
AB9A 73F0
AB9B 73F1
AB9C 73F3
AB9D 73F4
AB9E 73F5
AB9F 73F6
ABA0 73F7
AC40 73F8
AC41 73F9
AC42 73FA
AC43 73FB
AC44 73FC
AC45 73FD
AC46 73FE
AC47 73FF
AC48 7400
AC49 7401
AC4A 7402
AC4B 7404
AC4C 7407
AC4D 7408
AC4E 740B
AC4F 740C
AC50 740D
AC51 740E
AC52 7411
AC53 7412
AC54 7413
AC55 7414
AC56 7415
AC57 7416
AC58 7417
AC59 7418
AC5A 7419
AC5B 741C
AC5C 741D
AC5D 741E
AC5E 741F
AC5F 7420
AC60 7421
AC61 7423
AC62 7424
AC63 7427
AC64 7429
AC65 742B
AC66 742D
AC67 742F
AC68 7431
AC69 7432
AC6A 7437
AC6B 7438
AC6C 7439
AC6D 743A
AC6E 743B
AC6F 743D
AC70 743E
AC71 743F
AC72 7440
AC73 7442
AC74 7443
AC75 7444
AC76 7445
AC77 7446
AC78 7447
AC79 7448
AC7A 7449
AC7B 744A
AC7C 744B
AC7D 744C
AC7E 744D
AC80 744E
AC81 744F
AC82 7450
AC83 7451
AC84 7452
AC85 7453
AC86 7454
AC87 7456
AC88 7458
AC89 745D
AC8A 7460
AC8B 7461
AC8C 7462
AC8D 7463
AC8E 7464
AC8F 7465
AC90 7466
AC91 7467
AC92 7468
AC93 7469
AC94 746A
AC95 746B
AC96 746C
AC97 746E
AC98 746F
AC99 7471
AC9A 7472
AC9B 7473
AC9C 7474
AC9D 7475
AC9E 7478
AC9F 7479
ACA0 747A
AD40 747B
AD41 747C
AD42 747D
AD43 747F
AD44 7482
AD45 7484
AD46 7485
AD47 7486
AD48 7488
AD49 7489
AD4A 748A
AD4B 748C
AD4C 748D
AD4D 748F
AD4E 7491
AD4F 7492
AD50 7493
AD51 7494
AD52 7495
AD53 7496
AD54 7497
AD55 7498
AD56 7499
AD57 749A
AD58 749B
AD59 749D
AD5A 749F
AD5B 74A0
AD5C 74A1
AD5D 74A2
AD5E 74A3
AD5F 74A4
AD60 74A5
AD61 74A6
AD62 74AA
AD63 74AB
AD64 74AC
AD65 74AD
AD66 74AE
AD67 74AF
AD68 74B0
AD69 74B1
AD6A 74B2
AD6B 74B3
AD6C 74B4
AD6D 74B5
AD6E 74B6
AD6F 74B7
AD70 74B8
AD71 74B9
AD72 74BB
AD73 74BC
AD74 74BD
AD75 74BE
AD76 74BF
AD77 74C0
AD78 74C1
AD79 74C2
AD7A 74C3
AD7B 74C4
AD7C 74C5
AD7D 74C6
AD7E 74C7
AD80 74C8
AD81 74C9
AD82 74CA
AD83 74CB
AD84 74CC
AD85 74CD
AD86 74CE
AD87 74CF
AD88 74D0
AD89 74D1
AD8A 74D3
AD8B 74D4
AD8C 74D5
AD8D 74D6
AD8E 74D7
AD8F 74D8
AD90 74D9
AD91 74DA
AD92 74DB
AD93 74DD
AD94 74DF
AD95 74E1
AD96 74E5
AD97 74E7
AD98 74E8
AD99 74E9
AD9A 74EA
AD9B 74EB
AD9C 74EC
AD9D 74ED
AD9E 74F0
AD9F 74F1
ADA0 74F2
AE40 74F3
AE41 74F5
AE42 74F8
AE43 74F9
AE44 74FA
AE45 74FB
AE46 74FC
AE47 74FD
AE48 74FE
AE49 7500
AE4A 7501
AE4B 7502
AE4C 7503
AE4D 7505
AE4E 7506
AE4F 7507
AE50 7508
AE51 7509
AE52 750A
AE53 750B
AE54 750C
AE55 750E
AE56 7510
AE57 7512
AE58 7514
AE59 7515
AE5A 7516
AE5B 7517
AE5C 751B
AE5D 751D
AE5E 751E
AE5F 7520
AE60 7521
AE61 7522
AE62 7523
AE63 7524
AE64 7526
AE65 7527
AE66 752A
AE67 752E
AE68 7534
AE69 7536
AE6A 7539
AE6B 753C
AE6C 753D
AE6D 753F
AE6E 7541
AE6F 7542
AE70 7543
AE71 7544
AE72 7546
AE73 7547
AE74 7549
AE75 754A
AE76 754D
AE77 7550
AE78 7551
AE79 7552
AE7A 7553
AE7B 7555
AE7C 7556
AE7D 7557
AE7E 7558
AE80 755D
AE81 755E
AE82 755F
AE83 7560
AE84 7561
AE85 7562
AE86 7563
AE87 7564
AE88 7567
AE89 7568
AE8A 7569
AE8B 756B
AE8C 756C
AE8D 756D
AE8E 756E
AE8F 756F
AE90 7570
AE91 7571
AE92 7573
AE93 7575
AE94 7576
AE95 7577
AE96 757A
AE97 757B
AE98 757C
AE99 757D
AE9A 757E
AE9B 7580
AE9C 7581
AE9D 7582
AE9E 7584
AE9F 7585
AEA0 7587
AF40 7588
AF41 7589
AF42 758A
AF43 758C
AF44 758D
AF45 758E
AF46 7590
AF47 7593
AF48 7595
AF49 7598
AF4A 759B
AF4B 759C
AF4C 759E
AF4D 75A2
AF4E 75A6
AF4F 75A7
AF50 75A8
AF51 75A9
AF52 75AA
AF53 75AD
AF54 75B6
AF55 75B7
AF56 75BA
AF57 75BB
AF58 75BF
AF59 75C0
AF5A 75C1
AF5B 75C6
AF5C 75CB
AF5D 75CC
AF5E 75CE
AF5F 75CF
AF60 75D0
AF61 75D1
AF62 75D3
AF63 75D7
AF64 75D9
AF65 75DA
AF66 75DC
AF67 75DD
AF68 75DF
AF69 75E0
AF6A 75E1
AF6B 75E5
AF6C 75E9
AF6D 75EC
AF6E 75ED
AF6F 75EE
AF70 75EF
AF71 75F2
AF72 75F3
AF73 75F5
AF74 75F6
AF75 75F7
AF76 75F8
AF77 75FA
AF78 75FB
AF79 75FD
AF7A 75FE
AF7B 7602
AF7C 7604
AF7D 7606
AF7E 7607
AF80 7608
AF81 7609
AF82 760B
AF83 760D
AF84 760E
AF85 760F
AF86 7611
AF87 7612
AF88 7613
AF89 7614
AF8A 7616
AF8B 761A
AF8C 761C
AF8D 761D
AF8E 761E
AF8F 7621
AF90 7623
AF91 7627
AF92 7628
AF93 762C
AF94 762E
AF95 762F
AF96 7631
AF97 7632
AF98 7636
AF99 7637
AF9A 7639
AF9B 763A
AF9C 763B
AF9D 763D
AF9E 7641
AF9F 7642
AFA0 7644
B040 7645
B041 7646
B042 7647
B043 7648
B044 7649
B045 764A
B046 764B
B047 764E
B048 764F
B049 7650
B04A 7651
B04B 7652
B04C 7653
B04D 7655
B04E 7657
B04F 7658
B050 7659
B051 765A
B052 765B
B053 765D
B054 765F
B055 7660
B056 7661
B057 7662
B058 7664
B059 7665
B05A 7666
B05B 7667
B05C 7668
B05D 7669
B05E 766A
B05F 766C
B060 766D
B061 766E
B062 7670
B063 7671
B064 7672
B065 7673
B066 7674
B067 7675
B068 7676
B069 7677
B06A 7679
B06B 767A
B06C 767C
B06D 767F
B06E 7680
B06F 7681
B070 7683
B071 7685
B072 7689
B073 768A
B074 768C
B075 768D
B076 768F
B077 7690
B078 7692
B079 7694
B07A 7695
B07B 7697
B07C 7698
B07D 769A
B07E 769B
B080 769C
B081 769D
B082 769E
B083 769F
B084 76A0
B085 76A1
B086 76A2
B087 76A3
B088 76A5
B089 76A6
B08A 76A7
B08B 76A8
B08C 76A9
B08D 76AA
B08E 76AB
B08F 76AC
B090 76AD
B091 76AF
B092 76B0
B093 76B3
B094 76B5
B095 76B6
B096 76B7
B097 76B8
B098 76B9
B099 76BA
B09A 76BB
B09B 76BC
B09C 76BD
B09D 76BE
B09E 76C0
B09F 76C1
B0A0 76C3
B0A1 554A
B0A2 963F
B0A3 57C3
B0A4 6328
B0A5 54CE
B0A6 5509
B0A7 54C0
B0A8 7691
B0A9 764C
B0AA 853C
B0AB 77EE
B0AC 827E
B0AD 788D
B0AE 7231
B0AF 9698
B0B0 978D
B0B1 6C28
B0B2 5B89
B0B3 4FFA
B0B4 6309
B0B5 6697
B0B6 5CB8
B0B7 80FA
B0B8 6848
B0B9 80AE
B0BA 6602
B0BB 76CE
B0BC 51F9
B0BD 6556
B0BE 71AC
B0BF 7FF1
B0C0 8884
B0C1 50B2
B0C2 5965
B0C3 61CA
B0C4 6FB3
B0C5 82AD
B0C6 634C
B0C7 6252
B0C8 53ED
B0C9 5427
B0CA 7B06
B0CB 516B
B0CC 75A4
B0CD 5DF4
B0CE 62D4
B0CF 8DCB
B0D0 9776
B0D1 628A
B0D2 8019
B0D3 575D
B0D4 9738
B0D5 7F62
B0D6 7238
B0D7 767D
B0D8 67CF
B0D9 767E
B0DA 6446
B0DB 4F70
B0DC 8D25
B0DD 62DC
B0DE 7A17
B0DF 6591
B0E0 73ED
B0E1 642C
B0E2 6273
B0E3 822C
B0E4 9881
B0E5 677F
B0E6 7248
B0E7 626E
B0E8 62CC
B0E9 4F34
B0EA 74E3
B0EB 534A
B0EC 529E
B0ED 7ECA
B0EE 90A6
B0EF 5E2E
B0F0 6886
B0F1 699C
B0F2 8180
B0F3 7ED1
B0F4 68D2
B0F5 78C5
B0F6 868C
B0F7 9551
B0F8 508D
B0F9 8C24
B0FA 82DE
B0FB 80DE
B0FC 5305
B0FD 8912
B0FE 5265
B140 76C4
B141 76C7
B142 76C9
B143 76CB
B144 76CC
B145 76D3
B146 76D5
B147 76D9
B148 76DA
B149 76DC
B14A 76DD
B14B 76DE
B14C 76E0
B14D 76E1
B14E 76E2
B14F 76E3
B150 76E4
B151 76E6
B152 76E7
B153 76E8
B154 76E9
B155 76EA
B156 76EB
B157 76EC
B158 76ED
B159 76F0
B15A 76F3
B15B 76F5
B15C 76F6
B15D 76F7
B15E 76FA
B15F 76FB
B160 76FD
B161 76FF
B162 7700
B163 7702
B164 7703
B165 7705
B166 7706
B167 770A
B168 770C
B169 770E
B16A 770F
B16B 7710
B16C 7711
B16D 7712
B16E 7713
B16F 7714
B170 7715
B171 7716
B172 7717
B173 7718
B174 771B
B175 771C
B176 771D
B177 771E
B178 7721
B179 7723
B17A 7724
B17B 7725
B17C 7727
B17D 772A
B17E 772B
B180 772C
B181 772E
B182 7730
B183 7731
B184 7732
B185 7733
B186 7734
B187 7739
B188 773B
B189 773D
B18A 773E
B18B 773F
B18C 7742
B18D 7744
B18E 7745
B18F 7746
B190 7748
B191 7749
B192 774A
B193 774B
B194 774C
B195 774D
B196 774E
B197 774F
B198 7752
B199 7753
B19A 7754
B19B 7755
B19C 7756
B19D 7757
B19E 7758
B19F 7759
B1A0 775C
B1A1 8584
B1A2 96F9
B1A3 4FDD
B1A4 5821
B1A5 9971
B1A6 5B9D
B1A7 62B1
B1A8 62A5
B1A9 66B4
B1AA 8C79
B1AB 9C8D
B1AC 7206
B1AD 676F
B1AE 7891
B1AF 60B2
B1B0 5351
B1B1 5317
B1B2 8F88
B1B3 80CC
B1B4 8D1D
B1B5 94A1
B1B6 500D
B1B7 72C8
B1B8 5907
B1B9 60EB
B1BA 7119
B1BB 88AB
B1BC 5954
B1BD 82EF
B1BE 672C
B1BF 7B28
B1C0 5D29
B1C1 7EF7
B1C2 752D
B1C3 6CF5
B1C4 8E66
B1C5 8FF8
B1C6 903C
B1C7 9F3B
B1C8 6BD4
B1C9 9119
B1CA 7B14
B1CB 5F7C
B1CC 78A7
B1CD 84D6
B1CE 853D
B1CF 6BD5
B1D0 6BD9
B1D1 6BD6
B1D2 5E01
B1D3 5E87
B1D4 75F9
B1D5 95ED
B1D6 655D
B1D7 5F0A
B1D8 5FC5
B1D9 8F9F
B1DA 58C1
B1DB 81C2
B1DC 907F
B1DD 965B
B1DE 97AD
B1DF 8FB9
B1E0 7F16
B1E1 8D2C
B1E2 6241
B1E3 4FBF
B1E4 53D8
B1E5 535E
B1E6 8FA8
B1E7 8FA9
B1E8 8FAB
B1E9 904D
B1EA 6807
B1EB 5F6A
B1EC 8198
B1ED 8868
B1EE 9CD6
B1EF 618B
B1F0 522B
B1F1 762A
B1F2 5F6C
B1F3 658C
B1F4 6FD2
B1F5 6EE8
B1F6 5BBE
B1F7 6448
B1F8 5175
B1F9 51B0
B1FA 67C4
B1FB 4E19
B1FC 79C9
B1FD 997C
B1FE 70B3
B240 775D
B241 775E
B242 775F
B243 7760
B244 7764
B245 7767
B246 7769
B247 776A
B248 776D
B249 776E
B24A 776F
B24B 7770
B24C 7771
B24D 7772
B24E 7773
B24F 7774
B250 7775
B251 7776
B252 7777
B253 7778
B254 777A
B255 777B
B256 777C
B257 7781
B258 7782
B259 7783
B25A 7786
B25B 7787
B25C 7788
B25D 7789
B25E 778A
B25F 778B
B260 778F
B261 7790
B262 7793
B263 7794
B264 7795
B265 7796
B266 7797
B267 7798
B268 7799
B269 779A
B26A 779B
B26B 779C
B26C 779D
B26D 779E
B26E 77A1
B26F 77A3
B270 77A4
B271 77A6
B272 77A8
B273 77AB
B274 77AD
B275 77AE
B276 77AF
B277 77B1
B278 77B2
B279 77B4
B27A 77B6
B27B 77B7
B27C 77B8
B27D 77B9
B27E 77BA
B280 77BC
B281 77BE
B282 77C0
B283 77C1
B284 77C2
B285 77C3
B286 77C4
B287 77C5
B288 77C6
B289 77C7
B28A 77C8
B28B 77C9
B28C 77CA
B28D 77CB
B28E 77CC
B28F 77CE
B290 77CF
B291 77D0
B292 77D1
B293 77D2
B294 77D3
B295 77D4
B296 77D5
B297 77D6
B298 77D8
B299 77D9
B29A 77DA
B29B 77DD
B29C 77DE
B29D 77DF
B29E 77E0
B29F 77E1
B2A0 77E4
B2A1 75C5
B2A2 5E76
B2A3 73BB
B2A4 83E0
B2A5 64AD
B2A6 62E8
B2A7 94B5
B2A8 6CE2
B2A9 535A
B2AA 52C3
B2AB 640F
B2AC 94C2
B2AD 7B94
B2AE 4F2F
B2AF 5E1B
B2B0 8236
B2B1 8116
B2B2 818A
B2B3 6E24
B2B4 6CCA
B2B5 9A73
B2B6 6355
B2B7 535C
B2B8 54FA
B2B9 8865
B2BA 57E0
B2BB 4E0D
B2BC 5E03
B2BD 6B65
B2BE 7C3F
B2BF 90E8
B2C0 6016
B2C1 64E6
B2C2 731C
B2C3 88C1
B2C4 6750
B2C5 624D
B2C6 8D22
B2C7 776C
B2C8 8E29
B2C9 91C7
B2CA 5F69
B2CB 83DC
B2CC 8521
B2CD 9910
B2CE 53C2
B2CF 8695
B2D0 6B8B
B2D1 60ED
B2D2 60E8
B2D3 707F
B2D4 82CD
B2D5 8231
B2D6 4ED3
B2D7 6CA7
B2D8 85CF
B2D9 64CD
B2DA 7CD9
B2DB 69FD
B2DC 66F9
B2DD 8349
B2DE 5395
B2DF 7B56
B2E0 4FA7
B2E1 518C
B2E2 6D4B
B2E3 5C42
B2E4 8E6D
B2E5 63D2
B2E6 53C9
B2E7 832C
B2E8 8336
B2E9 67E5
B2EA 78B4
B2EB 643D
B2EC 5BDF
B2ED 5C94
B2EE 5DEE
B2EF 8BE7
B2F0 62C6
B2F1 67F4
B2F2 8C7A
B2F3 6400
B2F4 63BA
B2F5 8749
B2F6 998B
B2F7 8C17
B2F8 7F20
B2F9 94F2
B2FA 4EA7
B2FB 9610
B2FC 98A4
B2FD 660C
B2FE 7316
B340 77E6
B341 77E8
B342 77EA
B343 77EF
B344 77F0
B345 77F1
B346 77F2
B347 77F4
B348 77F5
B349 77F7
B34A 77F9
B34B 77FA
B34C 77FB
B34D 77FC
B34E 7803
B34F 7804
B350 7805
B351 7806
B352 7807
B353 7808
B354 780A
B355 780B
B356 780E
B357 780F
B358 7810
B359 7813
B35A 7815
B35B 7819
B35C 781B
B35D 781E
B35E 7820
B35F 7821
B360 7822
B361 7824
B362 7828
B363 782A
B364 782B
B365 782E
B366 782F
B367 7831
B368 7832
B369 7833
B36A 7835
B36B 7836
B36C 783D
B36D 783F
B36E 7841
B36F 7842
B370 7843
B371 7844
B372 7846
B373 7848
B374 7849
B375 784A
B376 784B
B377 784D
B378 784F
B379 7851
B37A 7853
B37B 7854
B37C 7858
B37D 7859
B37E 785A
B380 785B
B381 785C
B382 785E
B383 785F
B384 7860
B385 7861
B386 7862
B387 7863
B388 7864
B389 7865
B38A 7866
B38B 7867
B38C 7868
B38D 7869
B38E 786F
B38F 7870
B390 7871
B391 7872
B392 7873
B393 7874
B394 7875
B395 7876
B396 7878
B397 7879
B398 787A
B399 787B
B39A 787D
B39B 787E
B39C 787F
B39D 7880
B39E 7881
B39F 7882
B3A0 7883
B3A1 573A
B3A2 5C1D
B3A3 5E38
B3A4 957F
B3A5 507F
B3A6 80A0
B3A7 5382
B3A8 655E
B3A9 7545
B3AA 5531
B3AB 5021
B3AC 8D85
B3AD 6284
B3AE 949E
B3AF 671D
B3B0 5632
B3B1 6F6E
B3B2 5DE2
B3B3 5435
B3B4 7092
B3B5 8F66
B3B6 626F
B3B7 64A4
B3B8 63A3
B3B9 5F7B
B3BA 6F88
B3BB 90F4
B3BC 81E3
B3BD 8FB0
B3BE 5C18
B3BF 6668
B3C0 5FF1
B3C1 6C89
B3C2 9648
B3C3 8D81
B3C4 886C
B3C5 6491
B3C6 79F0
B3C7 57CE
B3C8 6A59
B3C9 6210
B3CA 5448
B3CB 4E58
B3CC 7A0B
B3CD 60E9
B3CE 6F84
B3CF 8BDA
B3D0 627F
B3D1 901E
B3D2 9A8B
B3D3 79E4
B3D4 5403
B3D5 75F4
B3D6 6301
B3D7 5319
B3D8 6C60
B3D9 8FDF
B3DA 5F1B
B3DB 9A70
B3DC 803B
B3DD 9F7F
B3DE 4F88
B3DF 5C3A
B3E0 8D64
B3E1 7FC5
B3E2 65A5
B3E3 70BD
B3E4 5145
B3E5 51B2
B3E6 866B
B3E7 5D07
B3E8 5BA0
B3E9 62BD
B3EA 916C
B3EB 7574
B3EC 8E0C
B3ED 7A20
B3EE 6101
B3EF 7B79
B3F0 4EC7
B3F1 7EF8
B3F2 7785
B3F3 4E11
B3F4 81ED
B3F5 521D
B3F6 51FA
B3F7 6A71
B3F8 53A8
B3F9 8E87
B3FA 9504
B3FB 96CF
B3FC 6EC1
B3FD 9664
B3FE 695A
B440 7884
B441 7885
B442 7886
B443 7888
B444 788A
B445 788B
B446 788F
B447 7890
B448 7892
B449 7894
B44A 7895
B44B 7896
B44C 7899
B44D 789D
B44E 789E
B44F 78A0
B450 78A2
B451 78A4
B452 78A6
B453 78A8
B454 78A9
B455 78AA
B456 78AB
B457 78AC
B458 78AD
B459 78AE
B45A 78AF
B45B 78B5
B45C 78B6
B45D 78B7
B45E 78B8
B45F 78BA
B460 78BB
B461 78BC
B462 78BD
B463 78BF
B464 78C0
B465 78C2
B466 78C3
B467 78C4
B468 78C6
B469 78C7
B46A 78C8
B46B 78CC
B46C 78CD
B46D 78CE
B46E 78CF
B46F 78D1
B470 78D2
B471 78D3
B472 78D6
B473 78D7
B474 78D8
B475 78DA
B476 78DB
B477 78DC
B478 78DD
B479 78DE
B47A 78DF
B47B 78E0
B47C 78E1
B47D 78E2
B47E 78E3
B480 78E4
B481 78E5
B482 78E6
B483 78E7
B484 78E9
B485 78EA
B486 78EB
B487 78ED
B488 78EE
B489 78EF
B48A 78F0
B48B 78F1
B48C 78F3
B48D 78F5
B48E 78F6
B48F 78F8
B490 78F9
B491 78FB
B492 78FC
B493 78FD
B494 78FE
B495 78FF
B496 7900
B497 7902
B498 7903
B499 7904
B49A 7906
B49B 7907
B49C 7908
B49D 7909
B49E 790A
B49F 790B
B4A0 790C
B4A1 7840
B4A2 50A8
B4A3 77D7
B4A4 6410
B4A5 89E6
B4A6 5904
B4A7 63E3
B4A8 5DDD
B4A9 7A7F
B4AA 693D
B4AB 4F20
B4AC 8239
B4AD 5598
B4AE 4E32
B4AF 75AE
B4B0 7A97
B4B1 5E62
B4B2 5E8A
B4B3 95EF
B4B4 521B
B4B5 5439
B4B6 708A
B4B7 6376
B4B8 9524
B4B9 5782
B4BA 6625
B4BB 693F
B4BC 9187
B4BD 5507
B4BE 6DF3
B4BF 7EAF
B4C0 8822
B4C1 6233
B4C2 7EF0
B4C3 75B5
B4C4 8328
B4C5 78C1
B4C6 96CC
B4C7 8F9E
B4C8 6148
B4C9 74F7
B4CA 8BCD
B4CB 6B64
B4CC 523A
B4CD 8D50
B4CE 6B21
B4CF 806A
B4D0 8471
B4D1 56F1
B4D2 5306
B4D3 4ECE
B4D4 4E1B
B4D5 51D1
B4D6 7C97
B4D7 918B
B4D8 7C07
B4D9 4FC3
B4DA 8E7F
B4DB 7BE1
B4DC 7A9C
B4DD 6467
B4DE 5D14
B4DF 50AC
B4E0 8106
B4E1 7601
B4E2 7CB9
B4E3 6DEC
B4E4 7FE0
B4E5 6751
B4E6 5B58
B4E7 5BF8
B4E8 78CB
B4E9 64AE
B4EA 6413
B4EB 63AA
B4EC 632B
B4ED 9519
B4EE 642D
B4EF 8FBE
B4F0 7B54
B4F1 7629
B4F2 6253
B4F3 5927
B4F4 5446
B4F5 6B79
B4F6 50A3
B4F7 6234
B4F8 5E26
B4F9 6B86
B4FA 4EE3
B4FB 8D37
B4FC 888B
B4FD 5F85
B4FE 902E
B540 790D
B541 790E
B542 790F
B543 7910
B544 7911
B545 7912
B546 7914
B547 7915
B548 7916
B549 7917
B54A 7918
B54B 7919
B54C 791A
B54D 791B
B54E 791C
B54F 791D
B550 791F
B551 7920
B552 7921
B553 7922
B554 7923
B555 7925
B556 7926
B557 7927
B558 7928
B559 7929
B55A 792A
B55B 792B
B55C 792C
B55D 792D
B55E 792E
B55F 792F
B560 7930
B561 7931
B562 7932
B563 7933
B564 7935
B565 7936
B566 7937
B567 7938
B568 7939
B569 793D
B56A 793F
B56B 7942
B56C 7943
B56D 7944
B56E 7945
B56F 7947
B570 794A
B571 794B
B572 794C
B573 794D
B574 794E
B575 794F
B576 7950
B577 7951
B578 7952
B579 7954
B57A 7955
B57B 7958
B57C 7959
B57D 7961
B57E 7963
B580 7964
B581 7966
B582 7969
B583 796A
B584 796B
B585 796C
B586 796E
B587 7970
B588 7971
B589 7972
B58A 7973
B58B 7974
B58C 7975
B58D 7976
B58E 7979
B58F 797B
B590 797C
B591 797D
B592 797E
B593 797F
B594 7982
B595 7983
B596 7986
B597 7987
B598 7988
B599 7989
B59A 798B
B59B 798C
B59C 798D
B59D 798E
B59E 7990
B59F 7991
B5A0 7992
B5A1 6020
B5A2 803D
B5A3 62C5
B5A4 4E39
B5A5 5355
B5A6 90F8
B5A7 63B8
B5A8 80C6
B5A9 65E6
B5AA 6C2E
B5AB 4F46
B5AC 60EE
B5AD 6DE1
B5AE 8BDE
B5AF 5F39
B5B0 86CB
B5B1 5F53
B5B2 6321
B5B3 515A
B5B4 8361
B5B5 6863
B5B6 5200
B5B7 6363
B5B8 8E48
B5B9 5012
B5BA 5C9B
B5BB 7977
B5BC 5BFC
B5BD 5230
B5BE 7A3B
B5BF 60BC
B5C0 9053
B5C1 76D7
B5C2 5FB7
B5C3 5F97
B5C4 7684
B5C5 8E6C
B5C6 706F
B5C7 767B
B5C8 7B49
B5C9 77AA
B5CA 51F3
B5CB 9093
B5CC 5824
B5CD 4F4E
B5CE 6EF4
B5CF 8FEA
B5D0 654C
B5D1 7B1B
B5D2 72C4
B5D3 6DA4
B5D4 7FDF
B5D5 5AE1
B5D6 62B5
B5D7 5E95
B5D8 5730
B5D9 8482
B5DA 7B2C
B5DB 5E1D
B5DC 5F1F
B5DD 9012
B5DE 7F14
B5DF 98A0
B5E0 6382
B5E1 6EC7
B5E2 7898
B5E3 70B9
B5E4 5178
B5E5 975B
B5E6 57AB
B5E7 7535
B5E8 4F43
B5E9 7538
B5EA 5E97
B5EB 60E6
B5EC 5960
B5ED 6DC0
B5EE 6BBF
B5EF 7889
B5F0 53FC
B5F1 96D5
B5F2 51CB
B5F3 5201
B5F4 6389
B5F5 540A
B5F6 9493
B5F7 8C03
B5F8 8DCC
B5F9 7239
B5FA 789F
B5FB 8776
B5FC 8FED
B5FD 8C0D
B5FE 53E0
B640 7993
B641 7994
B642 7995
B643 7996
B644 7997
B645 7998
B646 7999
B647 799B
B648 799C
B649 799D
B64A 799E
B64B 799F
B64C 79A0
B64D 79A1
B64E 79A2
B64F 79A3
B650 79A4
B651 79A5
B652 79A6
B653 79A8
B654 79A9
B655 79AA
B656 79AB
B657 79AC
B658 79AD
B659 79AE
B65A 79AF
B65B 79B0
B65C 79B1
B65D 79B2
B65E 79B4
B65F 79B5
B660 79B6
B661 79B7
B662 79B8
B663 79BC
B664 79BF
B665 79C2
B666 79C4
B667 79C5
B668 79C7
B669 79C8
B66A 79CA
B66B 79CC
B66C 79CE
B66D 79CF
B66E 79D0
B66F 79D3
B670 79D4
B671 79D6
B672 79D7
B673 79D9
B674 79DA
B675 79DB
B676 79DC
B677 79DD
B678 79DE
B679 79E0
B67A 79E1
B67B 79E2
B67C 79E5
B67D 79E8
B67E 79EA
B680 79EC
B681 79EE
B682 79F1
B683 79F2
B684 79F3
B685 79F4
B686 79F5
B687 79F6
B688 79F7
B689 79F9
B68A 79FA
B68B 79FC
B68C 79FE
B68D 79FF
B68E 7A01
B68F 7A04
B690 7A05
B691 7A07
B692 7A08
B693 7A09
B694 7A0A
B695 7A0C
B696 7A0F
B697 7A10
B698 7A11
B699 7A12
B69A 7A13
B69B 7A15
B69C 7A16
B69D 7A18
B69E 7A19
B69F 7A1B
B6A0 7A1C
B6A1 4E01
B6A2 76EF
B6A3 53EE
B6A4 9489
B6A5 9876
B6A6 9F0E
B6A7 952D
B6A8 5B9A
B6A9 8BA2
B6AA 4E22
B6AB 4E1C
B6AC 51AC
B6AD 8463
B6AE 61C2
B6AF 52A8
B6B0 680B
B6B1 4F97
B6B2 606B
B6B3 51BB
B6B4 6D1E
B6B5 515C
B6B6 6296
B6B7 6597
B6B8 9661
B6B9 8C46
B6BA 9017
B6BB 75D8
B6BC 90FD
B6BD 7763
B6BE 6BD2
B6BF 728A
B6C0 72EC
B6C1 8BFB
B6C2 5835
B6C3 7779
B6C4 8D4C
B6C5 675C
B6C6 9540
B6C7 809A
B6C8 5EA6
B6C9 6E21
B6CA 5992
B6CB 7AEF
B6CC 77ED
B6CD 953B
B6CE 6BB5
B6CF 65AD
B6D0 7F0E
B6D1 5806
B6D2 5151
B6D3 961F
B6D4 5BF9
B6D5 58A9
B6D6 5428
B6D7 8E72
B6D8 6566
B6D9 987F
B6DA 56E4
B6DB 949D
B6DC 76FE
B6DD 9041
B6DE 6387
B6DF 54C6
B6E0 591A
B6E1 593A
B6E2 579B
B6E3 8EB2
B6E4 6735
B6E5 8DFA
B6E6 8235
B6E7 5241
B6E8 60F0
B6E9 5815
B6EA 86FE
B6EB 5CE8
B6EC 9E45
B6ED 4FC4
B6EE 989D
B6EF 8BB9
B6F0 5A25
B6F1 6076
B6F2 5384
B6F3 627C
B6F4 904F
B6F5 9102
B6F6 997F
B6F7 6069
B6F8 800C
B6F9 513F
B6FA 8033
B6FB 5C14
B6FC 9975
B6FD 6D31
B6FE 4E8C
B740 7A1D
B741 7A1F
B742 7A21
B743 7A22
B744 7A24
B745 7A25
B746 7A26
B747 7A27
B748 7A28
B749 7A29
B74A 7A2A
B74B 7A2B
B74C 7A2C
B74D 7A2D
B74E 7A2E
B74F 7A2F
B750 7A30
B751 7A31
B752 7A32
B753 7A34
B754 7A35
B755 7A36
B756 7A38
B757 7A3A
B758 7A3E
B759 7A40
B75A 7A41
B75B 7A42
B75C 7A43
B75D 7A44
B75E 7A45
B75F 7A47
B760 7A48
B761 7A49
B762 7A4A
B763 7A4B
B764 7A4C
B765 7A4D
B766 7A4E
B767 7A4F
B768 7A50
B769 7A52
B76A 7A53
B76B 7A54
B76C 7A55
B76D 7A56
B76E 7A58
B76F 7A59
B770 7A5A
B771 7A5B
B772 7A5C
B773 7A5D
B774 7A5E
B775 7A5F
B776 7A60
B777 7A61
B778 7A62
B779 7A63
B77A 7A64
B77B 7A65
B77C 7A66
B77D 7A67
B77E 7A68
B780 7A69
B781 7A6A
B782 7A6B
B783 7A6C
B784 7A6D
B785 7A6E
B786 7A6F
B787 7A71
B788 7A72
B789 7A73
B78A 7A75
B78B 7A7B
B78C 7A7C
B78D 7A7D
B78E 7A7E
B78F 7A82
B790 7A85
B791 7A87
B792 7A89
B793 7A8A
B794 7A8B
B795 7A8C
B796 7A8E
B797 7A8F
B798 7A90
B799 7A93
B79A 7A94
B79B 7A99
B79C 7A9A
B79D 7A9B
B79E 7A9E
B79F 7AA1
B7A0 7AA2
B7A1 8D30
B7A2 53D1
B7A3 7F5A
B7A4 7B4F
B7A5 4F10
B7A6 4E4F
B7A7 9600
B7A8 6CD5
B7A9 73D0
B7AA 85E9
B7AB 5E06
B7AC 756A
B7AD 7FFB
B7AE 6A0A
B7AF 77FE
B7B0 9492
B7B1 7E41
B7B2 51E1
B7B3 70E6
B7B4 53CD
B7B5 8FD4
B7B6 8303
B7B7 8D29
B7B8 72AF
B7B9 996D
B7BA 6CDB
B7BB 574A
B7BC 82B3
B7BD 65B9
B7BE 80AA
B7BF 623F
B7C0 9632
B7C1 59A8
B7C2 4EFF
B7C3 8BBF
B7C4 7EBA
B7C5 653E
B7C6 83F2
B7C7 975E
B7C8 5561
B7C9 98DE
B7CA 80A5
B7CB 532A
B7CC 8BFD
B7CD 5420
B7CE 80BA
B7CF 5E9F
B7D0 6CB8
B7D1 8D39
B7D2 82AC
B7D3 915A
B7D4 5429
B7D5 6C1B
B7D6 5206
B7D7 7EB7
B7D8 575F
B7D9 711A
B7DA 6C7E
B7DB 7C89
B7DC 594B
B7DD 4EFD
B7DE 5FFF
B7DF 6124
B7E0 7CAA
B7E1 4E30
B7E2 5C01
B7E3 67AB
B7E4 8702
B7E5 5CF0
B7E6 950B
B7E7 98CE
B7E8 75AF
B7E9 70FD
B7EA 9022
B7EB 51AF
B7EC 7F1D
B7ED 8BBD
B7EE 5949
B7EF 51E4
B7F0 4F5B
B7F1 5426
B7F2 592B
B7F3 6577
B7F4 80A4
B7F5 5B75
B7F6 6276
B7F7 62C2
B7F8 8F90
B7F9 5E45
B7FA 6C1F
B7FB 7B26
B7FC 4F0F
B7FD 4FD8
B7FE 670D
B840 7AA3
B841 7AA4
B842 7AA7
B843 7AA9
B844 7AAA
B845 7AAB
B846 7AAE
B847 7AAF
B848 7AB0
B849 7AB1
B84A 7AB2
B84B 7AB4
B84C 7AB5
B84D 7AB6
B84E 7AB7
B84F 7AB8
B850 7AB9
B851 7ABA
B852 7ABB
B853 7ABC
B854 7ABD
B855 7ABE
B856 7AC0
B857 7AC1
B858 7AC2
B859 7AC3
B85A 7AC4
B85B 7AC5
B85C 7AC6
B85D 7AC7
B85E 7AC8
B85F 7AC9
B860 7ACA
B861 7ACC
B862 7ACD
B863 7ACE
B864 7ACF
B865 7AD0
B866 7AD1
B867 7AD2
B868 7AD3
B869 7AD4
B86A 7AD5
B86B 7AD7
B86C 7AD8
B86D 7ADA
B86E 7ADB
B86F 7ADC
B870 7ADD
B871 7AE1
B872 7AE2
B873 7AE4
B874 7AE7
B875 7AE8
B876 7AE9
B877 7AEA
B878 7AEB
B879 7AEC
B87A 7AEE
B87B 7AF0
B87C 7AF1
B87D 7AF2
B87E 7AF3
B880 7AF4
B881 7AF5
B882 7AF6
B883 7AF7
B884 7AF8
B885 7AFB
B886 7AFC
B887 7AFE
B888 7B00
B889 7B01
B88A 7B02
B88B 7B05
B88C 7B07
B88D 7B09
B88E 7B0C
B88F 7B0D
B890 7B0E
B891 7B10
B892 7B12
B893 7B13
B894 7B16
B895 7B17
B896 7B18
B897 7B1A
B898 7B1C
B899 7B1D
B89A 7B1F
B89B 7B21
B89C 7B22
B89D 7B23
B89E 7B27
B89F 7B29
B8A0 7B2D
B8A1 6D6E
B8A2 6DAA
B8A3 798F
B8A4 88B1
B8A5 5F17
B8A6 752B
B8A7 629A
B8A8 8F85
B8A9 4FEF
B8AA 91DC
B8AB 65A7
B8AC 812F
B8AD 8151
B8AE 5E9C
B8AF 8150
B8B0 8D74
B8B1 526F
B8B2 8986
B8B3 8D4B
B8B4 590D
B8B5 5085
B8B6 4ED8
B8B7 961C
B8B8 7236
B8B9 8179
B8BA 8D1F
B8BB 5BCC
B8BC 8BA3
B8BD 9644
B8BE 5987
B8BF 7F1A
B8C0 5490
B8C1 5676
B8C2 560E
B8C3 8BE5
B8C4 6539
B8C5 6982
B8C6 9499
B8C7 76D6
B8C8 6E89
B8C9 5E72
B8CA 7518
B8CB 6746
B8CC 67D1
B8CD 7AFF
B8CE 809D
B8CF 8D76
B8D0 611F
B8D1 79C6
B8D2 6562
B8D3 8D63
B8D4 5188
B8D5 521A
B8D6 94A2
B8D7 7F38
B8D8 809B
B8D9 7EB2
B8DA 5C97
B8DB 6E2F
B8DC 6760
B8DD 7BD9
B8DE 768B
B8DF 9AD8
B8E0 818F
B8E1 7F94
B8E2 7CD5
B8E3 641E
B8E4 9550
B8E5 7A3F
B8E6 544A
B8E7 54E5
B8E8 6B4C
B8E9 6401
B8EA 6208
B8EB 9E3D
B8EC 80F3
B8ED 7599
B8EE 5272
B8EF 9769
B8F0 845B
B8F1 683C
B8F2 86E4
B8F3 9601
B8F4 9694
B8F5 94EC
B8F6 4E2A
B8F7 5404
B8F8 7ED9
B8F9 6839
B8FA 8DDF
B8FB 8015
B8FC 66F4
B8FD 5E9A
B8FE 7FB9
B940 7B2F
B941 7B30
B942 7B32
B943 7B34
B944 7B35
B945 7B36
B946 7B37
B947 7B39
B948 7B3B
B949 7B3D
B94A 7B3F
B94B 7B40
B94C 7B41
B94D 7B42
B94E 7B43
B94F 7B44
B950 7B46
B951 7B48
B952 7B4A
B953 7B4D
B954 7B4E
B955 7B53
B956 7B55
B957 7B57
B958 7B59
B959 7B5C
B95A 7B5E
B95B 7B5F
B95C 7B61
B95D 7B63
B95E 7B64
B95F 7B65
B960 7B66
B961 7B67
B962 7B68
B963 7B69
B964 7B6A
B965 7B6B
B966 7B6C
B967 7B6D
B968 7B6F
B969 7B70
B96A 7B73
B96B 7B74
B96C 7B76
B96D 7B78
B96E 7B7A
B96F 7B7C
B970 7B7D
B971 7B7F
B972 7B81
B973 7B82
B974 7B83
B975 7B84
B976 7B86
B977 7B87
B978 7B88
B979 7B89
B97A 7B8A
B97B 7B8B
B97C 7B8C
B97D 7B8E
B97E 7B8F
B980 7B91
B981 7B92
B982 7B93
B983 7B96
B984 7B98
B985 7B99
B986 7B9A
B987 7B9B
B988 7B9E
B989 7B9F
B98A 7BA0
B98B 7BA3
B98C 7BA4
B98D 7BA5
B98E 7BAE
B98F 7BAF
B990 7BB0
B991 7BB2
B992 7BB3
B993 7BB5
B994 7BB6
B995 7BB7
B996 7BB9
B997 7BBA
B998 7BBB
B999 7BBC
B99A 7BBD
B99B 7BBE
B99C 7BBF
B99D 7BC0
B99E 7BC2
B99F 7BC3
B9A0 7BC4
B9A1 57C2
B9A2 803F
B9A3 6897
B9A4 5DE5
B9A5 653B
B9A6 529F
B9A7 606D
B9A8 9F9A
B9A9 4F9B
B9AA 8EAC
B9AB 516C
B9AC 5BAB
B9AD 5F13
B9AE 5DE9
B9AF 6C5E
B9B0 62F1
B9B1 8D21
B9B2 5171
B9B3 94A9
B9B4 52FE
B9B5 6C9F
B9B6 82DF
B9B7 72D7
B9B8 57A2
B9B9 6784
B9BA 8D2D
B9BB 591F
B9BC 8F9C
B9BD 83C7
B9BE 5495
B9BF 7B8D
B9C0 4F30
B9C1 6CBD
B9C2 5B64
B9C3 59D1
B9C4 9F13
B9C5 53E4
B9C6 86CA
B9C7 9AA8
B9C8 8C37
B9C9 80A1
B9CA 6545
B9CB 987E
B9CC 56FA
B9CD 96C7
B9CE 522E
B9CF 74DC
B9D0 5250
B9D1 5BE1
B9D2 6302
B9D3 8902
B9D4 4E56
B9D5 62D0
B9D6 602A
B9D7 68FA
B9D8 5173
B9D9 5B98
B9DA 51A0
B9DB 89C2
B9DC 7BA1
B9DD 9986
B9DE 7F50
B9DF 60EF
B9E0 704C
B9E1 8D2F
B9E2 5149
B9E3 5E7F
B9E4 901B
B9E5 7470
B9E6 89C4
B9E7 572D
B9E8 7845
B9E9 5F52
B9EA 9F9F
B9EB 95FA
B9EC 8F68
B9ED 9B3C
B9EE 8BE1
B9EF 7678
B9F0 6842
B9F1 67DC
B9F2 8DEA
B9F3 8D35
B9F4 523D
B9F5 8F8A
B9F6 6EDA
B9F7 68CD
B9F8 9505
B9F9 90ED
B9FA 56FD
B9FB 679C
B9FC 88F9
B9FD 8FC7
B9FE 54C8
BA40 7BC5
BA41 7BC8
BA42 7BC9
BA43 7BCA
BA44 7BCB
BA45 7BCD
BA46 7BCE
BA47 7BCF
BA48 7BD0
BA49 7BD2
BA4A 7BD4
BA4B 7BD5
BA4C 7BD6
BA4D 7BD7
BA4E 7BD8
BA4F 7BDB
BA50 7BDC
BA51 7BDE
BA52 7BDF
BA53 7BE0
BA54 7BE2
BA55 7BE3
BA56 7BE4
BA57 7BE7
BA58 7BE8
BA59 7BE9
BA5A 7BEB
BA5B 7BEC
BA5C 7BED
BA5D 7BEF
BA5E 7BF0
BA5F 7BF2
BA60 7BF3
BA61 7BF4
BA62 7BF5
BA63 7BF6
BA64 7BF8
BA65 7BF9
BA66 7BFA
BA67 7BFB
BA68 7BFD
BA69 7BFF
BA6A 7C00
BA6B 7C01
BA6C 7C02
BA6D 7C03
BA6E 7C04
BA6F 7C05
BA70 7C06
BA71 7C08
BA72 7C09
BA73 7C0A
BA74 7C0D
BA75 7C0E
BA76 7C10
BA77 7C11
BA78 7C12
BA79 7C13
BA7A 7C14
BA7B 7C15
BA7C 7C17
BA7D 7C18
BA7E 7C19
BA80 7C1A
BA81 7C1B
BA82 7C1C
BA83 7C1D
BA84 7C1E
BA85 7C20
BA86 7C21
BA87 7C22
BA88 7C23
BA89 7C24
BA8A 7C25
BA8B 7C28
BA8C 7C29
BA8D 7C2B
BA8E 7C2C
BA8F 7C2D
BA90 7C2E
BA91 7C2F
BA92 7C30
BA93 7C31
BA94 7C32
BA95 7C33
BA96 7C34
BA97 7C35
BA98 7C36
BA99 7C37
BA9A 7C39
BA9B 7C3A
BA9C 7C3B
BA9D 7C3C
BA9E 7C3D
BA9F 7C3E
BAA0 7C42
BAA1 9AB8
BAA2 5B69
BAA3 6D77
BAA4 6C26
BAA5 4EA5
BAA6 5BB3
BAA7 9A87
BAA8 9163
BAA9 61A8
BAAA 90AF
BAAB 97E9
BAAC 542B
BAAD 6DB5
BAAE 5BD2
BAAF 51FD
BAB0 558A
BAB1 7F55
BAB2 7FF0
BAB3 64BC
BAB4 634D
BAB5 65F1
BAB6 61BE
BAB7 608D
BAB8 710A
BAB9 6C57
BABA 6C49
BABB 592F
BABC 676D
BABD 822A
BABE 58D5
BABF 568E
BAC0 8C6A
BAC1 6BEB
BAC2 90DD
BAC3 597D
BAC4 8017
BAC5 53F7
BAC6 6D69
BAC7 5475
BAC8 559D
BAC9 8377
BACA 83CF
BACB 6838
BACC 79BE
BACD 548C
BACE 4F55
BACF 5408
BAD0 76D2
BAD1 8C89
BAD2 9602
BAD3 6CB3
BAD4 6DB8
BAD5 8D6B
BAD6 8910
BAD7 9E64
BAD8 8D3A
BAD9 563F
BADA 9ED1
BADB 75D5
BADC 5F88
BADD 72E0
BADE 6068
BADF 54FC
BAE0 4EA8
BAE1 6A2A
BAE2 8861
BAE3 6052
BAE4 8F70
BAE5 54C4
BAE6 70D8
BAE7 8679
BAE8 9E3F
BAE9 6D2A
BAEA 5B8F
BAEB 5F18
BAEC 7EA2
BAED 5589
BAEE 4FAF
BAEF 7334
BAF0 543C
BAF1 539A
BAF2 5019
BAF3 540E
BAF4 547C
BAF5 4E4E
BAF6 5FFD
BAF7 745A
BAF8 58F6
BAF9 846B
BAFA 80E1
BAFB 8774
BAFC 72D0
BAFD 7CCA
BAFE 6E56
BB40 7C43
BB41 7C44
BB42 7C45
BB43 7C46
BB44 7C47
BB45 7C48
BB46 7C49
BB47 7C4A
BB48 7C4B
BB49 7C4C
BB4A 7C4E
BB4B 7C4F
BB4C 7C50
BB4D 7C51
BB4E 7C52
BB4F 7C53
BB50 7C54
BB51 7C55
BB52 7C56
BB53 7C57
BB54 7C58
BB55 7C59
BB56 7C5A
BB57 7C5B
BB58 7C5C
BB59 7C5D
BB5A 7C5E
BB5B 7C5F
BB5C 7C60
BB5D 7C61
BB5E 7C62
BB5F 7C63
BB60 7C64
BB61 7C65
BB62 7C66
BB63 7C67
BB64 7C68
BB65 7C69
BB66 7C6A
BB67 7C6B
BB68 7C6C
BB69 7C6D
BB6A 7C6E
BB6B 7C6F
BB6C 7C70
BB6D 7C71
BB6E 7C72
BB6F 7C75
BB70 7C76
BB71 7C77
BB72 7C78
BB73 7C79
BB74 7C7A
BB75 7C7E
BB76 7C7F
BB77 7C80
BB78 7C81
BB79 7C82
BB7A 7C83
BB7B 7C84
BB7C 7C85
BB7D 7C86
BB7E 7C87
BB80 7C88
BB81 7C8A
BB82 7C8B
BB83 7C8C
BB84 7C8D
BB85 7C8E
BB86 7C8F
BB87 7C90
BB88 7C93
BB89 7C94
BB8A 7C96
BB8B 7C99
BB8C 7C9A
BB8D 7C9B
BB8E 7CA0
BB8F 7CA1
BB90 7CA3
BB91 7CA6
BB92 7CA7
BB93 7CA8
BB94 7CA9
BB95 7CAB
BB96 7CAC
BB97 7CAD
BB98 7CAF
BB99 7CB0
BB9A 7CB4
BB9B 7CB5
BB9C 7CB6
BB9D 7CB7
BB9E 7CB8
BB9F 7CBA
BBA0 7CBB
BBA1 5F27
BBA2 864E
BBA3 552C
BBA4 62A4
BBA5 4E92
BBA6 6CAA
BBA7 6237
BBA8 82B1
BBA9 54D7
BBAA 534E
BBAB 733E
BBAC 6ED1
BBAD 753B
BBAE 5212
BBAF 5316
BBB0 8BDD
BBB1 69D0
BBB2 5F8A
BBB3 6000
BBB4 6DEE
BBB5 574F
BBB6 6B22
BBB7 73AF
BBB8 6853
BBB9 8FD8
BBBA 7F13
BBBB 6362
BBBC 60A3
BBBD 5524
BBBE 75EA
BBBF 8C62
BBC0 7115
BBC1 6DA3
BBC2 5BA6
BBC3 5E7B
BBC4 8352
BBC5 614C
BBC6 9EC4
BBC7 78FA
BBC8 8757
BBC9 7C27
BBCA 7687
BBCB 51F0
BBCC 60F6
BBCD 714C
BBCE 6643
BBCF 5E4C
BBD0 604D
BBD1 8C0E
BBD2 7070
BBD3 6325
BBD4 8F89
BBD5 5FBD
BBD6 6062
BBD7 86D4
BBD8 56DE
BBD9 6BC1
BBDA 6094
BBDB 6167
BBDC 5349
BBDD 60E0
BBDE 6666
BBDF 8D3F
BBE0 79FD
BBE1 4F1A
BBE2 70E9
BBE3 6C47
BBE4 8BB3
BBE5 8BF2
BBE6 7ED8
BBE7 8364
BBE8 660F
BBE9 5A5A
BBEA 9B42
BBEB 6D51
BBEC 6DF7
BBED 8C41
BBEE 6D3B
BBEF 4F19
BBF0 706B
BBF1 83B7
BBF2 6216
BBF3 60D1
BBF4 970D
BBF5 8D27
BBF6 7978
BBF7 51FB
BBF8 573E
BBF9 57FA
BBFA 673A
BBFB 7578
BBFC 7A3D
BBFD 79EF
BBFE 7B95
BC40 7CBF
BC41 7CC0
BC42 7CC2
BC43 7CC3
BC44 7CC4
BC45 7CC6
BC46 7CC9
BC47 7CCB
BC48 7CCE
BC49 7CCF
BC4A 7CD0
BC4B 7CD1
BC4C 7CD2
BC4D 7CD3
BC4E 7CD4
BC4F 7CD8
BC50 7CDA
BC51 7CDB
BC52 7CDD
BC53 7CDE
BC54 7CE1
BC55 7CE2
BC56 7CE3
BC57 7CE4
BC58 7CE5
BC59 7CE6
BC5A 7CE7
BC5B 7CE9
BC5C 7CEA
BC5D 7CEB
BC5E 7CEC
BC5F 7CED
BC60 7CEE
BC61 7CF0
BC62 7CF1
BC63 7CF2
BC64 7CF3
BC65 7CF4
BC66 7CF5
BC67 7CF6
BC68 7CF7
BC69 7CF9
BC6A 7CFA
BC6B 7CFC
BC6C 7CFD
BC6D 7CFE
BC6E 7CFF
BC6F 7D00
BC70 7D01
BC71 7D02
BC72 7D03
BC73 7D04
BC74 7D05
BC75 7D06
BC76 7D07
BC77 7D08
BC78 7D09
BC79 7D0B
BC7A 7D0C
BC7B 7D0D
BC7C 7D0E
BC7D 7D0F
BC7E 7D10
BC80 7D11
BC81 7D12
BC82 7D13
BC83 7D14
BC84 7D15
BC85 7D16
BC86 7D17
BC87 7D18
BC88 7D19
BC89 7D1A
BC8A 7D1B
BC8B 7D1C
BC8C 7D1D
BC8D 7D1E
BC8E 7D1F
BC8F 7D21
BC90 7D23
BC91 7D24
BC92 7D25
BC93 7D26
BC94 7D28
BC95 7D29
BC96 7D2A
BC97 7D2C
BC98 7D2D
BC99 7D2E
BC9A 7D30
BC9B 7D31
BC9C 7D32
BC9D 7D33
BC9E 7D34
BC9F 7D35
BCA0 7D36
BCA1 808C
BCA2 9965
BCA3 8FF9
BCA4 6FC0
BCA5 8BA5
BCA6 9E21
BCA7 59EC
BCA8 7EE9
BCA9 7F09
BCAA 5409
BCAB 6781
BCAC 68D8
BCAD 8F91
BCAE 7C4D
BCAF 96C6
BCB0 53CA
BCB1 6025
BCB2 75BE
BCB3 6C72
BCB4 5373
BCB5 5AC9
BCB6 7EA7
BCB7 6324
BCB8 51E0
BCB9 810A
BCBA 5DF1
BCBB 84DF
BCBC 6280
BCBD 5180
BCBE 5B63
BCBF 4F0E
BCC0 796D
BCC1 5242
BCC2 60B8
BCC3 6D4E
BCC4 5BC4
BCC5 5BC2
BCC6 8BA1
BCC7 8BB0
BCC8 65E2
BCC9 5FCC
BCCA 9645
BCCB 5993
BCCC 7EE7
BCCD 7EAA
BCCE 5609
BCCF 67B7
BCD0 5939
BCD1 4F73
BCD2 5BB6
BCD3 52A0
BCD4 835A
BCD5 988A
BCD6 8D3E
BCD7 7532
BCD8 94BE
BCD9 5047
BCDA 7A3C
BCDB 4EF7
BCDC 67B6
BCDD 9A7E
BCDE 5AC1
BCDF 6B7C
BCE0 76D1
BCE1 575A
BCE2 5C16
BCE3 7B3A
BCE4 95F4
BCE5 714E
BCE6 517C
BCE7 80A9
BCE8 8270
BCE9 5978
BCEA 7F04
BCEB 8327
BCEC 68C0
BCED 67EC
BCEE 78B1
BCEF 7877
BCF0 62E3
BCF1 6361
BCF2 7B80
BCF3 4FED
BCF4 526A
BCF5 51CF
BCF6 8350
BCF7 69DB
BCF8 9274
BCF9 8DF5
BCFA 8D31
BCFB 89C1
BCFC 952E
BCFD 7BAD
BCFE 4EF6
BD40 7D37
BD41 7D38
BD42 7D39
BD43 7D3A
BD44 7D3B
BD45 7D3C
BD46 7D3D
BD47 7D3E
BD48 7D3F
BD49 7D40
BD4A 7D41
BD4B 7D42
BD4C 7D43
BD4D 7D44
BD4E 7D45
BD4F 7D46
BD50 7D47
BD51 7D48
BD52 7D49
BD53 7D4A
BD54 7D4B
BD55 7D4C
BD56 7D4D
BD57 7D4E
BD58 7D4F
BD59 7D50
BD5A 7D51
BD5B 7D52
BD5C 7D53
BD5D 7D54
BD5E 7D55
BD5F 7D56
BD60 7D57
BD61 7D58
BD62 7D59
BD63 7D5A
BD64 7D5B
BD65 7D5C
BD66 7D5D
BD67 7D5E
BD68 7D5F
BD69 7D60
BD6A 7D61
BD6B 7D62
BD6C 7D63
BD6D 7D64
BD6E 7D65
BD6F 7D66
BD70 7D67
BD71 7D68
BD72 7D69
BD73 7D6A
BD74 7D6B
BD75 7D6C
BD76 7D6D
BD77 7D6F
BD78 7D70
BD79 7D71
BD7A 7D72
BD7B 7D73
BD7C 7D74
BD7D 7D75
BD7E 7D76
BD80 7D78
BD81 7D79
BD82 7D7A
BD83 7D7B
BD84 7D7C
BD85 7D7D
BD86 7D7E
BD87 7D7F
BD88 7D80
BD89 7D81
BD8A 7D82
BD8B 7D83
BD8C 7D84
BD8D 7D85
BD8E 7D86
BD8F 7D87
BD90 7D88
BD91 7D89
BD92 7D8A
BD93 7D8B
BD94 7D8C
BD95 7D8D
BD96 7D8E
BD97 7D8F
BD98 7D90
BD99 7D91
BD9A 7D92
BD9B 7D93
BD9C 7D94
BD9D 7D95
BD9E 7D96
BD9F 7D97
BDA0 7D98
BDA1 5065
BDA2 8230
BDA3 5251
BDA4 996F
BDA5 6E10
BDA6 6E85
BDA7 6DA7
BDA8 5EFA
BDA9 50F5
BDAA 59DC
BDAB 5C06
BDAC 6D46
BDAD 6C5F
BDAE 7586
BDAF 848B
BDB0 6868
BDB1 5956
BDB2 8BB2
BDB3 5320
BDB4 9171
BDB5 964D
BDB6 8549
BDB7 6912
BDB8 7901
BDB9 7126
BDBA 80F6
BDBB 4EA4
BDBC 90CA
BDBD 6D47
BDBE 9A84
BDBF 5A07
BDC0 56BC
BDC1 6405
BDC2 94F0
BDC3 77EB
BDC4 4FA5
BDC5 811A
BDC6 72E1
BDC7 89D2
BDC8 997A
BDC9 7F34
BDCA 7EDE
BDCB 527F
BDCC 6559
BDCD 9175
BDCE 8F7F
BDCF 8F83
BDD0 53EB
BDD1 7A96
BDD2 63ED
BDD3 63A5
BDD4 7686
BDD5 79F8
BDD6 8857
BDD7 9636
BDD8 622A
BDD9 52AB
BDDA 8282
BDDB 6854
BDDC 6770
BDDD 6377
BDDE 776B
BDDF 7AED
BDE0 6D01
BDE1 7ED3
BDE2 89E3
BDE3 59D0
BDE4 6212
BDE5 85C9
BDE6 82A5
BDE7 754C
BDE8 501F
BDE9 4ECB
BDEA 75A5
BDEB 8BEB
BDEC 5C4A
BDED 5DFE
BDEE 7B4B
BDEF 65A4
BDF0 91D1
BDF1 4ECA
BDF2 6D25
BDF3 895F
BDF4 7D27
BDF5 9526
BDF6 4EC5
BDF7 8C28
BDF8 8FDB
BDF9 9773
BDFA 664B
BDFB 7981
BDFC 8FD1
BDFD 70EC
BDFE 6D78
BE40 7D99
BE41 7D9A
BE42 7D9B
BE43 7D9C
BE44 7D9D
BE45 7D9E
BE46 7D9F
BE47 7DA0
BE48 7DA1
BE49 7DA2
BE4A 7DA3
BE4B 7DA4
BE4C 7DA5
BE4D 7DA7
BE4E 7DA8
BE4F 7DA9
BE50 7DAA
BE51 7DAB
BE52 7DAC
BE53 7DAD
BE54 7DAF
BE55 7DB0
BE56 7DB1
BE57 7DB2
BE58 7DB3
BE59 7DB4
BE5A 7DB5
BE5B 7DB6
BE5C 7DB7
BE5D 7DB8
BE5E 7DB9
BE5F 7DBA
BE60 7DBB
BE61 7DBC
BE62 7DBD
BE63 7DBE
BE64 7DBF
BE65 7DC0
BE66 7DC1
BE67 7DC2
BE68 7DC3
BE69 7DC4
BE6A 7DC5
BE6B 7DC6
BE6C 7DC7
BE6D 7DC8
BE6E 7DC9
BE6F 7DCA
BE70 7DCB
BE71 7DCC
BE72 7DCD
BE73 7DCE
BE74 7DCF
BE75 7DD0
BE76 7DD1
BE77 7DD2
BE78 7DD3
BE79 7DD4
BE7A 7DD5
BE7B 7DD6
BE7C 7DD7
BE7D 7DD8
BE7E 7DD9
BE80 7DDA
BE81 7DDB
BE82 7DDC
BE83 7DDD
BE84 7DDE
BE85 7DDF
BE86 7DE0
BE87 7DE1
BE88 7DE2
BE89 7DE3
BE8A 7DE4
BE8B 7DE5
BE8C 7DE6
BE8D 7DE7
BE8E 7DE8
BE8F 7DE9
BE90 7DEA
BE91 7DEB
BE92 7DEC
BE93 7DED
BE94 7DEE
BE95 7DEF
BE96 7DF0
BE97 7DF1
BE98 7DF2
BE99 7DF3
BE9A 7DF4
BE9B 7DF5
BE9C 7DF6
BE9D 7DF7
BE9E 7DF8
BE9F 7DF9
BEA0 7DFA
BEA1 5C3D
BEA2 52B2
BEA3 8346
BEA4 5162
BEA5 830E
BEA6 775B
BEA7 6676
BEA8 9CB8
BEA9 4EAC
BEAA 60CA
BEAB 7CBE
BEAC 7CB3
BEAD 7ECF
BEAE 4E95
BEAF 8B66
BEB0 666F
BEB1 9888
BEB2 9759
BEB3 5883
BEB4 656C
BEB5 955C
BEB6 5F84
BEB7 75C9
BEB8 9756
BEB9 7ADF
BEBA 7ADE
BEBB 51C0
BEBC 70AF
BEBD 7A98
BEBE 63EA
BEBF 7A76
BEC0 7EA0
BEC1 7396
BEC2 97ED
BEC3 4E45
BEC4 7078
BEC5 4E5D
BEC6 9152
BEC7 53A9
BEC8 6551
BEC9 65E7
BECA 81FC
BECB 8205
BECC 548E
BECD 5C31
BECE 759A
BECF 97A0
BED0 62D8
BED1 72D9
BED2 75BD
BED3 5C45
BED4 9A79
BED5 83CA
BED6 5C40
BED7 5480
BED8 77E9
BED9 4E3E
BEDA 6CAE
BEDB 805A
BEDC 62D2
BEDD 636E
BEDE 5DE8
BEDF 5177
BEE0 8DDD
BEE1 8E1E
BEE2 952F
BEE3 4FF1
BEE4 53E5
BEE5 60E7
BEE6 70AC
BEE7 5267
BEE8 6350
BEE9 9E43
BEEA 5A1F
BEEB 5026
BEEC 7737
BEED 5377
BEEE 7EE2
BEEF 6485
BEF0 652B
BEF1 6289
BEF2 6398
BEF3 5014
BEF4 7235
BEF5 89C9
BEF6 51B3
BEF7 8BC0
BEF8 7EDD
BEF9 5747
BEFA 83CC
BEFB 94A7
BEFC 519B
BEFD 541B
BEFE 5CFB
BF40 7DFB
BF41 7DFC
BF42 7DFD
BF43 7DFE
BF44 7DFF
BF45 7E00
BF46 7E01
BF47 7E02
BF48 7E03
BF49 7E04
BF4A 7E05
BF4B 7E06
BF4C 7E07
BF4D 7E08
BF4E 7E09
BF4F 7E0A
BF50 7E0B
BF51 7E0C
BF52 7E0D
BF53 7E0E
BF54 7E0F
BF55 7E10
BF56 7E11
BF57 7E12
BF58 7E13
BF59 7E14
BF5A 7E15
BF5B 7E16
BF5C 7E17
BF5D 7E18
BF5E 7E19
BF5F 7E1A
BF60 7E1B
BF61 7E1C
BF62 7E1D
BF63 7E1E
BF64 7E1F
BF65 7E20
BF66 7E21
BF67 7E22
BF68 7E23
BF69 7E24
BF6A 7E25
BF6B 7E26
BF6C 7E27
BF6D 7E28
BF6E 7E29
BF6F 7E2A
BF70 7E2B
BF71 7E2C
BF72 7E2D
BF73 7E2E
BF74 7E2F
BF75 7E30
BF76 7E31
BF77 7E32
BF78 7E33
BF79 7E34
BF7A 7E35
BF7B 7E36
BF7C 7E37
BF7D 7E38
BF7E 7E39
BF80 7E3A
BF81 7E3C
BF82 7E3D
BF83 7E3E
BF84 7E3F
BF85 7E40
BF86 7E42
BF87 7E43
BF88 7E44
BF89 7E45
BF8A 7E46
BF8B 7E48
BF8C 7E49
BF8D 7E4A
BF8E 7E4B
BF8F 7E4C
BF90 7E4D
BF91 7E4E
BF92 7E4F
BF93 7E50
BF94 7E51
BF95 7E52
BF96 7E53
BF97 7E54
BF98 7E55
BF99 7E56
BF9A 7E57
BF9B 7E58
BF9C 7E59
BF9D 7E5A
BF9E 7E5B
BF9F 7E5C
BFA0 7E5D
BFA1 4FCA
BFA2 7AE3
BFA3 6D5A
BFA4 90E1
BFA5 9A8F
BFA6 5580
BFA7 5496
BFA8 5361
BFA9 54AF
BFAA 5F00
BFAB 63E9
BFAC 6977
BFAD 51EF
BFAE 6168
BFAF 520A
BFB0 582A
BFB1 52D8
BFB2 574E
BFB3 780D
BFB4 770B
BFB5 5EB7
BFB6 6177
BFB7 7CE0
BFB8 625B
BFB9 6297
BFBA 4EA2
BFBB 7095
BFBC 8003
BFBD 62F7
BFBE 70E4
BFBF 9760
BFC0 5777
BFC1 82DB
BFC2 67EF
BFC3 68F5
BFC4 78D5
BFC5 9897
BFC6 79D1
BFC7 58F3
BFC8 54B3
BFC9 53EF
BFCA 6E34
BFCB 514B
BFCC 523B
BFCD 5BA2
BFCE 8BFE
BFCF 80AF
BFD0 5543
BFD1 57A6
BFD2 6073
BFD3 5751
BFD4 542D
BFD5 7A7A
BFD6 6050
BFD7 5B54
BFD8 63A7
BFD9 62A0
BFDA 53E3
BFDB 6263
BFDC 5BC7
BFDD 67AF
BFDE 54ED
BFDF 7A9F
BFE0 82E6
BFE1 9177
BFE2 5E93
BFE3 88E4
BFE4 5938
BFE5 57AE
BFE6 630E
BFE7 8DE8
BFE8 80EF
BFE9 5757
BFEA 7B77
BFEB 4FA9
BFEC 5FEB
BFED 5BBD
BFEE 6B3E
BFEF 5321
BFF0 7B50
BFF1 72C2
BFF2 6846
BFF3 77FF
BFF4 7736
BFF5 65F7
BFF6 51B5
BFF7 4E8F
BFF8 76D4
BFF9 5CBF
BFFA 7AA5
BFFB 8475
BFFC 594E
BFFD 9B41
BFFE 5080
C040 7E5E
C041 7E5F
C042 7E60
C043 7E61
C044 7E62
C045 7E63
C046 7E64
C047 7E65
C048 7E66
C049 7E67
C04A 7E68
C04B 7E69
C04C 7E6A
C04D 7E6B
C04E 7E6C
C04F 7E6D
C050 7E6E
C051 7E6F
C052 7E70
C053 7E71
C054 7E72
C055 7E73
C056 7E74
C057 7E75
C058 7E76
C059 7E77
C05A 7E78
C05B 7E79
C05C 7E7A
C05D 7E7B
C05E 7E7C
C05F 7E7D
C060 7E7E
C061 7E7F
C062 7E80
C063 7E81
C064 7E83
C065 7E84
C066 7E85
C067 7E86
C068 7E87
C069 7E88
C06A 7E89
C06B 7E8A
C06C 7E8B
C06D 7E8C
C06E 7E8D
C06F 7E8E
C070 7E8F
C071 7E90
C072 7E91
C073 7E92
C074 7E93
C075 7E94
C076 7E95
C077 7E96
C078 7E97
C079 7E98
C07A 7E99
C07B 7E9A
C07C 7E9C
C07D 7E9D
C07E 7E9E
C080 7EAE
C081 7EB4
C082 7EBB
C083 7EBC
C084 7ED6
C085 7EE4
C086 7EEC
C087 7EF9
C088 7F0A
C089 7F10
C08A 7F1E
C08B 7F37
C08C 7F39
C08D 7F3B
C08E 7F3C
C08F 7F3D
C090 7F3E
C091 7F3F
C092 7F40
C093 7F41
C094 7F43
C095 7F46
C096 7F47
C097 7F48
C098 7F49
C099 7F4A
C09A 7F4B
C09B 7F4C
C09C 7F4D
C09D 7F4E
C09E 7F4F
C09F 7F52
C0A0 7F53
C0A1 9988
C0A2 6127
C0A3 6E83
C0A4 5764
C0A5 6606
C0A6 6346
C0A7 56F0
C0A8 62EC
C0A9 6269
C0AA 5ED3
C0AB 9614
C0AC 5783
C0AD 62C9
C0AE 5587
C0AF 8721
C0B0 814A
C0B1 8FA3
C0B2 5566
C0B3 83B1
C0B4 6765
C0B5 8D56
C0B6 84DD
C0B7 5A6A
C0B8 680F
C0B9 62E6
C0BA 7BEE
C0BB 9611
C0BC 5170
C0BD 6F9C
C0BE 8C30
C0BF 63FD
C0C0 89C8
C0C1 61D2
C0C2 7F06
C0C3 70C2
C0C4 6EE5
C0C5 7405
C0C6 6994
C0C7 72FC
C0C8 5ECA
C0C9 90CE
C0CA 6717
C0CB 6D6A
C0CC 635E
C0CD 52B3
C0CE 7262
C0CF 8001
C0D0 4F6C
C0D1 59E5
C0D2 916A
C0D3 70D9
C0D4 6D9D
C0D5 52D2
C0D6 4E50
C0D7 96F7
C0D8 956D
C0D9 857E
C0DA 78CA
C0DB 7D2F
C0DC 5121
C0DD 5792
C0DE 64C2
C0DF 808B
C0E0 7C7B
C0E1 6CEA
C0E2 68F1
C0E3 695E
C0E4 51B7
C0E5 5398
C0E6 68A8
C0E7 7281
C0E8 9ECE
C0E9 7BF1
C0EA 72F8
C0EB 79BB
C0EC 6F13
C0ED 7406
C0EE 674E
C0EF 91CC
C0F0 9CA4
C0F1 793C
C0F2 8389
C0F3 8354
C0F4 540F
C0F5 6817
C0F6 4E3D
C0F7 5389
C0F8 52B1
C0F9 783E
C0FA 5386
C0FB 5229
C0FC 5088
C0FD 4F8B
C0FE 4FD0
C140 7F56
C141 7F59
C142 7F5B
C143 7F5C
C144 7F5D
C145 7F5E
C146 7F60
C147 7F63
C148 7F64
C149 7F65
C14A 7F66
C14B 7F67
C14C 7F6B
C14D 7F6C
C14E 7F6D
C14F 7F6F
C150 7F70
C151 7F73
C152 7F75
C153 7F76
C154 7F77
C155 7F78
C156 7F7A
C157 7F7B
C158 7F7C
C159 7F7D
C15A 7F7F
C15B 7F80
C15C 7F82
C15D 7F83
C15E 7F84
C15F 7F85
C160 7F86
C161 7F87
C162 7F88
C163 7F89
C164 7F8B
C165 7F8D
C166 7F8F
C167 7F90
C168 7F91
C169 7F92
C16A 7F93
C16B 7F95
C16C 7F96
C16D 7F97
C16E 7F98
C16F 7F99
C170 7F9B
C171 7F9C
C172 7FA0
C173 7FA2
C174 7FA3
C175 7FA5
C176 7FA6
C177 7FA8
C178 7FA9
C179 7FAA
C17A 7FAB
C17B 7FAC
C17C 7FAD
C17D 7FAE
C17E 7FB1
C180 7FB3
C181 7FB4
C182 7FB5
C183 7FB6
C184 7FB7
C185 7FBA
C186 7FBB
C187 7FBE
C188 7FC0
C189 7FC2
C18A 7FC3
C18B 7FC4
C18C 7FC6
C18D 7FC7
C18E 7FC8
C18F 7FC9
C190 7FCB
C191 7FCD
C192 7FCF
C193 7FD0
C194 7FD1
C195 7FD2
C196 7FD3
C197 7FD6
C198 7FD7
C199 7FD9
C19A 7FDA
C19B 7FDB
C19C 7FDC
C19D 7FDD
C19E 7FDE
C19F 7FE2
C1A0 7FE3
C1A1 75E2
C1A2 7ACB
C1A3 7C92
C1A4 6CA5
C1A5 96B6
C1A6 529B
C1A7 7483
C1A8 54E9
C1A9 4FE9
C1AA 8054
C1AB 83B2
C1AC 8FDE
C1AD 9570
C1AE 5EC9
C1AF 601C
C1B0 6D9F
C1B1 5E18
C1B2 655B
C1B3 8138
C1B4 94FE
C1B5 604B
C1B6 70BC
C1B7 7EC3
C1B8 7CAE
C1B9 51C9
C1BA 6881
C1BB 7CB1
C1BC 826F
C1BD 4E24
C1BE 8F86
C1BF 91CF
C1C0 667E
C1C1 4EAE
C1C2 8C05
C1C3 64A9
C1C4 804A
C1C5 50DA
C1C6 7597
C1C7 71CE
C1C8 5BE5
C1C9 8FBD
C1CA 6F66
C1CB 4E86
C1CC 6482
C1CD 9563
C1CE 5ED6
C1CF 6599
C1D0 5217
C1D1 88C2
C1D2 70C8
C1D3 52A3
C1D4 730E
C1D5 7433
C1D6 6797
C1D7 78F7
C1D8 9716
C1D9 4E34
C1DA 90BB
C1DB 9CDE
C1DC 6DCB
C1DD 51DB
C1DE 8D41
C1DF 541D
C1E0 62CE
C1E1 73B2
C1E2 83F1
C1E3 96F6
C1E4 9F84
C1E5 94C3
C1E6 4F36
C1E7 7F9A
C1E8 51CC
C1E9 7075
C1EA 9675
C1EB 5CAD
C1EC 9886
C1ED 53E6
C1EE 4EE4
C1EF 6E9C
C1F0 7409
C1F1 69B4
C1F2 786B
C1F3 998F
C1F4 7559
C1F5 5218
C1F6 7624
C1F7 6D41
C1F8 67F3
C1F9 516D
C1FA 9F99
C1FB 804B
C1FC 5499
C1FD 7B3C
C1FE 7ABF
C240 7FE4
C241 7FE7
C242 7FE8
C243 7FEA
C244 7FEB
C245 7FEC
C246 7FED
C247 7FEF
C248 7FF2
C249 7FF4
C24A 7FF5
C24B 7FF6
C24C 7FF7
C24D 7FF8
C24E 7FF9
C24F 7FFA
C250 7FFD
C251 7FFE
C252 7FFF
C253 8002
C254 8007
C255 8008
C256 8009
C257 800A
C258 800E
C259 800F
C25A 8011
C25B 8013
C25C 801A
C25D 801B
C25E 801D
C25F 801E
C260 801F
C261 8021
C262 8023
C263 8024
C264 802B
C265 802C
C266 802D
C267 802E
C268 802F
C269 8030
C26A 8032
C26B 8034
C26C 8039
C26D 803A
C26E 803C
C26F 803E
C270 8040
C271 8041
C272 8044
C273 8045
C274 8047
C275 8048
C276 8049
C277 804E
C278 804F
C279 8050
C27A 8051
C27B 8053
C27C 8055
C27D 8056
C27E 8057
C280 8059
C281 805B
C282 805C
C283 805D
C284 805E
C285 805F
C286 8060
C287 8061
C288 8062
C289 8063
C28A 8064
C28B 8065
C28C 8066
C28D 8067
C28E 8068
C28F 806B
C290 806C
C291 806D
C292 806E
C293 806F
C294 8070
C295 8072
C296 8073
C297 8074
C298 8075
C299 8076
C29A 8077
C29B 8078
C29C 8079
C29D 807A
C29E 807B
C29F 807C
C2A0 807D
C2A1 9686
C2A2 5784
C2A3 62E2
C2A4 9647
C2A5 697C
C2A6 5A04
C2A7 6402
C2A8 7BD3
C2A9 6F0F
C2AA 964B
C2AB 82A6
C2AC 5362
C2AD 9885
C2AE 5E90
C2AF 7089
C2B0 63B3
C2B1 5364
C2B2 864F
C2B3 9C81
C2B4 9E93
C2B5 788C
C2B6 9732
C2B7 8DEF
C2B8 8D42
C2B9 9E7F
C2BA 6F5E
C2BB 7984
C2BC 5F55
C2BD 9646
C2BE 622E
C2BF 9A74
C2C0 5415
C2C1 94DD
C2C2 4FA3
C2C3 65C5
C2C4 5C65
C2C5 5C61
C2C6 7F15
C2C7 8651
C2C8 6C2F
C2C9 5F8B
C2CA 7387
C2CB 6EE4
C2CC 7EFF
C2CD 5CE6
C2CE 631B
C2CF 5B6A
C2D0 6EE6
C2D1 5375
C2D2 4E71
C2D3 63A0
C2D4 7565
C2D5 62A1
C2D6 8F6E
C2D7 4F26
C2D8 4ED1
C2D9 6CA6
C2DA 7EB6
C2DB 8BBA
C2DC 841D
C2DD 87BA
C2DE 7F57
C2DF 903B
C2E0 9523
C2E1 7BA9
C2E2 9AA1
C2E3 88F8
C2E4 843D
C2E5 6D1B
C2E6 9A86
C2E7 7EDC
C2E8 5988
C2E9 9EBB
C2EA 739B
C2EB 7801
C2EC 8682
C2ED 9A6C
C2EE 9A82
C2EF 561B
C2F0 5417
C2F1 57CB
C2F2 4E70
C2F3 9EA6
C2F4 5356
C2F5 8FC8
C2F6 8109
C2F7 7792
C2F8 9992
C2F9 86EE
C2FA 6EE1
C2FB 8513
C2FC 66FC
C2FD 6162
C2FE 6F2B
C340 807E
C341 8081
C342 8082
C343 8085
C344 8088
C345 808A
C346 808D
C347 808E
C348 808F
C349 8090
C34A 8091
C34B 8092
C34C 8094
C34D 8095
C34E 8097
C34F 8099
C350 809E
C351 80A3
C352 80A6
C353 80A7
C354 80A8
C355 80AC
C356 80B0
C357 80B3
C358 80B5
C359 80B6
C35A 80B8
C35B 80B9
C35C 80BB
C35D 80C5
C35E 80C7
C35F 80C8
C360 80C9
C361 80CA
C362 80CB
C363 80CF
C364 80D0
C365 80D1
C366 80D2
C367 80D3
C368 80D4
C369 80D5
C36A 80D8
C36B 80DF
C36C 80E0
C36D 80E2
C36E 80E3
C36F 80E6
C370 80EE
C371 80F5
C372 80F7
C373 80F9
C374 80FB
C375 80FE
C376 80FF
C377 8100
C378 8101
C379 8103
C37A 8104
C37B 8105
C37C 8107
C37D 8108
C37E 810B
C380 810C
C381 8115
C382 8117
C383 8119
C384 811B
C385 811C
C386 811D
C387 811F
C388 8120
C389 8121
C38A 8122
C38B 8123
C38C 8124
C38D 8125
C38E 8126
C38F 8127
C390 8128
C391 8129
C392 812A
C393 812B
C394 812D
C395 812E
C396 8130
C397 8133
C398 8134
C399 8135
C39A 8137
C39B 8139
C39C 813A
C39D 813B
C39E 813C
C39F 813D
C3A0 813F
C3A1 8C29
C3A2 8292
C3A3 832B
C3A4 76F2
C3A5 6C13
C3A6 5FD9
C3A7 83BD
C3A8 732B
C3A9 8305
C3AA 951A
C3AB 6BDB
C3AC 77DB
C3AD 94C6
C3AE 536F
C3AF 8302
C3B0 5192
C3B1 5E3D
C3B2 8C8C
C3B3 8D38
C3B4 4E48
C3B5 73AB
C3B6 679A
C3B7 6885
C3B8 9176
C3B9 9709
C3BA 7164
C3BB 6CA1
C3BC 7709
C3BD 5A92
C3BE 9541
C3BF 6BCF
C3C0 7F8E
C3C1 6627
C3C2 5BD0
C3C3 59B9
C3C4 5A9A
C3C5 95E8
C3C6 95F7
C3C7 4EEC
C3C8 840C
C3C9 8499
C3CA 6AAC
C3CB 76DF
C3CC 9530
C3CD 731B
C3CE 68A6
C3CF 5B5F
C3D0 772F
C3D1 919A
C3D2 9761
C3D3 7CDC
C3D4 8FF7
C3D5 8C1C
C3D6 5F25
C3D7 7C73
C3D8 79D8
C3D9 89C5
C3DA 6CCC
C3DB 871C
C3DC 5BC6
C3DD 5E42
C3DE 68C9
C3DF 7720
C3E0 7EF5
C3E1 5195
C3E2 514D
C3E3 52C9
C3E4 5A29
C3E5 7F05
C3E6 9762
C3E7 82D7
C3E8 63CF
C3E9 7784
C3EA 85D0
C3EB 79D2
C3EC 6E3A
C3ED 5E99
C3EE 5999
C3EF 8511
C3F0 706D
C3F1 6C11
C3F2 62BF
C3F3 76BF
C3F4 654F
C3F5 60AF
C3F6 95FD
C3F7 660E
C3F8 879F
C3F9 9E23
C3FA 94ED
C3FB 540D
C3FC 547D
C3FD 8C2C
C3FE 6478
C440 8140
C441 8141
C442 8142
C443 8143
C444 8144
C445 8145
C446 8147
C447 8149
C448 814D
C449 814E
C44A 814F
C44B 8152
C44C 8156
C44D 8157
C44E 8158
C44F 815B
C450 815C
C451 815D
C452 815E
C453 815F
C454 8161
C455 8162
C456 8163
C457 8164
C458 8166
C459 8168
C45A 816A
C45B 816B
C45C 816C
C45D 816F
C45E 8172
C45F 8173
C460 8175
C461 8176
C462 8177
C463 8178
C464 8181
C465 8183
C466 8184
C467 8185
C468 8186
C469 8187
C46A 8189
C46B 818B
C46C 818C
C46D 818D
C46E 818E
C46F 8190
C470 8192
C471 8193
C472 8194
C473 8195
C474 8196
C475 8197
C476 8199
C477 819A
C478 819E
C479 819F
C47A 81A0
C47B 81A1
C47C 81A2
C47D 81A4
C47E 81A5
C480 81A7
C481 81A9
C482 81AB
C483 81AC
C484 81AD
C485 81AE
C486 81AF
C487 81B0
C488 81B1
C489 81B2
C48A 81B4
C48B 81B5
C48C 81B6
C48D 81B7
C48E 81B8
C48F 81B9
C490 81BC
C491 81BD
C492 81BE
C493 81BF
C494 81C4
C495 81C5
C496 81C7
C497 81C8
C498 81C9
C499 81CB
C49A 81CD
C49B 81CE
C49C 81CF
C49D 81D0
C49E 81D1
C49F 81D2
C4A0 81D3
C4A1 6479
C4A2 8611
C4A3 6A21
C4A4 819C
C4A5 78E8
C4A6 6469
C4A7 9B54
C4A8 62B9
C4A9 672B
C4AA 83AB
C4AB 58A8
C4AC 9ED8
C4AD 6CAB
C4AE 6F20
C4AF 5BDE
C4B0 964C
C4B1 8C0B
C4B2 725F
C4B3 67D0
C4B4 62C7
C4B5 7261
C4B6 4EA9
C4B7 59C6
C4B8 6BCD
C4B9 5893
C4BA 66AE
C4BB 5E55
C4BC 52DF
C4BD 6155
C4BE 6728
C4BF 76EE
C4C0 7766
C4C1 7267
C4C2 7A46
C4C3 62FF
C4C4 54EA
C4C5 5450
C4C6 94A0
C4C7 90A3
C4C8 5A1C
C4C9 7EB3
C4CA 6C16
C4CB 4E43
C4CC 5976
C4CD 8010
C4CE 5948
C4CF 5357
C4D0 7537
C4D1 96BE
C4D2 56CA
C4D3 6320
C4D4 8111
C4D5 607C
C4D6 95F9
C4D7 6DD6
C4D8 5462
C4D9 9981
C4DA 5185
C4DB 5AE9
C4DC 80FD
C4DD 59AE
C4DE 9713
C4DF 502A
C4E0 6CE5
C4E1 5C3C
C4E2 62DF
C4E3 4F60
C4E4 533F
C4E5 817B
C4E6 9006
C4E7 6EBA
C4E8 852B
C4E9 62C8
C4EA 5E74
C4EB 78BE
C4EC 64B5
C4ED 637B
C4EE 5FF5
C4EF 5A18
C4F0 917F
C4F1 9E1F
C4F2 5C3F
C4F3 634F
C4F4 8042
C4F5 5B7D
C4F6 556E
C4F7 954A
C4F8 954D
C4F9 6D85
C4FA 60A8
C4FB 67E0
C4FC 72DE
C4FD 51DD
C4FE 5B81
C540 81D4
C541 81D5
C542 81D6
C543 81D7
C544 81D8
C545 81D9
C546 81DA
C547 81DB
C548 81DC
C549 81DD
C54A 81DE
C54B 81DF
C54C 81E0
C54D 81E1
C54E 81E2
C54F 81E4
C550 81E5
C551 81E6
C552 81E8
C553 81E9
C554 81EB
C555 81EE
C556 81EF
C557 81F0
C558 81F1
C559 81F2
C55A 81F5
C55B 81F6
C55C 81F7
C55D 81F8
C55E 81F9
C55F 81FA
C560 81FD
C561 81FF
C562 8203
C563 8207
C564 8208
C565 8209
C566 820A
C567 820B
C568 820E
C569 820F
C56A 8211
C56B 8213
C56C 8215
C56D 8216
C56E 8217
C56F 8218
C570 8219
C571 821A
C572 821D
C573 8220
C574 8224
C575 8225
C576 8226
C577 8227
C578 8229
C579 822E
C57A 8232
C57B 823A
C57C 823C
C57D 823D
C57E 823F
C580 8240
C581 8241
C582 8242
C583 8243
C584 8245
C585 8246
C586 8248
C587 824A
C588 824C
C589 824D
C58A 824E
C58B 8250
C58C 8251
C58D 8252
C58E 8253
C58F 8254
C590 8255
C591 8256
C592 8257
C593 8259
C594 825B
C595 825C
C596 825D
C597 825E
C598 8260
C599 8261
C59A 8262
C59B 8263
C59C 8264
C59D 8265
C59E 8266
C59F 8267
C5A0 8269
C5A1 62E7
C5A2 6CDE
C5A3 725B
C5A4 626D
C5A5 94AE
C5A6 7EBD
C5A7 8113
C5A8 6D53
C5A9 519C
C5AA 5F04
C5AB 5974
C5AC 52AA
C5AD 6012
C5AE 5973
C5AF 6696
C5B0 8650
C5B1 759F
C5B2 632A
C5B3 61E6
C5B4 7CEF
C5B5 8BFA
C5B6 54E6
C5B7 6B27
C5B8 9E25
C5B9 6BB4
C5BA 85D5
C5BB 5455
C5BC 5076
C5BD 6CA4
C5BE 556A
C5BF 8DB4
C5C0 722C
C5C1 5E15
C5C2 6015
C5C3 7436
C5C4 62CD
C5C5 6392
C5C6 724C
C5C7 5F98
C5C8 6E43
C5C9 6D3E
C5CA 6500
C5CB 6F58
C5CC 76D8
C5CD 78D0
C5CE 76FC
C5CF 7554
C5D0 5224
C5D1 53DB
C5D2 4E53
C5D3 5E9E
C5D4 65C1
C5D5 802A
C5D6 80D6
C5D7 629B
C5D8 5486
C5D9 5228
C5DA 70AE
C5DB 888D
C5DC 8DD1
C5DD 6CE1
C5DE 5478
C5DF 80DA
C5E0 57F9
C5E1 88F4
C5E2 8D54
C5E3 966A
C5E4 914D
C5E5 4F69
C5E6 6C9B
C5E7 55B7
C5E8 76C6
C5E9 7830
C5EA 62A8
C5EB 70F9
C5EC 6F8E
C5ED 5F6D
C5EE 84EC
C5EF 68DA
C5F0 787C
C5F1 7BF7
C5F2 81A8
C5F3 670B
C5F4 9E4F
C5F5 6367
C5F6 78B0
C5F7 576F
C5F8 7812
C5F9 9739
C5FA 6279
C5FB 62AB
C5FC 5288
C5FD 7435
C5FE 6BD7
C640 826A
C641 826B
C642 826C
C643 826D
C644 8271
C645 8275
C646 8276
C647 8277
C648 8278
C649 827B
C64A 827C
C64B 8280
C64C 8281
C64D 8283
C64E 8285
C64F 8286
C650 8287
C651 8289
C652 828C
C653 8290
C654 8293
C655 8294
C656 8295
C657 8296
C658 829A
C659 829B
C65A 829E
C65B 82A0
C65C 82A2
C65D 82A3
C65E 82A7
C65F 82B2
C660 82B5
C661 82B6
C662 82BA
C663 82BB
C664 82BC
C665 82BF
C666 82C0
C667 82C2
C668 82C3
C669 82C5
C66A 82C6
C66B 82C9
C66C 82D0
C66D 82D6
C66E 82D9
C66F 82DA
C670 82DD
C671 82E2
C672 82E7
C673 82E8
C674 82E9
C675 82EA
C676 82EC
C677 82ED
C678 82EE
C679 82F0
C67A 82F2
C67B 82F3
C67C 82F5
C67D 82F6
C67E 82F8
C680 82FA
C681 82FC
C682 82FD
C683 82FE
C684 82FF
C685 8300
C686 830A
C687 830B
C688 830D
C689 8310
C68A 8312
C68B 8313
C68C 8316
C68D 8318
C68E 8319
C68F 831D
C690 831E
C691 831F
C692 8320
C693 8321
C694 8322
C695 8323
C696 8324
C697 8325
C698 8326
C699 8329
C69A 832A
C69B 832E
C69C 8330
C69D 8332
C69E 8337
C69F 833B
C6A0 833D
C6A1 5564
C6A2 813E
C6A3 75B2
C6A4 76AE
C6A5 5339
C6A6 75DE
C6A7 50FB
C6A8 5C41
C6A9 8B6C
C6AA 7BC7
C6AB 504F
C6AC 7247
C6AD 9A97
C6AE 98D8
C6AF 6F02
C6B0 74E2
C6B1 7968
C6B2 6487
C6B3 77A5
C6B4 62FC
C6B5 9891
C6B6 8D2B
C6B7 54C1
C6B8 8058
C6B9 4E52
C6BA 576A
C6BB 82F9
C6BC 840D
C6BD 5E73
C6BE 51ED
C6BF 74F6
C6C0 8BC4
C6C1 5C4F
C6C2 5761
C6C3 6CFC
C6C4 9887
C6C5 5A46
C6C6 7834
C6C7 9B44
C6C8 8FEB
C6C9 7C95
C6CA 5256
C6CB 6251
C6CC 94FA
C6CD 4EC6
C6CE 8386
C6CF 8461
C6D0 83E9
C6D1 84B2
C6D2 57D4
C6D3 6734
C6D4 5703
C6D5 666E
C6D6 6D66
C6D7 8C31
C6D8 66DD
C6D9 7011
C6DA 671F
C6DB 6B3A
C6DC 6816
C6DD 621A
C6DE 59BB
C6DF 4E03
C6E0 51C4
C6E1 6F06
C6E2 67D2
C6E3 6C8F
C6E4 5176
C6E5 68CB
C6E6 5947
C6E7 6B67
C6E8 7566
C6E9 5D0E
C6EA 8110
C6EB 9F50
C6EC 65D7
C6ED 7948
C6EE 7941
C6EF 9A91
C6F0 8D77
C6F1 5C82
C6F2 4E5E
C6F3 4F01
C6F4 542F
C6F5 5951
C6F6 780C
C6F7 5668
C6F8 6C14
C6F9 8FC4
C6FA 5F03
C6FB 6C7D
C6FC 6CE3
C6FD 8BAB
C6FE 6390
C740 833E
C741 833F
C742 8341
C743 8342
C744 8344
C745 8345
C746 8348
C747 834A
C748 834B
C749 834C
C74A 834D
C74B 834E
C74C 8353
C74D 8355
C74E 8356
C74F 8357
C750 8358
C751 8359
C752 835D
C753 8362
C754 8370
C755 8371
C756 8372
C757 8373
C758 8374
C759 8375
C75A 8376
C75B 8379
C75C 837A
C75D 837E
C75E 837F
C75F 8380
C760 8381
C761 8382
C762 8383
C763 8384
C764 8387
C765 8388
C766 838A
C767 838B
C768 838C
C769 838D
C76A 838F
C76B 8390
C76C 8391
C76D 8394
C76E 8395
C76F 8396
C770 8397
C771 8399
C772 839A
C773 839D
C774 839F
C775 83A1
C776 83A2
C777 83A3
C778 83A4
C779 83A5
C77A 83A6
C77B 83A7
C77C 83AC
C77D 83AD
C77E 83AE
C780 83AF
C781 83B5
C782 83BB
C783 83BE
C784 83BF
C785 83C2
C786 83C3
C787 83C4
C788 83C6
C789 83C8
C78A 83C9
C78B 83CB
C78C 83CD
C78D 83CE
C78E 83D0
C78F 83D1
C790 83D2
C791 83D3
C792 83D5
C793 83D7
C794 83D9
C795 83DA
C796 83DB
C797 83DE
C798 83E2
C799 83E3
C79A 83E4
C79B 83E6
C79C 83E7
C79D 83E8
C79E 83EB
C79F 83EC
C7A0 83ED
C7A1 6070
C7A2 6D3D
C7A3 7275
C7A4 6266
C7A5 948E
C7A6 94C5
C7A7 5343
C7A8 8FC1
C7A9 7B7E
C7AA 4EDF
C7AB 8C26
C7AC 4E7E
C7AD 9ED4
C7AE 94B1
C7AF 94B3
C7B0 524D
C7B1 6F5C
C7B2 9063
C7B3 6D45
C7B4 8C34
C7B5 5811
C7B6 5D4C
C7B7 6B20
C7B8 6B49
C7B9 67AA
C7BA 545B
C7BB 8154
C7BC 7F8C
C7BD 5899
C7BE 8537
C7BF 5F3A
C7C0 62A2
C7C1 6A47
C7C2 9539
C7C3 6572
C7C4 6084
C7C5 6865
C7C6 77A7
C7C7 4E54
C7C8 4FA8
C7C9 5DE7
C7CA 9798
C7CB 64AC
C7CC 7FD8
C7CD 5CED
C7CE 4FCF
C7CF 7A8D
C7D0 5207
C7D1 8304
C7D2 4E14
C7D3 602F
C7D4 7A83
C7D5 94A6
C7D6 4FB5
C7D7 4EB2
C7D8 79E6
C7D9 7434
C7DA 52E4
C7DB 82B9
C7DC 64D2
C7DD 79BD
C7DE 5BDD
C7DF 6C81
C7E0 9752
C7E1 8F7B
C7E2 6C22
C7E3 503E
C7E4 537F
C7E5 6E05
C7E6 64CE
C7E7 6674
C7E8 6C30
C7E9 60C5
C7EA 9877
C7EB 8BF7
C7EC 5E86
C7ED 743C
C7EE 7A77
C7EF 79CB
C7F0 4E18
C7F1 90B1
C7F2 7403
C7F3 6C42
C7F4 56DA
C7F5 914B
C7F6 6CC5
C7F7 8D8B
C7F8 533A
C7F9 86C6
C7FA 66F2
C7FB 8EAF
C7FC 5C48
C7FD 9A71
C7FE 6E20
C840 83EE
C841 83EF
C842 83F3
C843 83F4
C844 83F5
C845 83F6
C846 83F7
C847 83FA
C848 83FB
C849 83FC
C84A 83FE
C84B 83FF
C84C 8400
C84D 8402
C84E 8405
C84F 8407
C850 8408
C851 8409
C852 840A
C853 8410
C854 8412
C855 8413
C856 8414
C857 8415
C858 8416
C859 8417
C85A 8419
C85B 841A
C85C 841B
C85D 841E
C85E 841F
C85F 8420
C860 8421
C861 8422
C862 8423
C863 8429
C864 842A
C865 842B
C866 842C
C867 842D
C868 842E
C869 842F
C86A 8430
C86B 8432
C86C 8433
C86D 8434
C86E 8435
C86F 8436
C870 8437
C871 8439
C872 843A
C873 843B
C874 843E
C875 843F
C876 8440
C877 8441
C878 8442
C879 8443
C87A 8444
C87B 8445
C87C 8447
C87D 8448
C87E 8449
C880 844A
C881 844B
C882 844C
C883 844D
C884 844E
C885 844F
C886 8450
C887 8452
C888 8453
C889 8454
C88A 8455
C88B 8456
C88C 8458
C88D 845D
C88E 845E
C88F 845F
C890 8460
C891 8462
C892 8464
C893 8465
C894 8466
C895 8467
C896 8468
C897 846A
C898 846E
C899 846F
C89A 8470
C89B 8472
C89C 8474
C89D 8477
C89E 8479
C89F 847B
C8A0 847C
C8A1 53D6
C8A2 5A36
C8A3 9F8B
C8A4 8DA3
C8A5 53BB
C8A6 5708
C8A7 98A7
C8A8 6743
C8A9 919B
C8AA 6CC9
C8AB 5168
C8AC 75CA
C8AD 62F3
C8AE 72AC
C8AF 5238
C8B0 529D
C8B1 7F3A
C8B2 7094
C8B3 7638
C8B4 5374
C8B5 9E4A
C8B6 69B7
C8B7 786E
C8B8 96C0
C8B9 88D9
C8BA 7FA4
C8BB 7136
C8BC 71C3
C8BD 5189
C8BE 67D3
C8BF 74E4
C8C0 58E4
C8C1 6518
C8C2 56B7
C8C3 8BA9
C8C4 9976
C8C5 6270
C8C6 7ED5
C8C7 60F9
C8C8 70ED
C8C9 58EC
C8CA 4EC1
C8CB 4EBA
C8CC 5FCD
C8CD 97E7
C8CE 4EFB
C8CF 8BA4
C8D0 5203
C8D1 598A
C8D2 7EAB
C8D3 6254
C8D4 4ECD
C8D5 65E5
C8D6 620E
C8D7 8338
C8D8 84C9
C8D9 8363
C8DA 878D
C8DB 7194
C8DC 6EB6
C8DD 5BB9
C8DE 7ED2
C8DF 5197
C8E0 63C9
C8E1 67D4
C8E2 8089
C8E3 8339
C8E4 8815
C8E5 5112
C8E6 5B7A
C8E7 5982
C8E8 8FB1
C8E9 4E73
C8EA 6C5D
C8EB 5165
C8EC 8925
C8ED 8F6F
C8EE 962E
C8EF 854A
C8F0 745E
C8F1 9510
C8F2 95F0
C8F3 6DA6
C8F4 82E5
C8F5 5F31
C8F6 6492
C8F7 6D12
C8F8 8428
C8F9 816E
C8FA 9CC3
C8FB 585E
C8FC 8D5B
C8FD 4E09
C8FE 53C1
C940 847D
C941 847E
C942 847F
C943 8480
C944 8481
C945 8483
C946 8484
C947 8485
C948 8486
C949 848A
C94A 848D
C94B 848F
C94C 8490
C94D 8491
C94E 8492
C94F 8493
C950 8494
C951 8495
C952 8496
C953 8498
C954 849A
C955 849B
C956 849D
C957 849E
C958 849F
C959 84A0
C95A 84A2
C95B 84A3
C95C 84A4
C95D 84A5
C95E 84A6
C95F 84A7
C960 84A8
C961 84A9
C962 84AA
C963 84AB
C964 84AC
C965 84AD
C966 84AE
C967 84B0
C968 84B1
C969 84B3
C96A 84B5
C96B 84B6
C96C 84B7
C96D 84BB
C96E 84BC
C96F 84BE
C970 84C0
C971 84C2
C972 84C3
C973 84C5
C974 84C6
C975 84C7
C976 84C8
C977 84CB
C978 84CC
C979 84CE
C97A 84CF
C97B 84D2
C97C 84D4
C97D 84D5
C97E 84D7
C980 84D8
C981 84D9
C982 84DA
C983 84DB
C984 84DC
C985 84DE
C986 84E1
C987 84E2
C988 84E4
C989 84E7
C98A 84E8
C98B 84E9
C98C 84EA
C98D 84EB
C98E 84ED
C98F 84EE
C990 84EF
C991 84F1
C992 84F2
C993 84F3
C994 84F4
C995 84F5
C996 84F6
C997 84F7
C998 84F8
C999 84F9
C99A 84FA
C99B 84FB
C99C 84FD
C99D 84FE
C99E 8500
C99F 8501
C9A0 8502
C9A1 4F1E
C9A2 6563
C9A3 6851
C9A4 55D3
C9A5 4E27
C9A6 6414
C9A7 9A9A
C9A8 626B
C9A9 5AC2
C9AA 745F
C9AB 8272
C9AC 6DA9
C9AD 68EE
C9AE 50E7
C9AF 838E
C9B0 7802
C9B1 6740
C9B2 5239
C9B3 6C99
C9B4 7EB1
C9B5 50BB
C9B6 5565
C9B7 715E
C9B8 7B5B
C9B9 6652
C9BA 73CA
C9BB 82EB
C9BC 6749
C9BD 5C71
C9BE 5220
C9BF 717D
C9C0 886B
C9C1 95EA
C9C2 9655
C9C3 64C5
C9C4 8D61
C9C5 81B3
C9C6 5584
C9C7 6C55
C9C8 6247
C9C9 7F2E
C9CA 5892
C9CB 4F24
C9CC 5546
C9CD 8D4F
C9CE 664C
C9CF 4E0A
C9D0 5C1A
C9D1 88F3
C9D2 68A2
C9D3 634E
C9D4 7A0D
C9D5 70E7
C9D6 828D
C9D7 52FA
C9D8 97F6
C9D9 5C11
C9DA 54E8
C9DB 90B5
C9DC 7ECD
C9DD 5962
C9DE 8D4A
C9DF 86C7
C9E0 820C
C9E1 820D
C9E2 8D66
C9E3 6444
C9E4 5C04
C9E5 6151
C9E6 6D89
C9E7 793E
C9E8 8BBE
C9E9 7837
C9EA 7533
C9EB 547B
C9EC 4F38
C9ED 8EAB
C9EE 6DF1
C9EF 5A20
C9F0 7EC5
C9F1 795E
C9F2 6C88
C9F3 5BA1
C9F4 5A76
C9F5 751A
C9F6 80BE
C9F7 614E
C9F8 6E17
C9F9 58F0
C9FA 751F
C9FB 7525
C9FC 7272
C9FD 5347
C9FE 7EF3
CA40 8503
CA41 8504
CA42 8505
CA43 8506
CA44 8507
CA45 8508
CA46 8509
CA47 850A
CA48 850B
CA49 850D
CA4A 850E
CA4B 850F
CA4C 8510
CA4D 8512
CA4E 8514
CA4F 8515
CA50 8516
CA51 8518
CA52 8519
CA53 851B
CA54 851C
CA55 851D
CA56 851E
CA57 8520
CA58 8522
CA59 8523
CA5A 8524
CA5B 8525
CA5C 8526
CA5D 8527
CA5E 8528
CA5F 8529
CA60 852A
CA61 852D
CA62 852E
CA63 852F
CA64 8530
CA65 8531
CA66 8532
CA67 8533
CA68 8534
CA69 8535
CA6A 8536
CA6B 853E
CA6C 853F
CA6D 8540
CA6E 8541
CA6F 8542
CA70 8544
CA71 8545
CA72 8546
CA73 8547
CA74 854B
CA75 854C
CA76 854D
CA77 854E
CA78 854F
CA79 8550
CA7A 8551
CA7B 8552
CA7C 8553
CA7D 8554
CA7E 8555
CA80 8557
CA81 8558
CA82 855A
CA83 855B
CA84 855C
CA85 855D
CA86 855F
CA87 8560
CA88 8561
CA89 8562
CA8A 8563
CA8B 8565
CA8C 8566
CA8D 8567
CA8E 8569
CA8F 856A
CA90 856B
CA91 856C
CA92 856D
CA93 856E
CA94 856F
CA95 8570
CA96 8571
CA97 8573
CA98 8575
CA99 8576
CA9A 8577
CA9B 8578
CA9C 857C
CA9D 857D
CA9E 857F
CA9F 8580
CAA0 8581
CAA1 7701
CAA2 76DB
CAA3 5269
CAA4 80DC
CAA5 5723
CAA6 5E08
CAA7 5931
CAA8 72EE
CAA9 65BD
CAAA 6E7F
CAAB 8BD7
CAAC 5C38
CAAD 8671
CAAE 5341
CAAF 77F3
CAB0 62FE
CAB1 65F6
CAB2 4EC0
CAB3 98DF
CAB4 8680
CAB5 5B9E
CAB6 8BC6
CAB7 53F2
CAB8 77E2
CAB9 4F7F
CABA 5C4E
CABB 9A76
CABC 59CB
CABD 5F0F
CABE 793A
CABF 58EB
CAC0 4E16
CAC1 67FF
CAC2 4E8B
CAC3 62ED
CAC4 8A93
CAC5 901D
CAC6 52BF
CAC7 662F
CAC8 55DC
CAC9 566C
CACA 9002
CACB 4ED5
CACC 4F8D
CACD 91CA
CACE 9970
CACF 6C0F
CAD0 5E02
CAD1 6043
CAD2 5BA4
CAD3 89C6
CAD4 8BD5
CAD5 6536
CAD6 624B
CAD7 9996
CAD8 5B88
CAD9 5BFF
CADA 6388
CADB 552E
CADC 53D7
CADD 7626
CADE 517D
CADF 852C
CAE0 67A2
CAE1 68B3
CAE2 6B8A
CAE3 6292
CAE4 8F93
CAE5 53D4
CAE6 8212
CAE7 6DD1
CAE8 758F
CAE9 4E66
CAEA 8D4E
CAEB 5B70
CAEC 719F
CAED 85AF
CAEE 6691
CAEF 66D9
CAF0 7F72
CAF1 8700
CAF2 9ECD
CAF3 9F20
CAF4 5C5E
CAF5 672F
CAF6 8FF0
CAF7 6811
CAF8 675F
CAF9 620D
CAFA 7AD6
CAFB 5885
CAFC 5EB6
CAFD 6570
CAFE 6F31
CB40 8582
CB41 8583
CB42 8586
CB43 8588
CB44 8589
CB45 858A
CB46 858B
CB47 858C
CB48 858D
CB49 858E
CB4A 8590
CB4B 8591
CB4C 8592
CB4D 8593
CB4E 8594
CB4F 8595
CB50 8596
CB51 8597
CB52 8598
CB53 8599
CB54 859A
CB55 859D
CB56 859E
CB57 859F
CB58 85A0
CB59 85A1
CB5A 85A2
CB5B 85A3
CB5C 85A5
CB5D 85A6
CB5E 85A7
CB5F 85A9
CB60 85AB
CB61 85AC
CB62 85AD
CB63 85B1
CB64 85B2
CB65 85B3
CB66 85B4
CB67 85B5
CB68 85B6
CB69 85B8
CB6A 85BA
CB6B 85BB
CB6C 85BC
CB6D 85BD
CB6E 85BE
CB6F 85BF
CB70 85C0
CB71 85C2
CB72 85C3
CB73 85C4
CB74 85C5
CB75 85C6
CB76 85C7
CB77 85C8
CB78 85CA
CB79 85CB
CB7A 85CC
CB7B 85CD
CB7C 85CE
CB7D 85D1
CB7E 85D2
CB80 85D4
CB81 85D6
CB82 85D7
CB83 85D8
CB84 85D9
CB85 85DA
CB86 85DB
CB87 85DD
CB88 85DE
CB89 85DF
CB8A 85E0
CB8B 85E1
CB8C 85E2
CB8D 85E3
CB8E 85E5
CB8F 85E6
CB90 85E7
CB91 85E8
CB92 85EA
CB93 85EB
CB94 85EC
CB95 85ED
CB96 85EE
CB97 85EF
CB98 85F0
CB99 85F1
CB9A 85F2
CB9B 85F3
CB9C 85F4
CB9D 85F5
CB9E 85F6
CB9F 85F7
CBA0 85F8
CBA1 6055
CBA2 5237
CBA3 800D
CBA4 6454
CBA5 8870
CBA6 7529
CBA7 5E05
CBA8 6813
CBA9 62F4
CBAA 971C
CBAB 53CC
CBAC 723D
CBAD 8C01
CBAE 6C34
CBAF 7761
CBB0 7A0E
CBB1 542E
CBB2 77AC
CBB3 987A
CBB4 821C
CBB5 8BF4
CBB6 7855
CBB7 6714
CBB8 70C1
CBB9 65AF
CBBA 6495
CBBB 5636
CBBC 601D
CBBD 79C1
CBBE 53F8
CBBF 4E1D
CBC0 6B7B
CBC1 8086
CBC2 5BFA
CBC3 55E3
CBC4 56DB
CBC5 4F3A
CBC6 4F3C
CBC7 9972
CBC8 5DF3
CBC9 677E
CBCA 8038
CBCB 6002
CBCC 9882
CBCD 9001
CBCE 5B8B
CBCF 8BBC
CBD0 8BF5
CBD1 641C
CBD2 8258
CBD3 64DE
CBD4 55FD
CBD5 82CF
CBD6 9165
CBD7 4FD7
CBD8 7D20
CBD9 901F
CBDA 7C9F
CBDB 50F3
CBDC 5851
CBDD 6EAF
CBDE 5BBF
CBDF 8BC9
CBE0 8083
CBE1 9178
CBE2 849C
CBE3 7B97
CBE4 867D
CBE5 968B
CBE6 968F
CBE7 7EE5
CBE8 9AD3
CBE9 788E
CBEA 5C81
CBEB 7A57
CBEC 9042
CBED 96A7
CBEE 795F
CBEF 5B59
CBF0 635F
CBF1 7B0B
CBF2 84D1
CBF3 68AD
CBF4 5506
CBF5 7F29
CBF6 7410
CBF7 7D22
CBF8 9501
CBF9 6240
CBFA 584C
CBFB 4ED6
CBFC 5B83
CBFD 5979
CBFE 5854
CC40 85F9
CC41 85FA
CC42 85FC
CC43 85FD
CC44 85FE
CC45 8600
CC46 8601
CC47 8602
CC48 8603
CC49 8604
CC4A 8606
CC4B 8607
CC4C 8608
CC4D 8609
CC4E 860A
CC4F 860B
CC50 860C
CC51 860D
CC52 860E
CC53 860F
CC54 8610
CC55 8612
CC56 8613
CC57 8614
CC58 8615
CC59 8617
CC5A 8618
CC5B 8619
CC5C 861A
CC5D 861B
CC5E 861C
CC5F 861D
CC60 861E
CC61 861F
CC62 8620
CC63 8621
CC64 8622
CC65 8623
CC66 8624
CC67 8625
CC68 8626
CC69 8628
CC6A 862A
CC6B 862B
CC6C 862C
CC6D 862D
CC6E 862E
CC6F 862F
CC70 8630
CC71 8631
CC72 8632
CC73 8633
CC74 8634
CC75 8635
CC76 8636
CC77 8637
CC78 8639
CC79 863A
CC7A 863B
CC7B 863D
CC7C 863E
CC7D 863F
CC7E 8640
CC80 8641
CC81 8642
CC82 8643
CC83 8644
CC84 8645
CC85 8646
CC86 8647
CC87 8648
CC88 8649
CC89 864A
CC8A 864B
CC8B 864C
CC8C 8652
CC8D 8653
CC8E 8655
CC8F 8656
CC90 8657
CC91 8658
CC92 8659
CC93 865B
CC94 865C
CC95 865D
CC96 865F
CC97 8660
CC98 8661
CC99 8663
CC9A 8664
CC9B 8665
CC9C 8666
CC9D 8667
CC9E 8668
CC9F 8669
CCA0 866A
CCA1 736D
CCA2 631E
CCA3 8E4B
CCA4 8E0F
CCA5 80CE
CCA6 82D4
CCA7 62AC
CCA8 53F0
CCA9 6CF0
CCAA 915E
CCAB 592A
CCAC 6001
CCAD 6C70
CCAE 574D
CCAF 644A
CCB0 8D2A
CCB1 762B
CCB2 6EE9
CCB3 575B
CCB4 6A80
CCB5 75F0
CCB6 6F6D
CCB7 8C2D
CCB8 8C08
CCB9 5766
CCBA 6BEF
CCBB 8892
CCBC 78B3
CCBD 63A2
CCBE 53F9
CCBF 70AD
CCC0 6C64
CCC1 5858
CCC2 642A
CCC3 5802
CCC4 68E0
CCC5 819B
CCC6 5510
CCC7 7CD6
CCC8 5018
CCC9 8EBA
CCCA 6DCC
CCCB 8D9F
CCCC 70EB
CCCD 638F
CCCE 6D9B
CCCF 6ED4
CCD0 7EE6
CCD1 8404
CCD2 6843
CCD3 9003
CCD4 6DD8
CCD5 9676
CCD6 8BA8
CCD7 5957
CCD8 7279
CCD9 85E4
CCDA 817E
CCDB 75BC
CCDC 8A8A
CCDD 68AF
CCDE 5254
CCDF 8E22
CCE0 9511
CCE1 63D0
CCE2 9898
CCE3 8E44
CCE4 557C
CCE5 4F53
CCE6 66FF
CCE7 568F
CCE8 60D5
CCE9 6D95
CCEA 5243
CCEB 5C49
CCEC 5929
CCED 6DFB
CCEE 586B
CCEF 7530
CCF0 751C
CCF1 606C
CCF2 8214
CCF3 8146
CCF4 6311
CCF5 6761
CCF6 8FE2
CCF7 773A
CCF8 8DF3
CCF9 8D34
CCFA 94C1
CCFB 5E16
CCFC 5385
CCFD 542C
CCFE 70C3
CD40 866D
CD41 866F
CD42 8670
CD43 8672
CD44 8673
CD45 8674
CD46 8675
CD47 8676
CD48 8677
CD49 8678
CD4A 8683
CD4B 8684
CD4C 8685
CD4D 8686
CD4E 8687
CD4F 8688
CD50 8689
CD51 868E
CD52 868F
CD53 8690
CD54 8691
CD55 8692
CD56 8694
CD57 8696
CD58 8697
CD59 8698
CD5A 8699
CD5B 869A
CD5C 869B
CD5D 869E
CD5E 869F
CD5F 86A0
CD60 86A1
CD61 86A2
CD62 86A5
CD63 86A6
CD64 86AB
CD65 86AD
CD66 86AE
CD67 86B2
CD68 86B3
CD69 86B7
CD6A 86B8
CD6B 86B9
CD6C 86BB
CD6D 86BC
CD6E 86BD
CD6F 86BE
CD70 86BF
CD71 86C1
CD72 86C2
CD73 86C3
CD74 86C5
CD75 86C8
CD76 86CC
CD77 86CD
CD78 86D2
CD79 86D3
CD7A 86D5
CD7B 86D6
CD7C 86D7
CD7D 86DA
CD7E 86DC
CD80 86DD
CD81 86E0
CD82 86E1
CD83 86E2
CD84 86E3
CD85 86E5
CD86 86E6
CD87 86E7
CD88 86E8
CD89 86EA
CD8A 86EB
CD8B 86EC
CD8C 86EF
CD8D 86F5
CD8E 86F6
CD8F 86F7
CD90 86FA
CD91 86FB
CD92 86FC
CD93 86FD
CD94 86FF
CD95 8701
CD96 8704
CD97 8705
CD98 8706
CD99 870B
CD9A 870C
CD9B 870E
CD9C 870F
CD9D 8710
CD9E 8711
CD9F 8714
CDA0 8716
CDA1 6C40
CDA2 5EF7
CDA3 505C
CDA4 4EAD
CDA5 5EAD
CDA6 633A
CDA7 8247
CDA8 901A
CDA9 6850
CDAA 916E
CDAB 77B3
CDAC 540C
CDAD 94DC
CDAE 5F64
CDAF 7AE5
CDB0 6876
CDB1 6345
CDB2 7B52
CDB3 7EDF
CDB4 75DB
CDB5 5077
CDB6 6295
CDB7 5934
CDB8 900F
CDB9 51F8
CDBA 79C3
CDBB 7A81
CDBC 56FE
CDBD 5F92
CDBE 9014
CDBF 6D82
CDC0 5C60
CDC1 571F
CDC2 5410
CDC3 5154
CDC4 6E4D
CDC5 56E2
CDC6 63A8
CDC7 9893
CDC8 817F
CDC9 8715
CDCA 892A
CDCB 9000
CDCC 541E
CDCD 5C6F
CDCE 81C0
CDCF 62D6
CDD0 6258
CDD1 8131
CDD2 9E35
CDD3 9640
CDD4 9A6E
CDD5 9A7C
CDD6 692D
CDD7 59A5
CDD8 62D3
CDD9 553E
CDDA 6316
CDDB 54C7
CDDC 86D9
CDDD 6D3C
CDDE 5A03
CDDF 74E6
CDE0 889C
CDE1 6B6A
CDE2 5916
CDE3 8C4C
CDE4 5F2F
CDE5 6E7E
CDE6 73A9
CDE7 987D
CDE8 4E38
CDE9 70F7
CDEA 5B8C
CDEB 7897
CDEC 633D
CDED 665A
CDEE 7696
CDEF 60CB
CDF0 5B9B
CDF1 5A49
CDF2 4E07
CDF3 8155
CDF4 6C6A
CDF5 738B
CDF6 4EA1
CDF7 6789
CDF8 7F51
CDF9 5F80
CDFA 65FA
CDFB 671B
CDFC 5FD8
CDFD 5984
CDFE 5A01
CE40 8719
CE41 871B
CE42 871D
CE43 871F
CE44 8720
CE45 8724
CE46 8726
CE47 8727
CE48 8728
CE49 872A
CE4A 872B
CE4B 872C
CE4C 872D
CE4D 872F
CE4E 8730
CE4F 8732
CE50 8733
CE51 8735
CE52 8736
CE53 8738
CE54 8739
CE55 873A
CE56 873C
CE57 873D
CE58 8740
CE59 8741
CE5A 8742
CE5B 8743
CE5C 8744
CE5D 8745
CE5E 8746
CE5F 874A
CE60 874B
CE61 874D
CE62 874F
CE63 8750
CE64 8751
CE65 8752
CE66 8754
CE67 8755
CE68 8756
CE69 8758
CE6A 875A
CE6B 875B
CE6C 875C
CE6D 875D
CE6E 875E
CE6F 875F
CE70 8761
CE71 8762
CE72 8766
CE73 8767
CE74 8768
CE75 8769
CE76 876A
CE77 876B
CE78 876C
CE79 876D
CE7A 876F
CE7B 8771
CE7C 8772
CE7D 8773
CE7E 8775
CE80 8777
CE81 8778
CE82 8779
CE83 877A
CE84 877F
CE85 8780
CE86 8781
CE87 8784
CE88 8786
CE89 8787
CE8A 8789
CE8B 878A
CE8C 878C
CE8D 878E
CE8E 878F
CE8F 8790
CE90 8791
CE91 8792
CE92 8794
CE93 8795
CE94 8796
CE95 8798
CE96 8799
CE97 879A
CE98 879B
CE99 879C
CE9A 879D
CE9B 879E
CE9C 87A0
CE9D 87A1
CE9E 87A2
CE9F 87A3
CEA0 87A4
CEA1 5DCD
CEA2 5FAE
CEA3 5371
CEA4 97E6
CEA5 8FDD
CEA6 6845
CEA7 56F4
CEA8 552F
CEA9 60DF
CEAA 4E3A
CEAB 6F4D
CEAC 7EF4
CEAD 82C7
CEAE 840E
CEAF 59D4
CEB0 4F1F
CEB1 4F2A
CEB2 5C3E
CEB3 7EAC
CEB4 672A
CEB5 851A
CEB6 5473
CEB7 754F
CEB8 80C3
CEB9 5582
CEBA 9B4F
CEBB 4F4D
CEBC 6E2D
CEBD 8C13
CEBE 5C09
CEBF 6170
CEC0 536B
CEC1 761F
CEC2 6E29
CEC3 868A
CEC4 6587
CEC5 95FB
CEC6 7EB9
CEC7 543B
CEC8 7A33
CEC9 7D0A
CECA 95EE
CECB 55E1
CECC 7FC1
CECD 74EE
CECE 631D
CECF 8717
CED0 6DA1
CED1 7A9D
CED2 6211
CED3 65A1
CED4 5367
CED5 63E1
CED6 6C83
CED7 5DEB
CED8 545C
CED9 94A8
CEDA 4E4C
CEDB 6C61
CEDC 8BEC
CEDD 5C4B
CEDE 65E0
CEDF 829C
CEE0 68A7
CEE1 543E
CEE2 5434
CEE3 6BCB
CEE4 6B66
CEE5 4E94
CEE6 6342
CEE7 5348
CEE8 821E
CEE9 4F0D
CEEA 4FAE
CEEB 575E
CEEC 620A
CEED 96FE
CEEE 6664
CEEF 7269
CEF0 52FF
CEF1 52A1
CEF2 609F
CEF3 8BEF
CEF4 6614
CEF5 7199
CEF6 6790
CEF7 897F
CEF8 7852
CEF9 77FD
CEFA 6670
CEFB 563B
CEFC 5438
CEFD 9521
CEFE 727A
CF40 87A5
CF41 87A6
CF42 87A7
CF43 87A9
CF44 87AA
CF45 87AE
CF46 87B0
CF47 87B1
CF48 87B2
CF49 87B4
CF4A 87B6
CF4B 87B7
CF4C 87B8
CF4D 87B9
CF4E 87BB
CF4F 87BC
CF50 87BE
CF51 87BF
CF52 87C1
CF53 87C2
CF54 87C3
CF55 87C4
CF56 87C5
CF57 87C7
CF58 87C8
CF59 87C9
CF5A 87CC
CF5B 87CD
CF5C 87CE
CF5D 87CF
CF5E 87D0
CF5F 87D4
CF60 87D5
CF61 87D6
CF62 87D7
CF63 87D8
CF64 87D9
CF65 87DA
CF66 87DC
CF67 87DD
CF68 87DE
CF69 87DF
CF6A 87E1
CF6B 87E2
CF6C 87E3
CF6D 87E4
CF6E 87E6
CF6F 87E7
CF70 87E8
CF71 87E9
CF72 87EB
CF73 87EC
CF74 87ED
CF75 87EF
CF76 87F0
CF77 87F1
CF78 87F2
CF79 87F3
CF7A 87F4
CF7B 87F5
CF7C 87F6
CF7D 87F7
CF7E 87F8
CF80 87FA
CF81 87FB
CF82 87FC
CF83 87FD
CF84 87FF
CF85 8800
CF86 8801
CF87 8802
CF88 8804
CF89 8805
CF8A 8806
CF8B 8807
CF8C 8808
CF8D 8809
CF8E 880B
CF8F 880C
CF90 880D
CF91 880E
CF92 880F
CF93 8810
CF94 8811
CF95 8812
CF96 8814
CF97 8817
CF98 8818
CF99 8819
CF9A 881A
CF9B 881C
CF9C 881D
CF9D 881E
CF9E 881F
CF9F 8820
CFA0 8823
CFA1 7A00
CFA2 606F
CFA3 5E0C
CFA4 6089
CFA5 819D
CFA6 5915
CFA7 60DC
CFA8 7184
CFA9 70EF
CFAA 6EAA
CFAB 6C50
CFAC 7280
CFAD 6A84
CFAE 88AD
CFAF 5E2D
CFB0 4E60
CFB1 5AB3
CFB2 559C
CFB3 94E3
CFB4 6D17
CFB5 7CFB
CFB6 9699
CFB7 620F
CFB8 7EC6
CFB9 778E
CFBA 867E
CFBB 5323
CFBC 971E
CFBD 8F96
CFBE 6687
CFBF 5CE1
CFC0 4FA0
CFC1 72ED
CFC2 4E0B
CFC3 53A6
CFC4 590F
CFC5 5413
CFC6 6380
CFC7 9528
CFC8 5148
CFC9 4ED9
CFCA 9C9C
CFCB 7EA4
CFCC 54B8
CFCD 8D24
CFCE 8854
CFCF 8237
CFD0 95F2
CFD1 6D8E
CFD2 5F26
CFD3 5ACC
CFD4 663E
CFD5 9669
CFD6 73B0
CFD7 732E
CFD8 53BF
CFD9 817A
CFDA 9985
CFDB 7FA1
CFDC 5BAA
CFDD 9677
CFDE 9650
CFDF 7EBF
CFE0 76F8
CFE1 53A2
CFE2 9576
CFE3 9999
CFE4 7BB1
CFE5 8944
CFE6 6E58
CFE7 4E61
CFE8 7FD4
CFE9 7965
CFEA 8BE6
CFEB 60F3
CFEC 54CD
CFED 4EAB
CFEE 9879
CFEF 5DF7
CFF0 6A61
CFF1 50CF
CFF2 5411
CFF3 8C61
CFF4 8427
CFF5 785D
CFF6 9704
CFF7 524A
CFF8 54EE
CFF9 56A3
CFFA 9500
CFFB 6D88
CFFC 5BB5
CFFD 6DC6
CFFE 6653
D040 8824
D041 8825
D042 8826
D043 8827
D044 8828
D045 8829
D046 882A
D047 882B
D048 882C
D049 882D
D04A 882E
D04B 882F
D04C 8830
D04D 8831
D04E 8833
D04F 8834
D050 8835
D051 8836
D052 8837
D053 8838
D054 883A
D055 883B
D056 883D
D057 883E
D058 883F
D059 8841
D05A 8842
D05B 8843
D05C 8846
D05D 8847
D05E 8848
D05F 8849
D060 884A
D061 884B
D062 884E
D063 884F
D064 8850
D065 8851
D066 8852
D067 8853
D068 8855
D069 8856
D06A 8858
D06B 885A
D06C 885B
D06D 885C
D06E 885D
D06F 885E
D070 885F
D071 8860
D072 8866
D073 8867
D074 886A
D075 886D
D076 886F
D077 8871
D078 8873
D079 8874
D07A 8875
D07B 8876
D07C 8878
D07D 8879
D07E 887A
D080 887B
D081 887C
D082 8880
D083 8883
D084 8886
D085 8887
D086 8889
D087 888A
D088 888C
D089 888E
D08A 888F
D08B 8890
D08C 8891
D08D 8893
D08E 8894
D08F 8895
D090 8897
D091 8898
D092 8899
D093 889A
D094 889B
D095 889D
D096 889E
D097 889F
D098 88A0
D099 88A1
D09A 88A3
D09B 88A5
D09C 88A6
D09D 88A7
D09E 88A8
D09F 88A9
D0A0 88AA
D0A1 5C0F
D0A2 5B5D
D0A3 6821
D0A4 8096
D0A5 5578
D0A6 7B11
D0A7 6548
D0A8 6954
D0A9 4E9B
D0AA 6B47
D0AB 874E
D0AC 978B
D0AD 534F
D0AE 631F
D0AF 643A
D0B0 90AA
D0B1 659C
D0B2 80C1
D0B3 8C10
D0B4 5199
D0B5 68B0
D0B6 5378
D0B7 87F9
D0B8 61C8
D0B9 6CC4
D0BA 6CFB
D0BB 8C22
D0BC 5C51
D0BD 85AA
D0BE 82AF
D0BF 950C
D0C0 6B23
D0C1 8F9B
D0C2 65B0
D0C3 5FFB
D0C4 5FC3
D0C5 4FE1
D0C6 8845
D0C7 661F
D0C8 8165
D0C9 7329
D0CA 60FA
D0CB 5174
D0CC 5211
D0CD 578B
D0CE 5F62
D0CF 90A2
D0D0 884C
D0D1 9192
D0D2 5E78
D0D3 674F
D0D4 6027
D0D5 59D3
D0D6 5144
D0D7 51F6
D0D8 80F8
D0D9 5308
D0DA 6C79
D0DB 96C4
D0DC 718A
D0DD 4F11
D0DE 4FEE
D0DF 7F9E
D0E0 673D
D0E1 55C5
D0E2 9508
D0E3 79C0
D0E4 8896
D0E5 7EE3
D0E6 589F
D0E7 620C
D0E8 9700
D0E9 865A
D0EA 5618
D0EB 987B
D0EC 5F90
D0ED 8BB8
D0EE 84C4
D0EF 9157
D0F0 53D9
D0F1 65ED
D0F2 5E8F
D0F3 755C
D0F4 6064
D0F5 7D6E
D0F6 5A7F
D0F7 7EEA
D0F8 7EED
D0F9 8F69
D0FA 55A7
D0FB 5BA3
D0FC 60AC
D0FD 65CB
D0FE 7384
D140 88AC
D141 88AE
D142 88AF
D143 88B0
D144 88B2
D145 88B3
D146 88B4
D147 88B5
D148 88B6
D149 88B8
D14A 88B9
D14B 88BA
D14C 88BB
D14D 88BD
D14E 88BE
D14F 88BF
D150 88C0
D151 88C3
D152 88C4
D153 88C7
D154 88C8
D155 88CA
D156 88CB
D157 88CC
D158 88CD
D159 88CF
D15A 88D0
D15B 88D1
D15C 88D3
D15D 88D6
D15E 88D7
D15F 88DA
D160 88DB
D161 88DC
D162 88DD
D163 88DE
D164 88E0
D165 88E1
D166 88E6
D167 88E7
D168 88E9
D169 88EA
D16A 88EB
D16B 88EC
D16C 88ED
D16D 88EE
D16E 88EF
D16F 88F2
D170 88F5
D171 88F6
D172 88F7
D173 88FA
D174 88FB
D175 88FD
D176 88FF
D177 8900
D178 8901
D179 8903
D17A 8904
D17B 8905
D17C 8906
D17D 8907
D17E 8908
D180 8909
D181 890B
D182 890C
D183 890D
D184 890E
D185 890F
D186 8911
D187 8914
D188 8915
D189 8916
D18A 8917
D18B 8918
D18C 891C
D18D 891D
D18E 891E
D18F 891F
D190 8920
D191 8922
D192 8923
D193 8924
D194 8926
D195 8927
D196 8928
D197 8929
D198 892C
D199 892D
D19A 892E
D19B 892F
D19C 8931
D19D 8932
D19E 8933
D19F 8935
D1A0 8937
D1A1 9009
D1A2 7663
D1A3 7729
D1A4 7EDA
D1A5 9774
D1A6 859B
D1A7 5B66
D1A8 7A74
D1A9 96EA
D1AA 8840
D1AB 52CB
D1AC 718F
D1AD 5FAA
D1AE 65EC
D1AF 8BE2
D1B0 5BFB
D1B1 9A6F
D1B2 5DE1
D1B3 6B89
D1B4 6C5B
D1B5 8BAD
D1B6 8BAF
D1B7 900A
D1B8 8FC5
D1B9 538B
D1BA 62BC
D1BB 9E26
D1BC 9E2D
D1BD 5440
D1BE 4E2B
D1BF 82BD
D1C0 7259
D1C1 869C
D1C2 5D16
D1C3 8859
D1C4 6DAF
D1C5 96C5
D1C6 54D1
D1C7 4E9A
D1C8 8BB6
D1C9 7109
D1CA 54BD
D1CB 9609
D1CC 70DF
D1CD 6DF9
D1CE 76D0
D1CF 4E25
D1D0 7814
D1D1 8712
D1D2 5CA9
D1D3 5EF6
D1D4 8A00
D1D5 989C
D1D6 960E
D1D7 708E
D1D8 6CBF
D1D9 5944
D1DA 63A9
D1DB 773C
D1DC 884D
D1DD 6F14
D1DE 8273
D1DF 5830
D1E0 71D5
D1E1 538C
D1E2 781A
D1E3 96C1
D1E4 5501
D1E5 5F66
D1E6 7130
D1E7 5BB4
D1E8 8C1A
D1E9 9A8C
D1EA 6B83
D1EB 592E
D1EC 9E2F
D1ED 79E7
D1EE 6768
D1EF 626C
D1F0 4F6F
D1F1 75A1
D1F2 7F8A
D1F3 6D0B
D1F4 9633
D1F5 6C27
D1F6 4EF0
D1F7 75D2
D1F8 517B
D1F9 6837
D1FA 6F3E
D1FB 9080
D1FC 8170
D1FD 5996
D1FE 7476
D240 8938
D241 8939
D242 893A
D243 893B
D244 893C
D245 893D
D246 893E
D247 893F
D248 8940
D249 8942
D24A 8943
D24B 8945
D24C 8946
D24D 8947
D24E 8948
D24F 8949
D250 894A
D251 894B
D252 894C
D253 894D
D254 894E
D255 894F
D256 8950
D257 8951
D258 8952
D259 8953
D25A 8954
D25B 8955
D25C 8956
D25D 8957
D25E 8958
D25F 8959
D260 895A
D261 895B
D262 895C
D263 895D
D264 8960
D265 8961
D266 8962
D267 8963
D268 8964
D269 8965
D26A 8967
D26B 8968
D26C 8969
D26D 896A
D26E 896B
D26F 896C
D270 896D
D271 896E
D272 896F
D273 8970
D274 8971
D275 8972
D276 8973
D277 8974
D278 8975
D279 8976
D27A 8977
D27B 8978
D27C 8979
D27D 897A
D27E 897C
D280 897D
D281 897E
D282 8980
D283 8982
D284 8984
D285 8985
D286 8987
D287 8988
D288 8989
D289 898A
D28A 898B
D28B 898C
D28C 898D
D28D 898E
D28E 898F
D28F 8990
D290 8991
D291 8992
D292 8993
D293 8994
D294 8995
D295 8996
D296 8997
D297 8998
D298 8999
D299 899A
D29A 899B
D29B 899C
D29C 899D
D29D 899E
D29E 899F
D29F 89A0
D2A0 89A1
D2A1 6447
D2A2 5C27
D2A3 9065
D2A4 7A91
D2A5 8C23
D2A6 59DA
D2A7 54AC
D2A8 8200
D2A9 836F
D2AA 8981
D2AB 8000
D2AC 6930
D2AD 564E
D2AE 8036
D2AF 7237
D2B0 91CE
D2B1 51B6
D2B2 4E5F
D2B3 9875
D2B4 6396
D2B5 4E1A
D2B6 53F6
D2B7 66F3
D2B8 814B
D2B9 591C
D2BA 6DB2
D2BB 4E00
D2BC 58F9
D2BD 533B
D2BE 63D6
D2BF 94F1
D2C0 4F9D
D2C1 4F0A
D2C2 8863
D2C3 9890
D2C4 5937
D2C5 9057
D2C6 79FB
D2C7 4EEA
D2C8 80F0
D2C9 7591
D2CA 6C82
D2CB 5B9C
D2CC 59E8
D2CD 5F5D
D2CE 6905
D2CF 8681
D2D0 501A
D2D1 5DF2
D2D2 4E59
D2D3 77E3
D2D4 4EE5
D2D5 827A
D2D6 6291
D2D7 6613
D2D8 9091
D2D9 5C79
D2DA 4EBF
D2DB 5F79
D2DC 81C6
D2DD 9038
D2DE 8084
D2DF 75AB
D2E0 4EA6
D2E1 88D4
D2E2 610F
D2E3 6BC5
D2E4 5FC6
D2E5 4E49
D2E6 76CA
D2E7 6EA2
D2E8 8BE3
D2E9 8BAE
D2EA 8C0A
D2EB 8BD1
D2EC 5F02
D2ED 7FFC
D2EE 7FCC
D2EF 7ECE
D2F0 8335
D2F1 836B
D2F2 56E0
D2F3 6BB7
D2F4 97F3
D2F5 9634
D2F6 59FB
D2F7 541F
D2F8 94F6
D2F9 6DEB
D2FA 5BC5
D2FB 996E
D2FC 5C39
D2FD 5F15
D2FE 9690
D340 89A2
D341 89A3
D342 89A4
D343 89A5
D344 89A6
D345 89A7
D346 89A8
D347 89A9
D348 89AA
D349 89AB
D34A 89AC
D34B 89AD
D34C 89AE
D34D 89AF
D34E 89B0
D34F 89B1
D350 89B2
D351 89B3
D352 89B4
D353 89B5
D354 89B6
D355 89B7
D356 89B8
D357 89B9
D358 89BA
D359 89BB
D35A 89BC
D35B 89BD
D35C 89BE
D35D 89BF
D35E 89C0
D35F 89C3
D360 89CD
D361 89D3
D362 89D4
D363 89D5
D364 89D7
D365 89D8
D366 89D9
D367 89DB
D368 89DD
D369 89DF
D36A 89E0
D36B 89E1
D36C 89E2
D36D 89E4
D36E 89E7
D36F 89E8
D370 89E9
D371 89EA
D372 89EC
D373 89ED
D374 89EE
D375 89F0
D376 89F1
D377 89F2
D378 89F4
D379 89F5
D37A 89F6
D37B 89F7
D37C 89F8
D37D 89F9
D37E 89FA
D380 89FB
D381 89FC
D382 89FD
D383 89FE
D384 89FF
D385 8A01
D386 8A02
D387 8A03
D388 8A04
D389 8A05
D38A 8A06
D38B 8A08
D38C 8A09
D38D 8A0A
D38E 8A0B
D38F 8A0C
D390 8A0D
D391 8A0E
D392 8A0F
D393 8A10
D394 8A11
D395 8A12
D396 8A13
D397 8A14
D398 8A15
D399 8A16
D39A 8A17
D39B 8A18
D39C 8A19
D39D 8A1A
D39E 8A1B
D39F 8A1C
D3A0 8A1D
D3A1 5370
D3A2 82F1
D3A3 6A31
D3A4 5A74
D3A5 9E70
D3A6 5E94
D3A7 7F28
D3A8 83B9
D3A9 8424
D3AA 8425
D3AB 8367
D3AC 8747
D3AD 8FCE
D3AE 8D62
D3AF 76C8
D3B0 5F71
D3B1 9896
D3B2 786C
D3B3 6620
D3B4 54DF
D3B5 62E5
D3B6 4F63
D3B7 81C3
D3B8 75C8
D3B9 5EB8
D3BA 96CD
D3BB 8E0A
D3BC 86F9
D3BD 548F
D3BE 6CF3
D3BF 6D8C
D3C0 6C38
D3C1 607F
D3C2 52C7
D3C3 7528
D3C4 5E7D
D3C5 4F18
D3C6 60A0
D3C7 5FE7
D3C8 5C24
D3C9 7531
D3CA 90AE
D3CB 94C0
D3CC 72B9
D3CD 6CB9
D3CE 6E38
D3CF 9149
D3D0 6709
D3D1 53CB
D3D2 53F3
D3D3 4F51
D3D4 91C9
D3D5 8BF1
D3D6 53C8
D3D7 5E7C
D3D8 8FC2
D3D9 6DE4
D3DA 4E8E
D3DB 76C2
D3DC 6986
D3DD 865E
D3DE 611A
D3DF 8206
D3E0 4F59
D3E1 4FDE
D3E2 903E
D3E3 9C7C
D3E4 6109
D3E5 6E1D
D3E6 6E14
D3E7 9685
D3E8 4E88
D3E9 5A31
D3EA 96E8
D3EB 4E0E
D3EC 5C7F
D3ED 79B9
D3EE 5B87
D3EF 8BED
D3F0 7FBD
D3F1 7389
D3F2 57DF
D3F3 828B
D3F4 90C1
D3F5 5401
D3F6 9047
D3F7 55BB
D3F8 5CEA
D3F9 5FA1
D3FA 6108
D3FB 6B32
D3FC 72F1
D3FD 80B2
D3FE 8A89
D440 8A1E
D441 8A1F
D442 8A20
D443 8A21
D444 8A22
D445 8A23
D446 8A24
D447 8A25
D448 8A26
D449 8A27
D44A 8A28
D44B 8A29
D44C 8A2A
D44D 8A2B
D44E 8A2C
D44F 8A2D
D450 8A2E
D451 8A2F
D452 8A30
D453 8A31
D454 8A32
D455 8A33
D456 8A34
D457 8A35
D458 8A36
D459 8A37
D45A 8A38
D45B 8A39
D45C 8A3A
D45D 8A3B
D45E 8A3C
D45F 8A3D
D460 8A3F
D461 8A40
D462 8A41
D463 8A42
D464 8A43
D465 8A44
D466 8A45
D467 8A46
D468 8A47
D469 8A49
D46A 8A4A
D46B 8A4B
D46C 8A4C
D46D 8A4D
D46E 8A4E
D46F 8A4F
D470 8A50
D471 8A51
D472 8A52
D473 8A53
D474 8A54
D475 8A55
D476 8A56
D477 8A57
D478 8A58
D479 8A59
D47A 8A5A
D47B 8A5B
D47C 8A5C
D47D 8A5D
D47E 8A5E
D480 8A5F
D481 8A60
D482 8A61
D483 8A62
D484 8A63
D485 8A64
D486 8A65
D487 8A66
D488 8A67
D489 8A68
D48A 8A69
D48B 8A6A
D48C 8A6B
D48D 8A6C
D48E 8A6D
D48F 8A6E
D490 8A6F
D491 8A70
D492 8A71
D493 8A72
D494 8A73
D495 8A74
D496 8A75
D497 8A76
D498 8A77
D499 8A78
D49A 8A7A
D49B 8A7B
D49C 8A7C
D49D 8A7D
D49E 8A7E
D49F 8A7F
D4A0 8A80
D4A1 6D74
D4A2 5BD3
D4A3 88D5
D4A4 9884
D4A5 8C6B
D4A6 9A6D
D4A7 9E33
D4A8 6E0A
D4A9 51A4
D4AA 5143
D4AB 57A3
D4AC 8881
D4AD 539F
D4AE 63F4
D4AF 8F95
D4B0 56ED
D4B1 5458
D4B2 5706
D4B3 733F
D4B4 6E90
D4B5 7F18
D4B6 8FDC
D4B7 82D1
D4B8 613F
D4B9 6028
D4BA 9662
D4BB 66F0
D4BC 7EA6
D4BD 8D8A
D4BE 8DC3
D4BF 94A5
D4C0 5CB3
D4C1 7CA4
D4C2 6708
D4C3 60A6
D4C4 9605
D4C5 8018
D4C6 4E91
D4C7 90E7
D4C8 5300
D4C9 9668
D4CA 5141
D4CB 8FD0
D4CC 8574
D4CD 915D
D4CE 6655
D4CF 97F5
D4D0 5B55
D4D1 531D
D4D2 7838
D4D3 6742
D4D4 683D
D4D5 54C9
D4D6 707E
D4D7 5BB0
D4D8 8F7D
D4D9 518D
D4DA 5728
D4DB 54B1
D4DC 6512
D4DD 6682
D4DE 8D5E
D4DF 8D43
D4E0 810F
D4E1 846C
D4E2 906D
D4E3 7CDF
D4E4 51FF
D4E5 85FB
D4E6 67A3
D4E7 65E9
D4E8 6FA1
D4E9 86A4
D4EA 8E81
D4EB 566A
D4EC 9020
D4ED 7682
D4EE 7076
D4EF 71E5
D4F0 8D23
D4F1 62E9
D4F2 5219
D4F3 6CFD
D4F4 8D3C
D4F5 600E
D4F6 589E
D4F7 618E
D4F8 66FE
D4F9 8D60
D4FA 624E
D4FB 55B3
D4FC 6E23
D4FD 672D
D4FE 8F67
D540 8A81
D541 8A82
D542 8A83
D543 8A84
D544 8A85
D545 8A86
D546 8A87
D547 8A88
D548 8A8B
D549 8A8C
D54A 8A8D
D54B 8A8E
D54C 8A8F
D54D 8A90
D54E 8A91
D54F 8A92
D550 8A94
D551 8A95
D552 8A96
D553 8A97
D554 8A98
D555 8A99
D556 8A9A
D557 8A9B
D558 8A9C
D559 8A9D
D55A 8A9E
D55B 8A9F
D55C 8AA0
D55D 8AA1
D55E 8AA2
D55F 8AA3
D560 8AA4
D561 8AA5
D562 8AA6
D563 8AA7
D564 8AA8
D565 8AA9
D566 8AAA
D567 8AAB
D568 8AAC
D569 8AAD
D56A 8AAE
D56B 8AAF
D56C 8AB0
D56D 8AB1
D56E 8AB2
D56F 8AB3
D570 8AB4
D571 8AB5
D572 8AB6
D573 8AB7
D574 8AB8
D575 8AB9
D576 8ABA
D577 8ABB
D578 8ABC
D579 8ABD
D57A 8ABE
D57B 8ABF
D57C 8AC0
D57D 8AC1
D57E 8AC2
D580 8AC3
D581 8AC4
D582 8AC5
D583 8AC6
D584 8AC7
D585 8AC8
D586 8AC9
D587 8ACA
D588 8ACB
D589 8ACC
D58A 8ACD
D58B 8ACE
D58C 8ACF
D58D 8AD0
D58E 8AD1
D58F 8AD2
D590 8AD3
D591 8AD4
D592 8AD5
D593 8AD6
D594 8AD7
D595 8AD8
D596 8AD9
D597 8ADA
D598 8ADB
D599 8ADC
D59A 8ADD
D59B 8ADE
D59C 8ADF
D59D 8AE0
D59E 8AE1
D59F 8AE2
D5A0 8AE3
D5A1 94E1
D5A2 95F8
D5A3 7728
D5A4 6805
D5A5 69A8
D5A6 548B
D5A7 4E4D
D5A8 70B8
D5A9 8BC8
D5AA 6458
D5AB 658B
D5AC 5B85
D5AD 7A84
D5AE 503A
D5AF 5BE8
D5B0 77BB
D5B1 6BE1
D5B2 8A79
D5B3 7C98
D5B4 6CBE
D5B5 76CF
D5B6 65A9
D5B7 8F97
D5B8 5D2D
D5B9 5C55
D5BA 8638
D5BB 6808
D5BC 5360
D5BD 6218
D5BE 7AD9
D5BF 6E5B
D5C0 7EFD
D5C1 6A1F
D5C2 7AE0
D5C3 5F70
D5C4 6F33
D5C5 5F20
D5C6 638C
D5C7 6DA8
D5C8 6756
D5C9 4E08
D5CA 5E10
D5CB 8D26
D5CC 4ED7
D5CD 80C0
D5CE 7634
D5CF 969C
D5D0 62DB
D5D1 662D
D5D2 627E
D5D3 6CBC
D5D4 8D75
D5D5 7167
D5D6 7F69
D5D7 5146
D5D8 8087
D5D9 53EC
D5DA 906E
D5DB 6298
D5DC 54F2
D5DD 86F0
D5DE 8F99
D5DF 8005
D5E0 9517
D5E1 8517
D5E2 8FD9
D5E3 6D59
D5E4 73CD
D5E5 659F
D5E6 771F
D5E7 7504
D5E8 7827
D5E9 81FB
D5EA 8D1E
D5EB 9488
D5EC 4FA6
D5ED 6795
D5EE 75B9
D5EF 8BCA
D5F0 9707
D5F1 632F
D5F2 9547
D5F3 9635
D5F4 84B8
D5F5 6323
D5F6 7741
D5F7 5F81
D5F8 72F0
D5F9 4E89
D5FA 6014
D5FB 6574
D5FC 62EF
D5FD 6B63
D5FE 653F
D640 8AE4
D641 8AE5
D642 8AE6
D643 8AE7
D644 8AE8
D645 8AE9
D646 8AEA
D647 8AEB
D648 8AEC
D649 8AED
D64A 8AEE
D64B 8AEF
D64C 8AF0
D64D 8AF1
D64E 8AF2
D64F 8AF3
D650 8AF4
D651 8AF5
D652 8AF6
D653 8AF7
D654 8AF8
D655 8AF9
D656 8AFA
D657 8AFB
D658 8AFC
D659 8AFD
D65A 8AFE
D65B 8AFF
D65C 8B00
D65D 8B01
D65E 8B02
D65F 8B03
D660 8B04
D661 8B05
D662 8B06
D663 8B08
D664 8B09
D665 8B0A
D666 8B0B
D667 8B0C
D668 8B0D
D669 8B0E
D66A 8B0F
D66B 8B10
D66C 8B11
D66D 8B12
D66E 8B13
D66F 8B14
D670 8B15
D671 8B16
D672 8B17
D673 8B18
D674 8B19
D675 8B1A
D676 8B1B
D677 8B1C
D678 8B1D
D679 8B1E
D67A 8B1F
D67B 8B20
D67C 8B21
D67D 8B22
D67E 8B23
D680 8B24
D681 8B25
D682 8B27
D683 8B28
D684 8B29
D685 8B2A
D686 8B2B
D687 8B2C
D688 8B2D
D689 8B2E
D68A 8B2F
D68B 8B30
D68C 8B31
D68D 8B32
D68E 8B33
D68F 8B34
D690 8B35
D691 8B36
D692 8B37
D693 8B38
D694 8B39
D695 8B3A
D696 8B3B
D697 8B3C
D698 8B3D
D699 8B3E
D69A 8B3F
D69B 8B40
D69C 8B41
D69D 8B42
D69E 8B43
D69F 8B44
D6A0 8B45
D6A1 5E27
D6A2 75C7
D6A3 90D1
D6A4 8BC1
D6A5 829D
D6A6 679D
D6A7 652F
D6A8 5431
D6A9 8718
D6AA 77E5
D6AB 80A2
D6AC 8102
D6AD 6C41
D6AE 4E4B
D6AF 7EC7
D6B0 804C
D6B1 76F4
D6B2 690D
D6B3 6B96
D6B4 6267
D6B5 503C
D6B6 4F84
D6B7 5740
D6B8 6307
D6B9 6B62
D6BA 8DBE
D6BB 53EA
D6BC 65E8
D6BD 7EB8
D6BE 5FD7
D6BF 631A
D6C0 63B7
D6C1 81F3
D6C2 81F4
D6C3 7F6E
D6C4 5E1C
D6C5 5CD9
D6C6 5236
D6C7 667A
D6C8 79E9
D6C9 7A1A
D6CA 8D28
D6CB 7099
D6CC 75D4
D6CD 6EDE
D6CE 6CBB
D6CF 7A92
D6D0 4E2D
D6D1 76C5
D6D2 5FE0
D6D3 949F
D6D4 8877
D6D5 7EC8
D6D6 79CD
D6D7 80BF
D6D8 91CD
D6D9 4EF2
D6DA 4F17
D6DB 821F
D6DC 5468
D6DD 5DDE
D6DE 6D32
D6DF 8BCC
D6E0 7CA5
D6E1 8F74
D6E2 8098
D6E3 5E1A
D6E4 5492
D6E5 76B1
D6E6 5B99
D6E7 663C
D6E8 9AA4
D6E9 73E0
D6EA 682A
D6EB 86DB
D6EC 6731
D6ED 732A
D6EE 8BF8
D6EF 8BDB
D6F0 9010
D6F1 7AF9
D6F2 70DB
D6F3 716E
D6F4 62C4
D6F5 77A9
D6F6 5631
D6F7 4E3B
D6F8 8457
D6F9 67F1
D6FA 52A9
D6FB 86C0
D6FC 8D2E
D6FD 94F8
D6FE 7B51
D740 8B46
D741 8B47
D742 8B48
D743 8B49
D744 8B4A
D745 8B4B
D746 8B4C
D747 8B4D
D748 8B4E
D749 8B4F
D74A 8B50
D74B 8B51
D74C 8B52
D74D 8B53
D74E 8B54
D74F 8B55
D750 8B56
D751 8B57
D752 8B58
D753 8B59
D754 8B5A
D755 8B5B
D756 8B5C
D757 8B5D
D758 8B5E
D759 8B5F
D75A 8B60
D75B 8B61
D75C 8B62
D75D 8B63
D75E 8B64
D75F 8B65
D760 8B67
D761 8B68
D762 8B69
D763 8B6A
D764 8B6B
D765 8B6D
D766 8B6E
D767 8B6F
D768 8B70
D769 8B71
D76A 8B72
D76B 8B73
D76C 8B74
D76D 8B75
D76E 8B76
D76F 8B77
D770 8B78
D771 8B79
D772 8B7A
D773 8B7B
D774 8B7C
D775 8B7D
D776 8B7E
D777 8B7F
D778 8B80
D779 8B81
D77A 8B82
D77B 8B83
D77C 8B84
D77D 8B85
D77E 8B86
D780 8B87
D781 8B88
D782 8B89
D783 8B8A
D784 8B8B
D785 8B8C
D786 8B8D
D787 8B8E
D788 8B8F
D789 8B90
D78A 8B91
D78B 8B92
D78C 8B93
D78D 8B94
D78E 8B95
D78F 8B96
D790 8B97
D791 8B98
D792 8B99
D793 8B9A
D794 8B9B
D795 8B9C
D796 8B9D
D797 8B9E
D798 8B9F
D799 8BAC
D79A 8BB1
D79B 8BBB
D79C 8BC7
D79D 8BD0
D79E 8BEA
D79F 8C09
D7A0 8C1E
D7A1 4F4F
D7A2 6CE8
D7A3 795D
D7A4 9A7B
D7A5 6293
D7A6 722A
D7A7 62FD
D7A8 4E13
D7A9 7816
D7AA 8F6C
D7AB 64B0
D7AC 8D5A
D7AD 7BC6
D7AE 6869
D7AF 5E84
D7B0 88C5
D7B1 5986
D7B2 649E
D7B3 58EE
D7B4 72B6
D7B5 690E
D7B6 9525
D7B7 8FFD
D7B8 8D58
D7B9 5760
D7BA 7F00
D7BB 8C06
D7BC 51C6
D7BD 6349
D7BE 62D9
D7BF 5353
D7C0 684C
D7C1 7422
D7C2 8301
D7C3 914C
D7C4 5544
D7C5 7740
D7C6 707C
D7C7 6D4A
D7C8 5179
D7C9 54A8
D7CA 8D44
D7CB 59FF
D7CC 6ECB
D7CD 6DC4
D7CE 5B5C
D7CF 7D2B
D7D0 4ED4
D7D1 7C7D
D7D2 6ED3
D7D3 5B50
D7D4 81EA
D7D5 6E0D
D7D6 5B57
D7D7 9B03
D7D8 68D5
D7D9 8E2A
D7DA 5B97
D7DB 7EFC
D7DC 603B
D7DD 7EB5
D7DE 90B9
D7DF 8D70
D7E0 594F
D7E1 63CD
D7E2 79DF
D7E3 8DB3
D7E4 5352
D7E5 65CF
D7E6 7956
D7E7 8BC5
D7E8 963B
D7E9 7EC4
D7EA 94BB
D7EB 7E82
D7EC 5634
D7ED 9189
D7EE 6700
D7EF 7F6A
D7F0 5C0A
D7F1 9075
D7F2 6628
D7F3 5DE6
D7F4 4F50
D7F5 67DE
D7F6 505A
D7F7 4F5C
D7F8 5750
D7F9 5EA7
D840 8C38
D841 8C39
D842 8C3A
D843 8C3B
D844 8C3C
D845 8C3D
D846 8C3E
D847 8C3F
D848 8C40
D849 8C42
D84A 8C43
D84B 8C44
D84C 8C45
D84D 8C48
D84E 8C4A
D84F 8C4B
D850 8C4D
D851 8C4E
D852 8C4F
D853 8C50
D854 8C51
D855 8C52
D856 8C53
D857 8C54
D858 8C56
D859 8C57
D85A 8C58
D85B 8C59
D85C 8C5B
D85D 8C5C
D85E 8C5D
D85F 8C5E
D860 8C5F
D861 8C60
D862 8C63
D863 8C64
D864 8C65
D865 8C66
D866 8C67
D867 8C68
D868 8C69
D869 8C6C
D86A 8C6D
D86B 8C6E
D86C 8C6F
D86D 8C70
D86E 8C71
D86F 8C72
D870 8C74
D871 8C75
D872 8C76
D873 8C77
D874 8C7B
D875 8C7C
D876 8C7D
D877 8C7E
D878 8C7F
D879 8C80
D87A 8C81
D87B 8C83
D87C 8C84
D87D 8C86
D87E 8C87
D880 8C88
D881 8C8B
D882 8C8D
D883 8C8E
D884 8C8F
D885 8C90
D886 8C91
D887 8C92
D888 8C93
D889 8C95
D88A 8C96
D88B 8C97
D88C 8C99
D88D 8C9A
D88E 8C9B
D88F 8C9C
D890 8C9D
D891 8C9E
D892 8C9F
D893 8CA0
D894 8CA1
D895 8CA2
D896 8CA3
D897 8CA4
D898 8CA5
D899 8CA6
D89A 8CA7
D89B 8CA8
D89C 8CA9
D89D 8CAA
D89E 8CAB
D89F 8CAC
D8A0 8CAD
D8A1 4E8D
D8A2 4E0C
D8A3 5140
D8A4 4E10
D8A5 5EFF
D8A6 5345
D8A7 4E15
D8A8 4E98
D8A9 4E1E
D8AA 9B32
D8AB 5B6C
D8AC 5669
D8AD 4E28
D8AE 79BA
D8AF 4E3F
D8B0 5315
D8B1 4E47
D8B2 592D
D8B3 723B
D8B4 536E
D8B5 6C10
D8B6 56DF
D8B7 80E4
D8B8 9997
D8B9 6BD3
D8BA 777E
D8BB 9F17
D8BC 4E36
D8BD 4E9F
D8BE 9F10
D8BF 4E5C
D8C0 4E69
D8C1 4E93
D8C2 8288
D8C3 5B5B
D8C4 556C
D8C5 560F
D8C6 4EC4
D8C7 538D
D8C8 539D
D8C9 53A3
D8CA 53A5
D8CB 53AE
D8CC 9765
D8CD 8D5D
D8CE 531A
D8CF 53F5
D8D0 5326
D8D1 532E
D8D2 533E
D8D3 8D5C
D8D4 5366
D8D5 5363
D8D6 5202
D8D7 5208
D8D8 520E
D8D9 522D
D8DA 5233
D8DB 523F
D8DC 5240
D8DD 524C
D8DE 525E
D8DF 5261
D8E0 525C
D8E1 84AF
D8E2 527D
D8E3 5282
D8E4 5281
D8E5 5290
D8E6 5293
D8E7 5182
D8E8 7F54
D8E9 4EBB
D8EA 4EC3
D8EB 4EC9
D8EC 4EC2
D8ED 4EE8
D8EE 4EE1
D8EF 4EEB
D8F0 4EDE
D8F1 4F1B
D8F2 4EF3
D8F3 4F22
D8F4 4F64
D8F5 4EF5
D8F6 4F25
D8F7 4F27
D8F8 4F09
D8F9 4F2B
D8FA 4F5E
D8FB 4F67
D8FC 6538
D8FD 4F5A
D8FE 4F5D
D940 8CAE
D941 8CAF
D942 8CB0
D943 8CB1
D944 8CB2
D945 8CB3
D946 8CB4
D947 8CB5
D948 8CB6
D949 8CB7
D94A 8CB8
D94B 8CB9
D94C 8CBA
D94D 8CBB
D94E 8CBC
D94F 8CBD
D950 8CBE
D951 8CBF
D952 8CC0
D953 8CC1
D954 8CC2
D955 8CC3
D956 8CC4
D957 8CC5
D958 8CC6
D959 8CC7
D95A 8CC8
D95B 8CC9
D95C 8CCA
D95D 8CCB
D95E 8CCC
D95F 8CCD
D960 8CCE
D961 8CCF
D962 8CD0
D963 8CD1
D964 8CD2
D965 8CD3
D966 8CD4
D967 8CD5
D968 8CD6
D969 8CD7
D96A 8CD8
D96B 8CD9
D96C 8CDA
D96D 8CDB
D96E 8CDC
D96F 8CDD
D970 8CDE
D971 8CDF
D972 8CE0
D973 8CE1
D974 8CE2
D975 8CE3
D976 8CE4
D977 8CE5
D978 8CE6
D979 8CE7
D97A 8CE8
D97B 8CE9
D97C 8CEA
D97D 8CEB
D97E 8CEC
D980 8CED
D981 8CEE
D982 8CEF
D983 8CF0
D984 8CF1
D985 8CF2
D986 8CF3
D987 8CF4
D988 8CF5
D989 8CF6
D98A 8CF7
D98B 8CF8
D98C 8CF9
D98D 8CFA
D98E 8CFB
D98F 8CFC
D990 8CFD
D991 8CFE
D992 8CFF
D993 8D00
D994 8D01
D995 8D02
D996 8D03
D997 8D04
D998 8D05
D999 8D06
D99A 8D07
D99B 8D08
D99C 8D09
D99D 8D0A
D99E 8D0B
D99F 8D0C
D9A0 8D0D
D9A1 4F5F
D9A2 4F57
D9A3 4F32
D9A4 4F3D
D9A5 4F76
D9A6 4F74
D9A7 4F91
D9A8 4F89
D9A9 4F83
D9AA 4F8F
D9AB 4F7E
D9AC 4F7B
D9AD 4FAA
D9AE 4F7C
D9AF 4FAC
D9B0 4F94
D9B1 4FE6
D9B2 4FE8
D9B3 4FEA
D9B4 4FC5
D9B5 4FDA
D9B6 4FE3
D9B7 4FDC
D9B8 4FD1
D9B9 4FDF
D9BA 4FF8
D9BB 5029
D9BC 504C
D9BD 4FF3
D9BE 502C
D9BF 500F
D9C0 502E
D9C1 502D
D9C2 4FFE
D9C3 501C
D9C4 500C
D9C5 5025
D9C6 5028
D9C7 507E
D9C8 5043
D9C9 5055
D9CA 5048
D9CB 504E
D9CC 506C
D9CD 507B
D9CE 50A5
D9CF 50A7
D9D0 50A9
D9D1 50BA
D9D2 50D6
D9D3 5106
D9D4 50ED
D9D5 50EC
D9D6 50E6
D9D7 50EE
D9D8 5107
D9D9 510B
D9DA 4EDD
D9DB 6C3D
D9DC 4F58
D9DD 4F65
D9DE 4FCE
D9DF 9FA0
D9E0 6C46
D9E1 7C74
D9E2 516E
D9E3 5DFD
D9E4 9EC9
D9E5 9998
D9E6 5181
D9E7 5914
D9E8 52F9
D9E9 530D
D9EA 8A07
D9EB 5310
D9EC 51EB
D9ED 5919
D9EE 5155
D9EF 4EA0
D9F0 5156
D9F1 4EB3
D9F2 886E
D9F3 88A4
D9F4 4EB5
D9F5 8114
D9F6 88D2
D9F7 7980
D9F8 5B34
D9F9 8803
D9FA 7FB8
D9FB 51AB
D9FC 51B1
D9FD 51BD
D9FE 51BC
DA40 8D0E
DA41 8D0F
DA42 8D10
DA43 8D11
DA44 8D12
DA45 8D13
DA46 8D14
DA47 8D15
DA48 8D16
DA49 8D17
DA4A 8D18
DA4B 8D19
DA4C 8D1A
DA4D 8D1B
DA4E 8D1C
DA4F 8D20
DA50 8D51
DA51 8D52
DA52 8D57
DA53 8D5F
DA54 8D65
DA55 8D68
DA56 8D69
DA57 8D6A
DA58 8D6C
DA59 8D6E
DA5A 8D6F
DA5B 8D71
DA5C 8D72
DA5D 8D78
DA5E 8D79
DA5F 8D7A
DA60 8D7B
DA61 8D7C
DA62 8D7D
DA63 8D7E
DA64 8D7F
DA65 8D80
DA66 8D82
DA67 8D83
DA68 8D86
DA69 8D87
DA6A 8D88
DA6B 8D89
DA6C 8D8C
DA6D 8D8D
DA6E 8D8E
DA6F 8D8F
DA70 8D90
DA71 8D92
DA72 8D93
DA73 8D95
DA74 8D96
DA75 8D97
DA76 8D98
DA77 8D99
DA78 8D9A
DA79 8D9B
DA7A 8D9C
DA7B 8D9D
DA7C 8D9E
DA7D 8DA0
DA7E 8DA1
DA80 8DA2
DA81 8DA4
DA82 8DA5
DA83 8DA6
DA84 8DA7
DA85 8DA8
DA86 8DA9
DA87 8DAA
DA88 8DAB
DA89 8DAC
DA8A 8DAD
DA8B 8DAE
DA8C 8DAF
DA8D 8DB0
DA8E 8DB2
DA8F 8DB6
DA90 8DB7
DA91 8DB9
DA92 8DBB
DA93 8DBD
DA94 8DC0
DA95 8DC1
DA96 8DC2
DA97 8DC5
DA98 8DC7
DA99 8DC8
DA9A 8DC9
DA9B 8DCA
DA9C 8DCD
DA9D 8DD0
DA9E 8DD2
DA9F 8DD3
DAA0 8DD4
DAA1 51C7
DAA2 5196
DAA3 51A2
DAA4 51A5
DAA5 8BA0
DAA6 8BA6
DAA7 8BA7
DAA8 8BAA
DAA9 8BB4
DAAA 8BB5
DAAB 8BB7
DAAC 8BC2
DAAD 8BC3
DAAE 8BCB
DAAF 8BCF
DAB0 8BCE
DAB1 8BD2
DAB2 8BD3
DAB3 8BD4
DAB4 8BD6
DAB5 8BD8
DAB6 8BD9
DAB7 8BDC
DAB8 8BDF
DAB9 8BE0
DABA 8BE4
DABB 8BE8
DABC 8BE9
DABD 8BEE
DABE 8BF0
DABF 8BF3
DAC0 8BF6
DAC1 8BF9
DAC2 8BFC
DAC3 8BFF
DAC4 8C00
DAC5 8C02
DAC6 8C04
DAC7 8C07
DAC8 8C0C
DAC9 8C0F
DACA 8C11
DACB 8C12
DACC 8C14
DACD 8C15
DACE 8C16
DACF 8C19
DAD0 8C1B
DAD1 8C18
DAD2 8C1D
DAD3 8C1F
DAD4 8C20
DAD5 8C21
DAD6 8C25
DAD7 8C27
DAD8 8C2A
DAD9 8C2B
DADA 8C2E
DADB 8C2F
DADC 8C32
DADD 8C33
DADE 8C35
DADF 8C36
DAE0 5369
DAE1 537A
DAE2 961D
DAE3 9622
DAE4 9621
DAE5 9631
DAE6 962A
DAE7 963D
DAE8 963C
DAE9 9642
DAEA 9649
DAEB 9654
DAEC 965F
DAED 9667
DAEE 966C
DAEF 9672
DAF0 9674
DAF1 9688
DAF2 968D
DAF3 9697
DAF4 96B0
DAF5 9097
DAF6 909B
DAF7 909D
DAF8 9099
DAF9 90AC
DAFA 90A1
DAFB 90B4
DAFC 90B3
DAFD 90B6
DAFE 90BA
DB40 8DD5
DB41 8DD8
DB42 8DD9
DB43 8DDC
DB44 8DE0
DB45 8DE1
DB46 8DE2
DB47 8DE5
DB48 8DE6
DB49 8DE7
DB4A 8DE9
DB4B 8DED
DB4C 8DEE
DB4D 8DF0
DB4E 8DF1
DB4F 8DF2
DB50 8DF4
DB51 8DF6
DB52 8DFC
DB53 8DFE
DB54 8DFF
DB55 8E00
DB56 8E01
DB57 8E02
DB58 8E03
DB59 8E04
DB5A 8E06
DB5B 8E07
DB5C 8E08
DB5D 8E0B
DB5E 8E0D
DB5F 8E0E
DB60 8E10
DB61 8E11
DB62 8E12
DB63 8E13
DB64 8E15
DB65 8E16
DB66 8E17
DB67 8E18
DB68 8E19
DB69 8E1A
DB6A 8E1B
DB6B 8E1C
DB6C 8E20
DB6D 8E21
DB6E 8E24
DB6F 8E25
DB70 8E26
DB71 8E27
DB72 8E28
DB73 8E2B
DB74 8E2D
DB75 8E30
DB76 8E32
DB77 8E33
DB78 8E34
DB79 8E36
DB7A 8E37
DB7B 8E38
DB7C 8E3B
DB7D 8E3C
DB7E 8E3E
DB80 8E3F
DB81 8E43
DB82 8E45
DB83 8E46
DB84 8E4C
DB85 8E4D
DB86 8E4E
DB87 8E4F
DB88 8E50
DB89 8E53
DB8A 8E54
DB8B 8E55
DB8C 8E56
DB8D 8E57
DB8E 8E58
DB8F 8E5A
DB90 8E5B
DB91 8E5C
DB92 8E5D
DB93 8E5E
DB94 8E5F
DB95 8E60
DB96 8E61
DB97 8E62
DB98 8E63
DB99 8E64
DB9A 8E65
DB9B 8E67
DB9C 8E68
DB9D 8E6A
DB9E 8E6B
DB9F 8E6E
DBA0 8E71
DBA1 90B8
DBA2 90B0
DBA3 90CF
DBA4 90C5
DBA5 90BE
DBA6 90D0
DBA7 90C4
DBA8 90C7
DBA9 90D3
DBAA 90E6
DBAB 90E2
DBAC 90DC
DBAD 90D7
DBAE 90DB
DBAF 90EB
DBB0 90EF
DBB1 90FE
DBB2 9104
DBB3 9122
DBB4 911E
DBB5 9123
DBB6 9131
DBB7 912F
DBB8 9139
DBB9 9143
DBBA 9146
DBBB 520D
DBBC 5942
DBBD 52A2
DBBE 52AC
DBBF 52AD
DBC0 52BE
DBC1 54FF
DBC2 52D0
DBC3 52D6
DBC4 52F0
DBC5 53DF
DBC6 71EE
DBC7 77CD
DBC8 5EF4
DBC9 51F5
DBCA 51FC
DBCB 9B2F
DBCC 53B6
DBCD 5F01
DBCE 755A
DBCF 5DEF
DBD0 574C
DBD1 57A9
DBD2 57A1
DBD3 587E
DBD4 58BC
DBD5 58C5
DBD6 58D1
DBD7 5729
DBD8 572C
DBD9 572A
DBDA 5733
DBDB 5739
DBDC 572E
DBDD 572F
DBDE 575C
DBDF 573B
DBE0 5742
DBE1 5769
DBE2 5785
DBE3 576B
DBE4 5786
DBE5 577C
DBE6 577B
DBE7 5768
DBE8 576D
DBE9 5776
DBEA 5773
DBEB 57AD
DBEC 57A4
DBED 578C
DBEE 57B2
DBEF 57CF
DBF0 57A7
DBF1 57B4
DBF2 5793
DBF3 57A0
DBF4 57D5
DBF5 57D8
DBF6 57DA
DBF7 57D9
DBF8 57D2
DBF9 57B8
DBFA 57F4
DBFB 57EF
DBFC 57F8
DBFD 57E4
DBFE 57DD
DC40 8E73
DC41 8E75
DC42 8E77
DC43 8E78
DC44 8E79
DC45 8E7A
DC46 8E7B
DC47 8E7D
DC48 8E7E
DC49 8E80
DC4A 8E82
DC4B 8E83
DC4C 8E84
DC4D 8E86
DC4E 8E88
DC4F 8E89
DC50 8E8A
DC51 8E8B
DC52 8E8C
DC53 8E8D
DC54 8E8E
DC55 8E91
DC56 8E92
DC57 8E93
DC58 8E95
DC59 8E96
DC5A 8E97
DC5B 8E98
DC5C 8E99
DC5D 8E9A
DC5E 8E9B
DC5F 8E9D
DC60 8E9F
DC61 8EA0
DC62 8EA1
DC63 8EA2
DC64 8EA3
DC65 8EA4
DC66 8EA5
DC67 8EA6
DC68 8EA7
DC69 8EA8
DC6A 8EA9
DC6B 8EAA
DC6C 8EAD
DC6D 8EAE
DC6E 8EB0
DC6F 8EB1
DC70 8EB3
DC71 8EB4
DC72 8EB5
DC73 8EB6
DC74 8EB7
DC75 8EB8
DC76 8EB9
DC77 8EBB
DC78 8EBC
DC79 8EBD
DC7A 8EBE
DC7B 8EBF
DC7C 8EC0
DC7D 8EC1
DC7E 8EC2
DC80 8EC3
DC81 8EC4
DC82 8EC5
DC83 8EC6
DC84 8EC7
DC85 8EC8
DC86 8EC9
DC87 8ECA
DC88 8ECB
DC89 8ECC
DC8A 8ECD
DC8B 8ECF
DC8C 8ED0
DC8D 8ED1
DC8E 8ED2
DC8F 8ED3
DC90 8ED4
DC91 8ED5
DC92 8ED6
DC93 8ED7
DC94 8ED8
DC95 8ED9
DC96 8EDA
DC97 8EDB
DC98 8EDC
DC99 8EDD
DC9A 8EDE
DC9B 8EDF
DC9C 8EE0
DC9D 8EE1
DC9E 8EE2
DC9F 8EE3
DCA0 8EE4
DCA1 580B
DCA2 580D
DCA3 57FD
DCA4 57ED
DCA5 5800
DCA6 581E
DCA7 5819
DCA8 5844
DCA9 5820
DCAA 5865
DCAB 586C
DCAC 5881
DCAD 5889
DCAE 589A
DCAF 5880
DCB0 99A8
DCB1 9F19
DCB2 61FF
DCB3 8279
DCB4 827D
DCB5 827F
DCB6 828F
DCB7 828A
DCB8 82A8
DCB9 8284
DCBA 828E
DCBB 8291
DCBC 8297
DCBD 8299
DCBE 82AB
DCBF 82B8
DCC0 82BE
DCC1 82B0
DCC2 82C8
DCC3 82CA
DCC4 82E3
DCC5 8298
DCC6 82B7
DCC7 82AE
DCC8 82CB
DCC9 82CC
DCCA 82C1
DCCB 82A9
DCCC 82B4
DCCD 82A1
DCCE 82AA
DCCF 829F
DCD0 82C4
DCD1 82CE
DCD2 82A4
DCD3 82E1
DCD4 8309
DCD5 82F7
DCD6 82E4
DCD7 830F
DCD8 8307
DCD9 82DC
DCDA 82F4
DCDB 82D2
DCDC 82D8
DCDD 830C
DCDE 82FB
DCDF 82D3
DCE0 8311
DCE1 831A
DCE2 8306
DCE3 8314
DCE4 8315
DCE5 82E0
DCE6 82D5
DCE7 831C
DCE8 8351
DCE9 835B
DCEA 835C
DCEB 8308
DCEC 8392
DCED 833C
DCEE 8334
DCEF 8331
DCF0 839B
DCF1 835E
DCF2 832F
DCF3 834F
DCF4 8347
DCF5 8343
DCF6 835F
DCF7 8340
DCF8 8317
DCF9 8360
DCFA 832D
DCFB 833A
DCFC 8333
DCFD 8366
DCFE 8365
DD40 8EE5
DD41 8EE6
DD42 8EE7
DD43 8EE8
DD44 8EE9
DD45 8EEA
DD46 8EEB
DD47 8EEC
DD48 8EED
DD49 8EEE
DD4A 8EEF
DD4B 8EF0
DD4C 8EF1
DD4D 8EF2
DD4E 8EF3
DD4F 8EF4
DD50 8EF5
DD51 8EF6
DD52 8EF7
DD53 8EF8
DD54 8EF9
DD55 8EFA
DD56 8EFB
DD57 8EFC
DD58 8EFD
DD59 8EFE
DD5A 8EFF
DD5B 8F00
DD5C 8F01
DD5D 8F02
DD5E 8F03
DD5F 8F04
DD60 8F05
DD61 8F06
DD62 8F07
DD63 8F08
DD64 8F09
DD65 8F0A
DD66 8F0B
DD67 8F0C
DD68 8F0D
DD69 8F0E
DD6A 8F0F
DD6B 8F10
DD6C 8F11
DD6D 8F12
DD6E 8F13
DD6F 8F14
DD70 8F15
DD71 8F16
DD72 8F17
DD73 8F18
DD74 8F19
DD75 8F1A
DD76 8F1B
DD77 8F1C
DD78 8F1D
DD79 8F1E
DD7A 8F1F
DD7B 8F20
DD7C 8F21
DD7D 8F22
DD7E 8F23
DD80 8F24
DD81 8F25
DD82 8F26
DD83 8F27
DD84 8F28
DD85 8F29
DD86 8F2A
DD87 8F2B
DD88 8F2C
DD89 8F2D
DD8A 8F2E
DD8B 8F2F
DD8C 8F30
DD8D 8F31
DD8E 8F32
DD8F 8F33
DD90 8F34
DD91 8F35
DD92 8F36
DD93 8F37
DD94 8F38
DD95 8F39
DD96 8F3A
DD97 8F3B
DD98 8F3C
DD99 8F3D
DD9A 8F3E
DD9B 8F3F
DD9C 8F40
DD9D 8F41
DD9E 8F42
DD9F 8F43
DDA0 8F44
DDA1 8368
DDA2 831B
DDA3 8369
DDA4 836C
DDA5 836A
DDA6 836D
DDA7 836E
DDA8 83B0
DDA9 8378
DDAA 83B3
DDAB 83B4
DDAC 83A0
DDAD 83AA
DDAE 8393
DDAF 839C
DDB0 8385
DDB1 837C
DDB2 83B6
DDB3 83A9
DDB4 837D
DDB5 83B8
DDB6 837B
DDB7 8398
DDB8 839E
DDB9 83A8
DDBA 83BA
DDBB 83BC
DDBC 83C1
DDBD 8401
DDBE 83E5
DDBF 83D8
DDC0 5807
DDC1 8418
DDC2 840B
DDC3 83DD
DDC4 83FD
DDC5 83D6
DDC6 841C
DDC7 8438
DDC8 8411
DDC9 8406
DDCA 83D4
DDCB 83DF
DDCC 840F
DDCD 8403
DDCE 83F8
DDCF 83F9
DDD0 83EA
DDD1 83C5
DDD2 83C0
DDD3 8426
DDD4 83F0
DDD5 83E1
DDD6 845C
DDD7 8451
DDD8 845A
DDD9 8459
DDDA 8473
DDDB 8487
DDDC 8488
DDDD 847A
DDDE 8489
DDDF 8478
DDE0 843C
DDE1 8446
DDE2 8469
DDE3 8476
DDE4 848C
DDE5 848E
DDE6 8431
DDE7 846D
DDE8 84C1
DDE9 84CD
DDEA 84D0
DDEB 84E6
DDEC 84BD
DDED 84D3
DDEE 84CA
DDEF 84BF
DDF0 84BA
DDF1 84E0
DDF2 84A1
DDF3 84B9
DDF4 84B4
DDF5 8497
DDF6 84E5
DDF7 84E3
DDF8 850C
DDF9 750D
DDFA 8538
DDFB 84F0
DDFC 8539
DDFD 851F
DDFE 853A
DE40 8F45
DE41 8F46
DE42 8F47
DE43 8F48
DE44 8F49
DE45 8F4A
DE46 8F4B
DE47 8F4C
DE48 8F4D
DE49 8F4E
DE4A 8F4F
DE4B 8F50
DE4C 8F51
DE4D 8F52
DE4E 8F53
DE4F 8F54
DE50 8F55
DE51 8F56
DE52 8F57
DE53 8F58
DE54 8F59
DE55 8F5A
DE56 8F5B
DE57 8F5C
DE58 8F5D
DE59 8F5E
DE5A 8F5F
DE5B 8F60
DE5C 8F61
DE5D 8F62
DE5E 8F63
DE5F 8F64
DE60 8F65
DE61 8F6A
DE62 8F80
DE63 8F8C
DE64 8F92
DE65 8F9D
DE66 8FA0
DE67 8FA1
DE68 8FA2
DE69 8FA4
DE6A 8FA5
DE6B 8FA6
DE6C 8FA7
DE6D 8FAA
DE6E 8FAC
DE6F 8FAD
DE70 8FAE
DE71 8FAF
DE72 8FB2
DE73 8FB3
DE74 8FB4
DE75 8FB5
DE76 8FB7
DE77 8FB8
DE78 8FBA
DE79 8FBB
DE7A 8FBC
DE7B 8FBF
DE7C 8FC0
DE7D 8FC3
DE7E 8FC6
DE80 8FC9
DE81 8FCA
DE82 8FCB
DE83 8FCC
DE84 8FCD
DE85 8FCF
DE86 8FD2
DE87 8FD6
DE88 8FD7
DE89 8FDA
DE8A 8FE0
DE8B 8FE1
DE8C 8FE3
DE8D 8FE7
DE8E 8FEC
DE8F 8FEF
DE90 8FF1
DE91 8FF2
DE92 8FF4
DE93 8FF5
DE94 8FF6
DE95 8FFA
DE96 8FFB
DE97 8FFC
DE98 8FFE
DE99 8FFF
DE9A 9007
DE9B 9008
DE9C 900C
DE9D 900E
DE9E 9013
DE9F 9015
DEA0 9018
DEA1 8556
DEA2 853B
DEA3 84FF
DEA4 84FC
DEA5 8559
DEA6 8548
DEA7 8568
DEA8 8564
DEA9 855E
DEAA 857A
DEAB 77A2
DEAC 8543
DEAD 8572
DEAE 857B
DEAF 85A4
DEB0 85A8
DEB1 8587
DEB2 858F
DEB3 8579
DEB4 85AE
DEB5 859C
DEB6 8585
DEB7 85B9
DEB8 85B7
DEB9 85B0
DEBA 85D3
DEBB 85C1
DEBC 85DC
DEBD 85FF
DEBE 8627
DEBF 8605
DEC0 8629
DEC1 8616
DEC2 863C
DEC3 5EFE
DEC4 5F08
DEC5 593C
DEC6 5941
DEC7 8037
DEC8 5955
DEC9 595A
DECA 5958
DECB 530F
DECC 5C22
DECD 5C25
DECE 5C2C
DECF 5C34
DED0 624C
DED1 626A
DED2 629F
DED3 62BB
DED4 62CA
DED5 62DA
DED6 62D7
DED7 62EE
DED8 6322
DED9 62F6
DEDA 6339
DEDB 634B
DEDC 6343
DEDD 63AD
DEDE 63F6
DEDF 6371
DEE0 637A
DEE1 638E
DEE2 63B4
DEE3 636D
DEE4 63AC
DEE5 638A
DEE6 6369
DEE7 63AE
DEE8 63BC
DEE9 63F2
DEEA 63F8
DEEB 63E0
DEEC 63FF
DEED 63C4
DEEE 63DE
DEEF 63CE
DEF0 6452
DEF1 63C6
DEF2 63BE
DEF3 6445
DEF4 6441
DEF5 640B
DEF6 641B
DEF7 6420
DEF8 640C
DEF9 6426
DEFA 6421
DEFB 645E
DEFC 6484
DEFD 646D
DEFE 6496
DF40 9019
DF41 901C
DF42 9023
DF43 9024
DF44 9025
DF45 9027
DF46 9028
DF47 9029
DF48 902A
DF49 902B
DF4A 902C
DF4B 9030
DF4C 9031
DF4D 9032
DF4E 9033
DF4F 9034
DF50 9037
DF51 9039
DF52 903A
DF53 903D
DF54 903F
DF55 9040
DF56 9043
DF57 9045
DF58 9046
DF59 9048
DF5A 9049
DF5B 904A
DF5C 904B
DF5D 904C
DF5E 904E
DF5F 9054
DF60 9055
DF61 9056
DF62 9059
DF63 905A
DF64 905C
DF65 905D
DF66 905E
DF67 905F
DF68 9060
DF69 9061
DF6A 9064
DF6B 9066
DF6C 9067
DF6D 9069
DF6E 906A
DF6F 906B
DF70 906C
DF71 906F
DF72 9070
DF73 9071
DF74 9072
DF75 9073
DF76 9076
DF77 9077
DF78 9078
DF79 9079
DF7A 907A
DF7B 907B
DF7C 907C
DF7D 907E
DF7E 9081
DF80 9084
DF81 9085
DF82 9086
DF83 9087
DF84 9089
DF85 908A
DF86 908C
DF87 908D
DF88 908E
DF89 908F
DF8A 9090
DF8B 9092
DF8C 9094
DF8D 9096
DF8E 9098
DF8F 909A
DF90 909C
DF91 909E
DF92 909F
DF93 90A0
DF94 90A4
DF95 90A5
DF96 90A7
DF97 90A8
DF98 90A9
DF99 90AB
DF9A 90AD
DF9B 90B2
DF9C 90B7
DF9D 90BC
DF9E 90BD
DF9F 90BF
DFA0 90C0
DFA1 647A
DFA2 64B7
DFA3 64B8
DFA4 6499
DFA5 64BA
DFA6 64C0
DFA7 64D0
DFA8 64D7
DFA9 64E4
DFAA 64E2
DFAB 6509
DFAC 6525
DFAD 652E
DFAE 5F0B
DFAF 5FD2
DFB0 7519
DFB1 5F11
DFB2 535F
DFB3 53F1
DFB4 53FD
DFB5 53E9
DFB6 53E8
DFB7 53FB
DFB8 5412
DFB9 5416
DFBA 5406
DFBB 544B
DFBC 5452
DFBD 5453
DFBE 5454
DFBF 5456
DFC0 5443
DFC1 5421
DFC2 5457
DFC3 5459
DFC4 5423
DFC5 5432
DFC6 5482
DFC7 5494
DFC8 5477
DFC9 5471
DFCA 5464
DFCB 549A
DFCC 549B
DFCD 5484
DFCE 5476
DFCF 5466
DFD0 549D
DFD1 54D0
DFD2 54AD
DFD3 54C2
DFD4 54B4
DFD5 54D2
DFD6 54A7
DFD7 54A6
DFD8 54D3
DFD9 54D4
DFDA 5472
DFDB 54A3
DFDC 54D5
DFDD 54BB
DFDE 54BF
DFDF 54CC
DFE0 54D9
DFE1 54DA
DFE2 54DC
DFE3 54A9
DFE4 54AA
DFE5 54A4
DFE6 54DD
DFE7 54CF
DFE8 54DE
DFE9 551B
DFEA 54E7
DFEB 5520
DFEC 54FD
DFED 5514
DFEE 54F3
DFEF 5522
DFF0 5523
DFF1 550F
DFF2 5511
DFF3 5527
DFF4 552A
DFF5 5567
DFF6 558F
DFF7 55B5
DFF8 5549
DFF9 556D
DFFA 5541
DFFB 5555
DFFC 553F
DFFD 5550
DFFE 553C
E040 90C2
E041 90C3
E042 90C6
E043 90C8
E044 90C9
E045 90CB
E046 90CC
E047 90CD
E048 90D2
E049 90D4
E04A 90D5
E04B 90D6
E04C 90D8
E04D 90D9
E04E 90DA
E04F 90DE
E050 90DF
E051 90E0
E052 90E3
E053 90E4
E054 90E5
E055 90E9
E056 90EA
E057 90EC
E058 90EE
E059 90F0
E05A 90F1
E05B 90F2
E05C 90F3
E05D 90F5
E05E 90F6
E05F 90F7
E060 90F9
E061 90FA
E062 90FB
E063 90FC
E064 90FF
E065 9100
E066 9101
E067 9103
E068 9105
E069 9106
E06A 9107
E06B 9108
E06C 9109
E06D 910A
E06E 910B
E06F 910C
E070 910D
E071 910E
E072 910F
E073 9110
E074 9111
E075 9112
E076 9113
E077 9114
E078 9115
E079 9116
E07A 9117
E07B 9118
E07C 911A
E07D 911B
E07E 911C
E080 911D
E081 911F
E082 9120
E083 9121
E084 9124
E085 9125
E086 9126
E087 9127
E088 9128
E089 9129
E08A 912A
E08B 912B
E08C 912C
E08D 912D
E08E 912E
E08F 9130
E090 9132
E091 9133
E092 9134
E093 9135
E094 9136
E095 9137
E096 9138
E097 913A
E098 913B
E099 913C
E09A 913D
E09B 913E
E09C 913F
E09D 9140
E09E 9141
E09F 9142
E0A0 9144
E0A1 5537
E0A2 5556
E0A3 5575
E0A4 5576
E0A5 5577
E0A6 5533
E0A7 5530
E0A8 555C
E0A9 558B
E0AA 55D2
E0AB 5583
E0AC 55B1
E0AD 55B9
E0AE 5588
E0AF 5581
E0B0 559F
E0B1 557E
E0B2 55D6
E0B3 5591
E0B4 557B
E0B5 55DF
E0B6 55BD
E0B7 55BE
E0B8 5594
E0B9 5599
E0BA 55EA
E0BB 55F7
E0BC 55C9
E0BD 561F
E0BE 55D1
E0BF 55EB
E0C0 55EC
E0C1 55D4
E0C2 55E6
E0C3 55DD
E0C4 55C4
E0C5 55EF
E0C6 55E5
E0C7 55F2
E0C8 55F3
E0C9 55CC
E0CA 55CD
E0CB 55E8
E0CC 55F5
E0CD 55E4
E0CE 8F94
E0CF 561E
E0D0 5608
E0D1 560C
E0D2 5601
E0D3 5624
E0D4 5623
E0D5 55FE
E0D6 5600
E0D7 5627
E0D8 562D
E0D9 5658
E0DA 5639
E0DB 5657
E0DC 562C
E0DD 564D
E0DE 5662
E0DF 5659
E0E0 565C
E0E1 564C
E0E2 5654
E0E3 5686
E0E4 5664
E0E5 5671
E0E6 566B
E0E7 567B
E0E8 567C
E0E9 5685
E0EA 5693
E0EB 56AF
E0EC 56D4
E0ED 56D7
E0EE 56DD
E0EF 56E1
E0F0 56F5
E0F1 56EB
E0F2 56F9
E0F3 56FF
E0F4 5704
E0F5 570A
E0F6 5709
E0F7 571C
E0F8 5E0F
E0F9 5E19
E0FA 5E14
E0FB 5E11
E0FC 5E31
E0FD 5E3B
E0FE 5E3C
E140 9145
E141 9147
E142 9148
E143 9151
E144 9153
E145 9154
E146 9155
E147 9156
E148 9158
E149 9159
E14A 915B
E14B 915C
E14C 915F
E14D 9160
E14E 9166
E14F 9167
E150 9168
E151 916B
E152 916D
E153 9173
E154 917A
E155 917B
E156 917C
E157 9180
E158 9181
E159 9182
E15A 9183
E15B 9184
E15C 9186
E15D 9188
E15E 918A
E15F 918E
E160 918F
E161 9193
E162 9194
E163 9195
E164 9196
E165 9197
E166 9198
E167 9199
E168 919C
E169 919D
E16A 919E
E16B 919F
E16C 91A0
E16D 91A1
E16E 91A4
E16F 91A5
E170 91A6
E171 91A7
E172 91A8
E173 91A9
E174 91AB
E175 91AC
E176 91B0
E177 91B1
E178 91B2
E179 91B3
E17A 91B6
E17B 91B7
E17C 91B8
E17D 91B9
E17E 91BB
E180 91BC
E181 91BD
E182 91BE
E183 91BF
E184 91C0
E185 91C1
E186 91C2
E187 91C3
E188 91C4
E189 91C5
E18A 91C6
E18B 91C8
E18C 91CB
E18D 91D0
E18E 91D2
E18F 91D3
E190 91D4
E191 91D5
E192 91D6
E193 91D7
E194 91D8
E195 91D9
E196 91DA
E197 91DB
E198 91DD
E199 91DE
E19A 91DF
E19B 91E0
E19C 91E1
E19D 91E2
E19E 91E3
E19F 91E4
E1A0 91E5
E1A1 5E37
E1A2 5E44
E1A3 5E54
E1A4 5E5B
E1A5 5E5E
E1A6 5E61
E1A7 5C8C
E1A8 5C7A
E1A9 5C8D
E1AA 5C90
E1AB 5C96
E1AC 5C88
E1AD 5C98
E1AE 5C99
E1AF 5C91
E1B0 5C9A
E1B1 5C9C
E1B2 5CB5
E1B3 5CA2
E1B4 5CBD
E1B5 5CAC
E1B6 5CAB
E1B7 5CB1
E1B8 5CA3
E1B9 5CC1
E1BA 5CB7
E1BB 5CC4
E1BC 5CD2
E1BD 5CE4
E1BE 5CCB
E1BF 5CE5
E1C0 5D02
E1C1 5D03
E1C2 5D27
E1C3 5D26
E1C4 5D2E
E1C5 5D24
E1C6 5D1E
E1C7 5D06
E1C8 5D1B
E1C9 5D58
E1CA 5D3E
E1CB 5D34
E1CC 5D3D
E1CD 5D6C
E1CE 5D5B
E1CF 5D6F
E1D0 5D5D
E1D1 5D6B
E1D2 5D4B
E1D3 5D4A
E1D4 5D69
E1D5 5D74
E1D6 5D82
E1D7 5D99
E1D8 5D9D
E1D9 8C73
E1DA 5DB7
E1DB 5DC5
E1DC 5F73
E1DD 5F77
E1DE 5F82
E1DF 5F87
E1E0 5F89
E1E1 5F8C
E1E2 5F95
E1E3 5F99
E1E4 5F9C
E1E5 5FA8
E1E6 5FAD
E1E7 5FB5
E1E8 5FBC
E1E9 8862
E1EA 5F61
E1EB 72AD
E1EC 72B0
E1ED 72B4
E1EE 72B7
E1EF 72B8
E1F0 72C3
E1F1 72C1
E1F2 72CE
E1F3 72CD
E1F4 72D2
E1F5 72E8
E1F6 72EF
E1F7 72E9
E1F8 72F2
E1F9 72F4
E1FA 72F7
E1FB 7301
E1FC 72F3
E1FD 7303
E1FE 72FA
E240 91E6
E241 91E7
E242 91E8
E243 91E9
E244 91EA
E245 91EB
E246 91EC
E247 91ED
E248 91EE
E249 91EF
E24A 91F0
E24B 91F1
E24C 91F2
E24D 91F3
E24E 91F4
E24F 91F5
E250 91F6
E251 91F7
E252 91F8
E253 91F9
E254 91FA
E255 91FB
E256 91FC
E257 91FD
E258 91FE
E259 91FF
E25A 9200
E25B 9201
E25C 9202
E25D 9203
E25E 9204
E25F 9205
E260 9206
E261 9207
E262 9208
E263 9209
E264 920A
E265 920B
E266 920C
E267 920D
E268 920E
E269 920F
E26A 9210
E26B 9211
E26C 9212
E26D 9213
E26E 9214
E26F 9215
E270 9216
E271 9217
E272 9218
E273 9219
E274 921A
E275 921B
E276 921C
E277 921D
E278 921E
E279 921F
E27A 9220
E27B 9221
E27C 9222
E27D 9223
E27E 9224
E280 9225
E281 9226
E282 9227
E283 9228
E284 9229
E285 922A
E286 922B
E287 922C
E288 922D
E289 922E
E28A 922F
E28B 9230
E28C 9231
E28D 9232
E28E 9233
E28F 9234
E290 9235
E291 9236
E292 9237
E293 9238
E294 9239
E295 923A
E296 923B
E297 923C
E298 923D
E299 923E
E29A 923F
E29B 9240
E29C 9241
E29D 9242
E29E 9243
E29F 9244
E2A0 9245
E2A1 72FB
E2A2 7317
E2A3 7313
E2A4 7321
E2A5 730A
E2A6 731E
E2A7 731D
E2A8 7315
E2A9 7322
E2AA 7339
E2AB 7325
E2AC 732C
E2AD 7338
E2AE 7331
E2AF 7350
E2B0 734D
E2B1 7357
E2B2 7360
E2B3 736C
E2B4 736F
E2B5 737E
E2B6 821B
E2B7 5925
E2B8 98E7
E2B9 5924
E2BA 5902
E2BB 9963
E2BC 9967
E2BD 9968
E2BE 9969
E2BF 996A
E2C0 996B
E2C1 996C
E2C2 9974
E2C3 9977
E2C4 997D
E2C5 9980
E2C6 9984
E2C7 9987
E2C8 998A
E2C9 998D
E2CA 9990
E2CB 9991
E2CC 9993
E2CD 9994
E2CE 9995
E2CF 5E80
E2D0 5E91
E2D1 5E8B
E2D2 5E96
E2D3 5EA5
E2D4 5EA0
E2D5 5EB9
E2D6 5EB5
E2D7 5EBE
E2D8 5EB3
E2D9 8D53
E2DA 5ED2
E2DB 5ED1
E2DC 5EDB
E2DD 5EE8
E2DE 5EEA
E2DF 81BA
E2E0 5FC4
E2E1 5FC9
E2E2 5FD6
E2E3 5FCF
E2E4 6003
E2E5 5FEE
E2E6 6004
E2E7 5FE1
E2E8 5FE4
E2E9 5FFE
E2EA 6005
E2EB 6006
E2EC 5FEA
E2ED 5FED
E2EE 5FF8
E2EF 6019
E2F0 6035
E2F1 6026
E2F2 601B
E2F3 600F
E2F4 600D
E2F5 6029
E2F6 602B
E2F7 600A
E2F8 603F
E2F9 6021
E2FA 6078
E2FB 6079
E2FC 607B
E2FD 607A
E2FE 6042
E340 9246
E341 9247
E342 9248
E343 9249
E344 924A
E345 924B
E346 924C
E347 924D
E348 924E
E349 924F
E34A 9250
E34B 9251
E34C 9252
E34D 9253
E34E 9254
E34F 9255
E350 9256
E351 9257
E352 9258
E353 9259
E354 925A
E355 925B
E356 925C
E357 925D
E358 925E
E359 925F
E35A 9260
E35B 9261
E35C 9262
E35D 9263
E35E 9264
E35F 9265
E360 9266
E361 9267
E362 9268
E363 9269
E364 926A
E365 926B
E366 926C
E367 926D
E368 926E
E369 926F
E36A 9270
E36B 9271
E36C 9272
E36D 9273
E36E 9275
E36F 9276
E370 9277
E371 9278
E372 9279
E373 927A
E374 927B
E375 927C
E376 927D
E377 927E
E378 927F
E379 9280
E37A 9281
E37B 9282
E37C 9283
E37D 9284
E37E 9285
E380 9286
E381 9287
E382 9288
E383 9289
E384 928A
E385 928B
E386 928C
E387 928D
E388 928F
E389 9290
E38A 9291
E38B 9292
E38C 9293
E38D 9294
E38E 9295
E38F 9296
E390 9297
E391 9298
E392 9299
E393 929A
E394 929B
E395 929C
E396 929D
E397 929E
E398 929F
E399 92A0
E39A 92A1
E39B 92A2
E39C 92A3
E39D 92A4
E39E 92A5
E39F 92A6
E3A0 92A7
E3A1 606A
E3A2 607D
E3A3 6096
E3A4 609A
E3A5 60AD
E3A6 609D
E3A7 6083
E3A8 6092
E3A9 608C
E3AA 609B
E3AB 60EC
E3AC 60BB
E3AD 60B1
E3AE 60DD
E3AF 60D8
E3B0 60C6
E3B1 60DA
E3B2 60B4
E3B3 6120
E3B4 6126
E3B5 6115
E3B6 6123
E3B7 60F4
E3B8 6100
E3B9 610E
E3BA 612B
E3BB 614A
E3BC 6175
E3BD 61AC
E3BE 6194
E3BF 61A7
E3C0 61B7
E3C1 61D4
E3C2 61F5
E3C3 5FDD
E3C4 96B3
E3C5 95E9
E3C6 95EB
E3C7 95F1
E3C8 95F3
E3C9 95F5
E3CA 95F6
E3CB 95FC
E3CC 95FE
E3CD 9603
E3CE 9604
E3CF 9606
E3D0 9608
E3D1 960A
E3D2 960B
E3D3 960C
E3D4 960D
E3D5 960F
E3D6 9612
E3D7 9615
E3D8 9616
E3D9 9617
E3DA 9619
E3DB 961A
E3DC 4E2C
E3DD 723F
E3DE 6215
E3DF 6C35
E3E0 6C54
E3E1 6C5C
E3E2 6C4A
E3E3 6CA3
E3E4 6C85
E3E5 6C90
E3E6 6C94
E3E7 6C8C
E3E8 6C68
E3E9 6C69
E3EA 6C74
E3EB 6C76
E3EC 6C86
E3ED 6CA9
E3EE 6CD0
E3EF 6CD4
E3F0 6CAD
E3F1 6CF7
E3F2 6CF8
E3F3 6CF1
E3F4 6CD7
E3F5 6CB2
E3F6 6CE0
E3F7 6CD6
E3F8 6CFA
E3F9 6CEB
E3FA 6CEE
E3FB 6CB1
E3FC 6CD3
E3FD 6CEF
E3FE 6CFE
E440 92A8
E441 92A9
E442 92AA
E443 92AB
E444 92AC
E445 92AD
E446 92AF
E447 92B0
E448 92B1
E449 92B2
E44A 92B3
E44B 92B4
E44C 92B5
E44D 92B6
E44E 92B7
E44F 92B8
E450 92B9
E451 92BA
E452 92BB
E453 92BC
E454 92BD
E455 92BE
E456 92BF
E457 92C0
E458 92C1
E459 92C2
E45A 92C3
E45B 92C4
E45C 92C5
E45D 92C6
E45E 92C7
E45F 92C9
E460 92CA
E461 92CB
E462 92CC
E463 92CD
E464 92CE
E465 92CF
E466 92D0
E467 92D1
E468 92D2
E469 92D3
E46A 92D4
E46B 92D5
E46C 92D6
E46D 92D7
E46E 92D8
E46F 92D9
E470 92DA
E471 92DB
E472 92DC
E473 92DD
E474 92DE
E475 92DF
E476 92E0
E477 92E1
E478 92E2
E479 92E3
E47A 92E4
E47B 92E5
E47C 92E6
E47D 92E7
E47E 92E8
E480 92E9
E481 92EA
E482 92EB
E483 92EC
E484 92ED
E485 92EE
E486 92EF
E487 92F0
E488 92F1
E489 92F2
E48A 92F3
E48B 92F4
E48C 92F5
E48D 92F6
E48E 92F7
E48F 92F8
E490 92F9
E491 92FA
E492 92FB
E493 92FC
E494 92FD
E495 92FE
E496 92FF
E497 9300
E498 9301
E499 9302
E49A 9303
E49B 9304
E49C 9305
E49D 9306
E49E 9307
E49F 9308
E4A0 9309
E4A1 6D39
E4A2 6D27
E4A3 6D0C
E4A4 6D43
E4A5 6D48
E4A6 6D07
E4A7 6D04
E4A8 6D19
E4A9 6D0E
E4AA 6D2B
E4AB 6D4D
E4AC 6D2E
E4AD 6D35
E4AE 6D1A
E4AF 6D4F
E4B0 6D52
E4B1 6D54
E4B2 6D33
E4B3 6D91
E4B4 6D6F
E4B5 6D9E
E4B6 6DA0
E4B7 6D5E
E4B8 6D93
E4B9 6D94
E4BA 6D5C
E4BB 6D60
E4BC 6D7C
E4BD 6D63
E4BE 6E1A
E4BF 6DC7
E4C0 6DC5
E4C1 6DDE
E4C2 6E0E
E4C3 6DBF
E4C4 6DE0
E4C5 6E11
E4C6 6DE6
E4C7 6DDD
E4C8 6DD9
E4C9 6E16
E4CA 6DAB
E4CB 6E0C
E4CC 6DAE
E4CD 6E2B
E4CE 6E6E
E4CF 6E4E
E4D0 6E6B
E4D1 6EB2
E4D2 6E5F
E4D3 6E86
E4D4 6E53
E4D5 6E54
E4D6 6E32
E4D7 6E25
E4D8 6E44
E4D9 6EDF
E4DA 6EB1
E4DB 6E98
E4DC 6EE0
E4DD 6F2D
E4DE 6EE2
E4DF 6EA5
E4E0 6EA7
E4E1 6EBD
E4E2 6EBB
E4E3 6EB7
E4E4 6ED7
E4E5 6EB4
E4E6 6ECF
E4E7 6E8F
E4E8 6EC2
E4E9 6E9F
E4EA 6F62
E4EB 6F46
E4EC 6F47
E4ED 6F24
E4EE 6F15
E4EF 6EF9
E4F0 6F2F
E4F1 6F36
E4F2 6F4B
E4F3 6F74
E4F4 6F2A
E4F5 6F09
E4F6 6F29
E4F7 6F89
E4F8 6F8D
E4F9 6F8C
E4FA 6F78
E4FB 6F72
E4FC 6F7C
E4FD 6F7A
E4FE 6FD1
E540 930A
E541 930B
E542 930C
E543 930D
E544 930E
E545 930F
E546 9310
E547 9311
E548 9312
E549 9313
E54A 9314
E54B 9315
E54C 9316
E54D 9317
E54E 9318
E54F 9319
E550 931A
E551 931B
E552 931C
E553 931D
E554 931E
E555 931F
E556 9320
E557 9321
E558 9322
E559 9323
E55A 9324
E55B 9325
E55C 9326
E55D 9327
E55E 9328
E55F 9329
E560 932A
E561 932B
E562 932C
E563 932D
E564 932E
E565 932F
E566 9330
E567 9331
E568 9332
E569 9333
E56A 9334
E56B 9335
E56C 9336
E56D 9337
E56E 9338
E56F 9339
E570 933A
E571 933B
E572 933C
E573 933D
E574 933F
E575 9340
E576 9341
E577 9342
E578 9343
E579 9344
E57A 9345
E57B 9346
E57C 9347
E57D 9348
E57E 9349
E580 934A
E581 934B
E582 934C
E583 934D
E584 934E
E585 934F
E586 9350
E587 9351
E588 9352
E589 9353
E58A 9354
E58B 9355
E58C 9356
E58D 9357
E58E 9358
E58F 9359
E590 935A
E591 935B
E592 935C
E593 935D
E594 935E
E595 935F
E596 9360
E597 9361
E598 9362
E599 9363
E59A 9364
E59B 9365
E59C 9366
E59D 9367
E59E 9368
E59F 9369
E5A0 936B
E5A1 6FC9
E5A2 6FA7
E5A3 6FB9
E5A4 6FB6
E5A5 6FC2
E5A6 6FE1
E5A7 6FEE
E5A8 6FDE
E5A9 6FE0
E5AA 6FEF
E5AB 701A
E5AC 7023
E5AD 701B
E5AE 7039
E5AF 7035
E5B0 704F
E5B1 705E
E5B2 5B80
E5B3 5B84
E5B4 5B95
E5B5 5B93
E5B6 5BA5
E5B7 5BB8
E5B8 752F
E5B9 9A9E
E5BA 6434
E5BB 5BE4
E5BC 5BEE
E5BD 8930
E5BE 5BF0
E5BF 8E47
E5C0 8B07
E5C1 8FB6
E5C2 8FD3
E5C3 8FD5
E5C4 8FE5
E5C5 8FEE
E5C6 8FE4
E5C7 8FE9
E5C8 8FE6
E5C9 8FF3
E5CA 8FE8
E5CB 9005
E5CC 9004
E5CD 900B
E5CE 9026
E5CF 9011
E5D0 900D
E5D1 9016
E5D2 9021
E5D3 9035
E5D4 9036
E5D5 902D
E5D6 902F
E5D7 9044
E5D8 9051
E5D9 9052
E5DA 9050
E5DB 9068
E5DC 9058
E5DD 9062
E5DE 905B
E5DF 66B9
E5E0 9074
E5E1 907D
E5E2 9082
E5E3 9088
E5E4 9083
E5E5 908B
E5E6 5F50
E5E7 5F57
E5E8 5F56
E5E9 5F58
E5EA 5C3B
E5EB 54AB
E5EC 5C50
E5ED 5C59
E5EE 5B71
E5EF 5C63
E5F0 5C66
E5F1 7FBC
E5F2 5F2A
E5F3 5F29
E5F4 5F2D
E5F5 8274
E5F6 5F3C
E5F7 9B3B
E5F8 5C6E
E5F9 5981
E5FA 5983
E5FB 598D
E5FC 59A9
E5FD 59AA
E5FE 59A3
E640 936C
E641 936D
E642 936E
E643 936F
E644 9370
E645 9371
E646 9372
E647 9373
E648 9374
E649 9375
E64A 9376
E64B 9377
E64C 9378
E64D 9379
E64E 937A
E64F 937B
E650 937C
E651 937D
E652 937E
E653 937F
E654 9380
E655 9381
E656 9382
E657 9383
E658 9384
E659 9385
E65A 9386
E65B 9387
E65C 9388
E65D 9389
E65E 938A
E65F 938B
E660 938C
E661 938D
E662 938E
E663 9390
E664 9391
E665 9392
E666 9393
E667 9394
E668 9395
E669 9396
E66A 9397
E66B 9398
E66C 9399
E66D 939A
E66E 939B
E66F 939C
E670 939D
E671 939E
E672 939F
E673 93A0
E674 93A1
E675 93A2
E676 93A3
E677 93A4
E678 93A5
E679 93A6
E67A 93A7
E67B 93A8
E67C 93A9
E67D 93AA
E67E 93AB
E680 93AC
E681 93AD
E682 93AE
E683 93AF
E684 93B0
E685 93B1
E686 93B2
E687 93B3
E688 93B4
E689 93B5
E68A 93B6
E68B 93B7
E68C 93B8
E68D 93B9
E68E 93BA
E68F 93BB
E690 93BC
E691 93BD
E692 93BE
E693 93BF
E694 93C0
E695 93C1
E696 93C2
E697 93C3
E698 93C4
E699 93C5
E69A 93C6
E69B 93C7
E69C 93C8
E69D 93C9
E69E 93CB
E69F 93CC
E6A0 93CD
E6A1 5997
E6A2 59CA
E6A3 59AB
E6A4 599E
E6A5 59A4
E6A6 59D2
E6A7 59B2
E6A8 59AF
E6A9 59D7
E6AA 59BE
E6AB 5A05
E6AC 5A06
E6AD 59DD
E6AE 5A08
E6AF 59E3
E6B0 59D8
E6B1 59F9
E6B2 5A0C
E6B3 5A09
E6B4 5A32
E6B5 5A34
E6B6 5A11
E6B7 5A23
E6B8 5A13
E6B9 5A40
E6BA 5A67
E6BB 5A4A
E6BC 5A55
E6BD 5A3C
E6BE 5A62
E6BF 5A75
E6C0 80EC
E6C1 5AAA
E6C2 5A9B
E6C3 5A77
E6C4 5A7A
E6C5 5ABE
E6C6 5AEB
E6C7 5AB2
E6C8 5AD2
E6C9 5AD4
E6CA 5AB8
E6CB 5AE0
E6CC 5AE3
E6CD 5AF1
E6CE 5AD6
E6CF 5AE6
E6D0 5AD8
E6D1 5ADC
E6D2 5B09
E6D3 5B17
E6D4 5B16
E6D5 5B32
E6D6 5B37
E6D7 5B40
E6D8 5C15
E6D9 5C1C
E6DA 5B5A
E6DB 5B65
E6DC 5B73
E6DD 5B51
E6DE 5B53
E6DF 5B62
E6E0 9A75
E6E1 9A77
E6E2 9A78
E6E3 9A7A
E6E4 9A7F
E6E5 9A7D
E6E6 9A80
E6E7 9A81
E6E8 9A85
E6E9 9A88
E6EA 9A8A
E6EB 9A90
E6EC 9A92
E6ED 9A93
E6EE 9A96
E6EF 9A98
E6F0 9A9B
E6F1 9A9C
E6F2 9A9D
E6F3 9A9F
E6F4 9AA0
E6F5 9AA2
E6F6 9AA3
E6F7 9AA5
E6F8 9AA7
E6F9 7E9F
E6FA 7EA1
E6FB 7EA3
E6FC 7EA5
E6FD 7EA8
E6FE 7EA9
E740 93CE
E741 93CF
E742 93D0
E743 93D1
E744 93D2
E745 93D3
E746 93D4
E747 93D5
E748 93D7
E749 93D8
E74A 93D9
E74B 93DA
E74C 93DB
E74D 93DC
E74E 93DD
E74F 93DE
E750 93DF
E751 93E0
E752 93E1
E753 93E2
E754 93E3
E755 93E4
E756 93E5
E757 93E6
E758 93E7
E759 93E8
E75A 93E9
E75B 93EA
E75C 93EB
E75D 93EC
E75E 93ED
E75F 93EE
E760 93EF
E761 93F0
E762 93F1
E763 93F2
E764 93F3
E765 93F4
E766 93F5
E767 93F6
E768 93F7
E769 93F8
E76A 93F9
E76B 93FA
E76C 93FB
E76D 93FC
E76E 93FD
E76F 93FE
E770 93FF
E771 9400
E772 9401
E773 9402
E774 9403
E775 9404
E776 9405
E777 9406
E778 9407
E779 9408
E77A 9409
E77B 940A
E77C 940B
E77D 940C
E77E 940D
E780 940E
E781 940F
E782 9410
E783 9411
E784 9412
E785 9413
E786 9414
E787 9415
E788 9416
E789 9417
E78A 9418
E78B 9419
E78C 941A
E78D 941B
E78E 941C
E78F 941D
E790 941E
E791 941F
E792 9420
E793 9421
E794 9422
E795 9423
E796 9424
E797 9425
E798 9426
E799 9427
E79A 9428
E79B 9429
E79C 942A
E79D 942B
E79E 942C
E79F 942D
E7A0 942E
E7A1 7EAD
E7A2 7EB0
E7A3 7EBE
E7A4 7EC0
E7A5 7EC1
E7A6 7EC2
E7A7 7EC9
E7A8 7ECB
E7A9 7ECC
E7AA 7ED0
E7AB 7ED4
E7AC 7ED7
E7AD 7EDB
E7AE 7EE0
E7AF 7EE1
E7B0 7EE8
E7B1 7EEB
E7B2 7EEE
E7B3 7EEF
E7B4 7EF1
E7B5 7EF2
E7B6 7F0D
E7B7 7EF6
E7B8 7EFA
E7B9 7EFB
E7BA 7EFE
E7BB 7F01
E7BC 7F02
E7BD 7F03
E7BE 7F07
E7BF 7F08
E7C0 7F0B
E7C1 7F0C
E7C2 7F0F
E7C3 7F11
E7C4 7F12
E7C5 7F17
E7C6 7F19
E7C7 7F1C
E7C8 7F1B
E7C9 7F1F
E7CA 7F21
E7CB 7F22
E7CC 7F23
E7CD 7F24
E7CE 7F25
E7CF 7F26
E7D0 7F27
E7D1 7F2A
E7D2 7F2B
E7D3 7F2C
E7D4 7F2D
E7D5 7F2F
E7D6 7F30
E7D7 7F31
E7D8 7F32
E7D9 7F33
E7DA 7F35
E7DB 5E7A
E7DC 757F
E7DD 5DDB
E7DE 753E
E7DF 9095
E7E0 738E
E7E1 7391
E7E2 73AE
E7E3 73A2
E7E4 739F
E7E5 73CF
E7E6 73C2
E7E7 73D1
E7E8 73B7
E7E9 73B3
E7EA 73C0
E7EB 73C9
E7EC 73C8
E7ED 73E5
E7EE 73D9
E7EF 987C
E7F0 740A
E7F1 73E9
E7F2 73E7
E7F3 73DE
E7F4 73BA
E7F5 73F2
E7F6 740F
E7F7 742A
E7F8 745B
E7F9 7426
E7FA 7425
E7FB 7428
E7FC 7430
E7FD 742E
E7FE 742C
E840 942F
E841 9430
E842 9431
E843 9432
E844 9433
E845 9434
E846 9435
E847 9436
E848 9437
E849 9438
E84A 9439
E84B 943A
E84C 943B
E84D 943C
E84E 943D
E84F 943F
E850 9440
E851 9441
E852 9442
E853 9443
E854 9444
E855 9445
E856 9446
E857 9447
E858 9448
E859 9449
E85A 944A
E85B 944B
E85C 944C
E85D 944D
E85E 944E
E85F 944F
E860 9450
E861 9451
E862 9452
E863 9453
E864 9454
E865 9455
E866 9456
E867 9457
E868 9458
E869 9459
E86A 945A
E86B 945B
E86C 945C
E86D 945D
E86E 945E
E86F 945F
E870 9460
E871 9461
E872 9462
E873 9463
E874 9464
E875 9465
E876 9466
E877 9467
E878 9468
E879 9469
E87A 946A
E87B 946C
E87C 946D
E87D 946E
E87E 946F
E880 9470
E881 9471
E882 9472
E883 9473
E884 9474
E885 9475
E886 9476
E887 9477
E888 9478
E889 9479
E88A 947A
E88B 947B
E88C 947C
E88D 947D
E88E 947E
E88F 947F
E890 9480
E891 9481
E892 9482
E893 9483
E894 9484
E895 9491
E896 9496
E897 9498
E898 94C7
E899 94CF
E89A 94D3
E89B 94D4
E89C 94DA
E89D 94E6
E89E 94FB
E89F 951C
E8A0 9520
E8A1 741B
E8A2 741A
E8A3 7441
E8A4 745C
E8A5 7457
E8A6 7455
E8A7 7459
E8A8 7477
E8A9 746D
E8AA 747E
E8AB 749C
E8AC 748E
E8AD 7480
E8AE 7481
E8AF 7487
E8B0 748B
E8B1 749E
E8B2 74A8
E8B3 74A9
E8B4 7490
E8B5 74A7
E8B6 74D2
E8B7 74BA
E8B8 97EA
E8B9 97EB
E8BA 97EC
E8BB 674C
E8BC 6753
E8BD 675E
E8BE 6748
E8BF 6769
E8C0 67A5
E8C1 6787
E8C2 676A
E8C3 6773
E8C4 6798
E8C5 67A7
E8C6 6775
E8C7 67A8
E8C8 679E
E8C9 67AD
E8CA 678B
E8CB 6777
E8CC 677C
E8CD 67F0
E8CE 6809
E8CF 67D8
E8D0 680A
E8D1 67E9
E8D2 67B0
E8D3 680C
E8D4 67D9
E8D5 67B5
E8D6 67DA
E8D7 67B3
E8D8 67DD
E8D9 6800
E8DA 67C3
E8DB 67B8
E8DC 67E2
E8DD 680E
E8DE 67C1
E8DF 67FD
E8E0 6832
E8E1 6833
E8E2 6860
E8E3 6861
E8E4 684E
E8E5 6862
E8E6 6844
E8E7 6864
E8E8 6883
E8E9 681D
E8EA 6855
E8EB 6866
E8EC 6841
E8ED 6867
E8EE 6840
E8EF 683E
E8F0 684A
E8F1 6849
E8F2 6829
E8F3 68B5
E8F4 688F
E8F5 6874
E8F6 6877
E8F7 6893
E8F8 686B
E8F9 68C2
E8FA 696E
E8FB 68FC
E8FC 691F
E8FD 6920
E8FE 68F9
E940 9527
E941 9533
E942 953D
E943 9543
E944 9548
E945 954B
E946 9555
E947 955A
E948 9560
E949 956E
E94A 9574
E94B 9575
E94C 9577
E94D 9578
E94E 9579
E94F 957A
E950 957B
E951 957C
E952 957D
E953 957E
E954 9580
E955 9581
E956 9582
E957 9583
E958 9584
E959 9585
E95A 9586
E95B 9587
E95C 9588
E95D 9589
E95E 958A
E95F 958B
E960 958C
E961 958D
E962 958E
E963 958F
E964 9590
E965 9591
E966 9592
E967 9593
E968 9594
E969 9595
E96A 9596
E96B 9597
E96C 9598
E96D 9599
E96E 959A
E96F 959B
E970 959C
E971 959D
E972 959E
E973 959F
E974 95A0
E975 95A1
E976 95A2
E977 95A3
E978 95A4
E979 95A5
E97A 95A6
E97B 95A7
E97C 95A8
E97D 95A9
E97E 95AA
E980 95AB
E981 95AC
E982 95AD
E983 95AE
E984 95AF
E985 95B0
E986 95B1
E987 95B2
E988 95B3
E989 95B4
E98A 95B5
E98B 95B6
E98C 95B7
E98D 95B8
E98E 95B9
E98F 95BA
E990 95BB
E991 95BC
E992 95BD
E993 95BE
E994 95BF
E995 95C0
E996 95C1
E997 95C2
E998 95C3
E999 95C4
E99A 95C5
E99B 95C6
E99C 95C7
E99D 95C8
E99E 95C9
E99F 95CA
E9A0 95CB
E9A1 6924
E9A2 68F0
E9A3 690B
E9A4 6901
E9A5 6957
E9A6 68E3
E9A7 6910
E9A8 6971
E9A9 6939
E9AA 6960
E9AB 6942
E9AC 695D
E9AD 6984
E9AE 696B
E9AF 6980
E9B0 6998
E9B1 6978
E9B2 6934
E9B3 69CC
E9B4 6987
E9B5 6988
E9B6 69CE
E9B7 6989
E9B8 6966
E9B9 6963
E9BA 6979
E9BB 699B
E9BC 69A7
E9BD 69BB
E9BE 69AB
E9BF 69AD
E9C0 69D4
E9C1 69B1
E9C2 69C1
E9C3 69CA
E9C4 69DF
E9C5 6995
E9C6 69E0
E9C7 698D
E9C8 69FF
E9C9 6A2F
E9CA 69ED
E9CB 6A17
E9CC 6A18
E9CD 6A65
E9CE 69F2
E9CF 6A44
E9D0 6A3E
E9D1 6AA0
E9D2 6A50
E9D3 6A5B
E9D4 6A35
E9D5 6A8E
E9D6 6A79
E9D7 6A3D
E9D8 6A28
E9D9 6A58
E9DA 6A7C
E9DB 6A91
E9DC 6A90
E9DD 6AA9
E9DE 6A97
E9DF 6AAB
E9E0 7337
E9E1 7352
E9E2 6B81
E9E3 6B82
E9E4 6B87
E9E5 6B84
E9E6 6B92
E9E7 6B93
E9E8 6B8D
E9E9 6B9A
E9EA 6B9B
E9EB 6BA1
E9EC 6BAA
E9ED 8F6B
E9EE 8F6D
E9EF 8F71
E9F0 8F72
E9F1 8F73
E9F2 8F75
E9F3 8F76
E9F4 8F78
E9F5 8F77
E9F6 8F79
E9F7 8F7A
E9F8 8F7C
E9F9 8F7E
E9FA 8F81
E9FB 8F82
E9FC 8F84
E9FD 8F87
E9FE 8F8B
EA40 95CC
EA41 95CD
EA42 95CE
EA43 95CF
EA44 95D0
EA45 95D1
EA46 95D2
EA47 95D3
EA48 95D4
EA49 95D5
EA4A 95D6
EA4B 95D7
EA4C 95D8
EA4D 95D9
EA4E 95DA
EA4F 95DB
EA50 95DC
EA51 95DD
EA52 95DE
EA53 95DF
EA54 95E0
EA55 95E1
EA56 95E2
EA57 95E3
EA58 95E4
EA59 95E5
EA5A 95E6
EA5B 95E7
EA5C 95EC
EA5D 95FF
EA5E 9607
EA5F 9613
EA60 9618
EA61 961B
EA62 961E
EA63 9620
EA64 9623
EA65 9624
EA66 9625
EA67 9626
EA68 9627
EA69 9628
EA6A 9629
EA6B 962B
EA6C 962C
EA6D 962D
EA6E 962F
EA6F 9630
EA70 9637
EA71 9638
EA72 9639
EA73 963A
EA74 963E
EA75 9641
EA76 9643
EA77 964A
EA78 964E
EA79 964F
EA7A 9651
EA7B 9652
EA7C 9653
EA7D 9656
EA7E 9657
EA80 9658
EA81 9659
EA82 965A
EA83 965C
EA84 965D
EA85 965E
EA86 9660
EA87 9663
EA88 9665
EA89 9666
EA8A 966B
EA8B 966D
EA8C 966E
EA8D 966F
EA8E 9670
EA8F 9671
EA90 9673
EA91 9678
EA92 9679
EA93 967A
EA94 967B
EA95 967C
EA96 967D
EA97 967E
EA98 967F
EA99 9680
EA9A 9681
EA9B 9682
EA9C 9683
EA9D 9684
EA9E 9687
EA9F 9689
EAA0 968A
EAA1 8F8D
EAA2 8F8E
EAA3 8F8F
EAA4 8F98
EAA5 8F9A
EAA6 8ECE
EAA7 620B
EAA8 6217
EAA9 621B
EAAA 621F
EAAB 6222
EAAC 6221
EAAD 6225
EAAE 6224
EAAF 622C
EAB0 81E7
EAB1 74EF
EAB2 74F4
EAB3 74FF
EAB4 750F
EAB5 7511
EAB6 7513
EAB7 6534
EAB8 65EE
EAB9 65EF
EABA 65F0
EABB 660A
EABC 6619
EABD 6772
EABE 6603
EABF 6615
EAC0 6600
EAC1 7085
EAC2 66F7
EAC3 661D
EAC4 6634
EAC5 6631
EAC6 6636
EAC7 6635
EAC8 8006
EAC9 665F
EACA 6654
EACB 6641
EACC 664F
EACD 6656
EACE 6661
EACF 6657
EAD0 6677
EAD1 6684
EAD2 668C
EAD3 66A7
EAD4 669D
EAD5 66BE
EAD6 66DB
EAD7 66DC
EAD8 66E6
EAD9 66E9
EADA 8D32
EADB 8D33
EADC 8D36
EADD 8D3B
EADE 8D3D
EADF 8D40
EAE0 8D45
EAE1 8D46
EAE2 8D48
EAE3 8D49
EAE4 8D47
EAE5 8D4D
EAE6 8D55
EAE7 8D59
EAE8 89C7
EAE9 89CA
EAEA 89CB
EAEB 89CC
EAEC 89CE
EAED 89CF
EAEE 89D0
EAEF 89D1
EAF0 726E
EAF1 729F
EAF2 725D
EAF3 7266
EAF4 726F
EAF5 727E
EAF6 727F
EAF7 7284
EAF8 728B
EAF9 728D
EAFA 728F
EAFB 7292
EAFC 6308
EAFD 6332
EAFE 63B0
EB40 968C
EB41 968E
EB42 9691
EB43 9692
EB44 9693
EB45 9695
EB46 9696
EB47 969A
EB48 969B
EB49 969D
EB4A 969E
EB4B 969F
EB4C 96A0
EB4D 96A1
EB4E 96A2
EB4F 96A3
EB50 96A4
EB51 96A5
EB52 96A6
EB53 96A8
EB54 96A9
EB55 96AA
EB56 96AB
EB57 96AC
EB58 96AD
EB59 96AE
EB5A 96AF
EB5B 96B1
EB5C 96B2
EB5D 96B4
EB5E 96B5
EB5F 96B7
EB60 96B8
EB61 96BA
EB62 96BB
EB63 96BF
EB64 96C2
EB65 96C3
EB66 96C8
EB67 96CA
EB68 96CB
EB69 96D0
EB6A 96D1
EB6B 96D3
EB6C 96D4
EB6D 96D6
EB6E 96D7
EB6F 96D8
EB70 96D9
EB71 96DA
EB72 96DB
EB73 96DC
EB74 96DD
EB75 96DE
EB76 96DF
EB77 96E1
EB78 96E2
EB79 96E3
EB7A 96E4
EB7B 96E5
EB7C 96E6
EB7D 96E7
EB7E 96EB
EB80 96EC
EB81 96ED
EB82 96EE
EB83 96F0
EB84 96F1
EB85 96F2
EB86 96F4
EB87 96F5
EB88 96F8
EB89 96FA
EB8A 96FB
EB8B 96FC
EB8C 96FD
EB8D 96FF
EB8E 9702
EB8F 9703
EB90 9705
EB91 970A
EB92 970B
EB93 970C
EB94 9710
EB95 9711
EB96 9712
EB97 9714
EB98 9715
EB99 9717
EB9A 9718
EB9B 9719
EB9C 971A
EB9D 971B
EB9E 971D
EB9F 971F
EBA0 9720
EBA1 643F
EBA2 64D8
EBA3 8004
EBA4 6BEA
EBA5 6BF3
EBA6 6BFD
EBA7 6BF5
EBA8 6BF9
EBA9 6C05
EBAA 6C07
EBAB 6C06
EBAC 6C0D
EBAD 6C15
EBAE 6C18
EBAF 6C19
EBB0 6C1A
EBB1 6C21
EBB2 6C29
EBB3 6C24
EBB4 6C2A
EBB5 6C32
EBB6 6535
EBB7 6555
EBB8 656B
EBB9 724D
EBBA 7252
EBBB 7256
EBBC 7230
EBBD 8662
EBBE 5216
EBBF 809F
EBC0 809C
EBC1 8093
EBC2 80BC
EBC3 670A
EBC4 80BD
EBC5 80B1
EBC6 80AB
EBC7 80AD
EBC8 80B4
EBC9 80B7
EBCA 80E7
EBCB 80E8
EBCC 80E9
EBCD 80EA
EBCE 80DB
EBCF 80C2
EBD0 80C4
EBD1 80D9
EBD2 80CD
EBD3 80D7
EBD4 6710
EBD5 80DD
EBD6 80EB
EBD7 80F1
EBD8 80F4
EBD9 80ED
EBDA 810D
EBDB 810E
EBDC 80F2
EBDD 80FC
EBDE 6715
EBDF 8112
EBE0 8C5A
EBE1 8136
EBE2 811E
EBE3 812C
EBE4 8118
EBE5 8132
EBE6 8148
EBE7 814C
EBE8 8153
EBE9 8174
EBEA 8159
EBEB 815A
EBEC 8171
EBED 8160
EBEE 8169
EBEF 817C
EBF0 817D
EBF1 816D
EBF2 8167
EBF3 584D
EBF4 5AB5
EBF5 8188
EBF6 8182
EBF7 8191
EBF8 6ED5
EBF9 81A3
EBFA 81AA
EBFB 81CC
EBFC 6726
EBFD 81CA
EBFE 81BB
EC40 9721
EC41 9722
EC42 9723
EC43 9724
EC44 9725
EC45 9726
EC46 9727
EC47 9728
EC48 9729
EC49 972B
EC4A 972C
EC4B 972E
EC4C 972F
EC4D 9731
EC4E 9733
EC4F 9734
EC50 9735
EC51 9736
EC52 9737
EC53 973A
EC54 973B
EC55 973C
EC56 973D
EC57 973F
EC58 9740
EC59 9741
EC5A 9742
EC5B 9743
EC5C 9744
EC5D 9745
EC5E 9746
EC5F 9747
EC60 9748
EC61 9749
EC62 974A
EC63 974B
EC64 974C
EC65 974D
EC66 974E
EC67 974F
EC68 9750
EC69 9751
EC6A 9754
EC6B 9755
EC6C 9757
EC6D 9758
EC6E 975A
EC6F 975C
EC70 975D
EC71 975F
EC72 9763
EC73 9764
EC74 9766
EC75 9767
EC76 9768
EC77 976A
EC78 976B
EC79 976C
EC7A 976D
EC7B 976E
EC7C 976F
EC7D 9770
EC7E 9771
EC80 9772
EC81 9775
EC82 9777
EC83 9778
EC84 9779
EC85 977A
EC86 977B
EC87 977D
EC88 977E
EC89 977F
EC8A 9780
EC8B 9781
EC8C 9782
EC8D 9783
EC8E 9784
EC8F 9786
EC90 9787
EC91 9788
EC92 9789
EC93 978A
EC94 978C
EC95 978E
EC96 978F
EC97 9790
EC98 9793
EC99 9795
EC9A 9796
EC9B 9797
EC9C 9799
EC9D 979A
EC9E 979B
EC9F 979C
ECA0 979D
ECA1 81C1
ECA2 81A6
ECA3 6B24
ECA4 6B37
ECA5 6B39
ECA6 6B43
ECA7 6B46
ECA8 6B59
ECA9 98D1
ECAA 98D2
ECAB 98D3
ECAC 98D5
ECAD 98D9
ECAE 98DA
ECAF 6BB3
ECB0 5F40
ECB1 6BC2
ECB2 89F3
ECB3 6590
ECB4 9F51
ECB5 6593
ECB6 65BC
ECB7 65C6
ECB8 65C4
ECB9 65C3
ECBA 65CC
ECBB 65CE
ECBC 65D2
ECBD 65D6
ECBE 7080
ECBF 709C
ECC0 7096
ECC1 709D
ECC2 70BB
ECC3 70C0
ECC4 70B7
ECC5 70AB
ECC6 70B1
ECC7 70E8
ECC8 70CA
ECC9 7110
ECCA 7113
ECCB 7116
ECCC 712F
ECCD 7131
ECCE 7173
ECCF 715C
ECD0 7168
ECD1 7145
ECD2 7172
ECD3 714A
ECD4 7178
ECD5 717A
ECD6 7198
ECD7 71B3
ECD8 71B5
ECD9 71A8
ECDA 71A0
ECDB 71E0
ECDC 71D4
ECDD 71E7
ECDE 71F9
ECDF 721D
ECE0 7228
ECE1 706C
ECE2 7118
ECE3 7166
ECE4 71B9
ECE5 623E
ECE6 623D
ECE7 6243
ECE8 6248
ECE9 6249
ECEA 793B
ECEB 7940
ECEC 7946
ECED 7949
ECEE 795B
ECEF 795C
ECF0 7953
ECF1 795A
ECF2 7962
ECF3 7957
ECF4 7960
ECF5 796F
ECF6 7967
ECF7 797A
ECF8 7985
ECF9 798A
ECFA 799A
ECFB 79A7
ECFC 79B3
ECFD 5FD1
ECFE 5FD0
ED40 979E
ED41 979F
ED42 97A1
ED43 97A2
ED44 97A4
ED45 97A5
ED46 97A6
ED47 97A7
ED48 97A8
ED49 97A9
ED4A 97AA
ED4B 97AC
ED4C 97AE
ED4D 97B0
ED4E 97B1
ED4F 97B3
ED50 97B5
ED51 97B6
ED52 97B7
ED53 97B8
ED54 97B9
ED55 97BA
ED56 97BB
ED57 97BC
ED58 97BD
ED59 97BE
ED5A 97BF
ED5B 97C0
ED5C 97C1
ED5D 97C2
ED5E 97C3
ED5F 97C4
ED60 97C5
ED61 97C6
ED62 97C7
ED63 97C8
ED64 97C9
ED65 97CA
ED66 97CB
ED67 97CC
ED68 97CD
ED69 97CE
ED6A 97CF
ED6B 97D0
ED6C 97D1
ED6D 97D2
ED6E 97D3
ED6F 97D4
ED70 97D5
ED71 97D6
ED72 97D7
ED73 97D8
ED74 97D9
ED75 97DA
ED76 97DB
ED77 97DC
ED78 97DD
ED79 97DE
ED7A 97DF
ED7B 97E0
ED7C 97E1
ED7D 97E2
ED7E 97E3
ED80 97E4
ED81 97E5
ED82 97E8
ED83 97EE
ED84 97EF
ED85 97F0
ED86 97F1
ED87 97F2
ED88 97F4
ED89 97F7
ED8A 97F8
ED8B 97F9
ED8C 97FA
ED8D 97FB
ED8E 97FC
ED8F 97FD
ED90 97FE
ED91 97FF
ED92 9800
ED93 9801
ED94 9802
ED95 9803
ED96 9804
ED97 9805
ED98 9806
ED99 9807
ED9A 9808
ED9B 9809
ED9C 980A
ED9D 980B
ED9E 980C
ED9F 980D
EDA0 980E
EDA1 603C
EDA2 605D
EDA3 605A
EDA4 6067
EDA5 6041
EDA6 6059
EDA7 6063
EDA8 60AB
EDA9 6106
EDAA 610D
EDAB 615D
EDAC 61A9
EDAD 619D
EDAE 61CB
EDAF 61D1
EDB0 6206
EDB1 8080
EDB2 807F
EDB3 6C93
EDB4 6CF6
EDB5 6DFC
EDB6 77F6
EDB7 77F8
EDB8 7800
EDB9 7809
EDBA 7817
EDBB 7818
EDBC 7811
EDBD 65AB
EDBE 782D
EDBF 781C
EDC0 781D
EDC1 7839
EDC2 783A
EDC3 783B
EDC4 781F
EDC5 783C
EDC6 7825
EDC7 782C
EDC8 7823
EDC9 7829
EDCA 784E
EDCB 786D
EDCC 7856
EDCD 7857
EDCE 7826
EDCF 7850
EDD0 7847
EDD1 784C
EDD2 786A
EDD3 789B
EDD4 7893
EDD5 789A
EDD6 7887
EDD7 789C
EDD8 78A1
EDD9 78A3
EDDA 78B2
EDDB 78B9
EDDC 78A5
EDDD 78D4
EDDE 78D9
EDDF 78C9
EDE0 78EC
EDE1 78F2
EDE2 7905
EDE3 78F4
EDE4 7913
EDE5 7924
EDE6 791E
EDE7 7934
EDE8 9F9B
EDE9 9EF9
EDEA 9EFB
EDEB 9EFC
EDEC 76F1
EDED 7704
EDEE 770D
EDEF 76F9
EDF0 7707
EDF1 7708
EDF2 771A
EDF3 7722
EDF4 7719
EDF5 772D
EDF6 7726
EDF7 7735
EDF8 7738
EDF9 7750
EDFA 7751
EDFB 7747
EDFC 7743
EDFD 775A
EDFE 7768
EE40 980F
EE41 9810
EE42 9811
EE43 9812
EE44 9813
EE45 9814
EE46 9815
EE47 9816
EE48 9817
EE49 9818
EE4A 9819
EE4B 981A
EE4C 981B
EE4D 981C
EE4E 981D
EE4F 981E
EE50 981F
EE51 9820
EE52 9821
EE53 9822
EE54 9823
EE55 9824
EE56 9825
EE57 9826
EE58 9827
EE59 9828
EE5A 9829
EE5B 982A
EE5C 982B
EE5D 982C
EE5E 982D
EE5F 982E
EE60 982F
EE61 9830
EE62 9831
EE63 9832
EE64 9833
EE65 9834
EE66 9835
EE67 9836
EE68 9837
EE69 9838
EE6A 9839
EE6B 983A
EE6C 983B
EE6D 983C
EE6E 983D
EE6F 983E
EE70 983F
EE71 9840
EE72 9841
EE73 9842
EE74 9843
EE75 9844
EE76 9845
EE77 9846
EE78 9847
EE79 9848
EE7A 9849
EE7B 984A
EE7C 984B
EE7D 984C
EE7E 984D
EE80 984E
EE81 984F
EE82 9850
EE83 9851
EE84 9852
EE85 9853
EE86 9854
EE87 9855
EE88 9856
EE89 9857
EE8A 9858
EE8B 9859
EE8C 985A
EE8D 985B
EE8E 985C
EE8F 985D
EE90 985E
EE91 985F
EE92 9860
EE93 9861
EE94 9862
EE95 9863
EE96 9864
EE97 9865
EE98 9866
EE99 9867
EE9A 9868
EE9B 9869
EE9C 986A
EE9D 986B
EE9E 986C
EE9F 986D
EEA0 986E
EEA1 7762
EEA2 7765
EEA3 777F
EEA4 778D
EEA5 777D
EEA6 7780
EEA7 778C
EEA8 7791
EEA9 779F
EEAA 77A0
EEAB 77B0
EEAC 77B5
EEAD 77BD
EEAE 753A
EEAF 7540
EEB0 754E
EEB1 754B
EEB2 7548
EEB3 755B
EEB4 7572
EEB5 7579
EEB6 7583
EEB7 7F58
EEB8 7F61
EEB9 7F5F
EEBA 8A48
EEBB 7F68
EEBC 7F74
EEBD 7F71
EEBE 7F79
EEBF 7F81
EEC0 7F7E
EEC1 76CD
EEC2 76E5
EEC3 8832
EEC4 9485
EEC5 9486
EEC6 9487
EEC7 948B
EEC8 948A
EEC9 948C
EECA 948D
EECB 948F
EECC 9490
EECD 9494
EECE 9497
EECF 9495
EED0 949A
EED1 949B
EED2 949C
EED3 94A3
EED4 94A4
EED5 94AB
EED6 94AA
EED7 94AD
EED8 94AC
EED9 94AF
EEDA 94B0
EEDB 94B2
EEDC 94B4
EEDD 94B6
EEDE 94B7
EEDF 94B8
EEE0 94B9
EEE1 94BA
EEE2 94BC
EEE3 94BD
EEE4 94BF
EEE5 94C4
EEE6 94C8
EEE7 94C9
EEE8 94CA
EEE9 94CB
EEEA 94CC
EEEB 94CD
EEEC 94CE
EEED 94D0
EEEE 94D1
EEEF 94D2
EEF0 94D5
EEF1 94D6
EEF2 94D7
EEF3 94D9
EEF4 94D8
EEF5 94DB
EEF6 94DE
EEF7 94DF
EEF8 94E0
EEF9 94E2
EEFA 94E4
EEFB 94E5
EEFC 94E7
EEFD 94E8
EEFE 94EA
EF40 986F
EF41 9870
EF42 9871
EF43 9872
EF44 9873
EF45 9874
EF46 988B
EF47 988E
EF48 9892
EF49 9895
EF4A 9899
EF4B 98A3
EF4C 98A8
EF4D 98A9
EF4E 98AA
EF4F 98AB
EF50 98AC
EF51 98AD
EF52 98AE
EF53 98AF
EF54 98B0
EF55 98B1
EF56 98B2
EF57 98B3
EF58 98B4
EF59 98B5
EF5A 98B6
EF5B 98B7
EF5C 98B8
EF5D 98B9
EF5E 98BA
EF5F 98BB
EF60 98BC
EF61 98BD
EF62 98BE
EF63 98BF
EF64 98C0
EF65 98C1
EF66 98C2
EF67 98C3
EF68 98C4
EF69 98C5
EF6A 98C6
EF6B 98C7
EF6C 98C8
EF6D 98C9
EF6E 98CA
EF6F 98CB
EF70 98CC
EF71 98CD
EF72 98CF
EF73 98D0
EF74 98D4
EF75 98D6
EF76 98D7
EF77 98DB
EF78 98DC
EF79 98DD
EF7A 98E0
EF7B 98E1
EF7C 98E2
EF7D 98E3
EF7E 98E4
EF80 98E5
EF81 98E6
EF82 98E9
EF83 98EA
EF84 98EB
EF85 98EC
EF86 98ED
EF87 98EE
EF88 98EF
EF89 98F0
EF8A 98F1
EF8B 98F2
EF8C 98F3
EF8D 98F4
EF8E 98F5
EF8F 98F6
EF90 98F7
EF91 98F8
EF92 98F9
EF93 98FA
EF94 98FB
EF95 98FC
EF96 98FD
EF97 98FE
EF98 98FF
EF99 9900
EF9A 9901
EF9B 9902
EF9C 9903
EF9D 9904
EF9E 9905
EF9F 9906
EFA0 9907
EFA1 94E9
EFA2 94EB
EFA3 94EE
EFA4 94EF
EFA5 94F3
EFA6 94F4
EFA7 94F5
EFA8 94F7
EFA9 94F9
EFAA 94FC
EFAB 94FD
EFAC 94FF
EFAD 9503
EFAE 9502
EFAF 9506
EFB0 9507
EFB1 9509
EFB2 950A
EFB3 950D
EFB4 950E
EFB5 950F
EFB6 9512
EFB7 9513
EFB8 9514
EFB9 9515
EFBA 9516
EFBB 9518
EFBC 951B
EFBD 951D
EFBE 951E
EFBF 951F
EFC0 9522
EFC1 952A
EFC2 952B
EFC3 9529
EFC4 952C
EFC5 9531
EFC6 9532
EFC7 9534
EFC8 9536
EFC9 9537
EFCA 9538
EFCB 953C
EFCC 953E
EFCD 953F
EFCE 9542
EFCF 9535
EFD0 9544
EFD1 9545
EFD2 9546
EFD3 9549
EFD4 954C
EFD5 954E
EFD6 954F
EFD7 9552
EFD8 9553
EFD9 9554
EFDA 9556
EFDB 9557
EFDC 9558
EFDD 9559
EFDE 955B
EFDF 955E
EFE0 955F
EFE1 955D
EFE2 9561
EFE3 9562
EFE4 9564
EFE5 9565
EFE6 9566
EFE7 9567
EFE8 9568
EFE9 9569
EFEA 956A
EFEB 956B
EFEC 956C
EFED 956F
EFEE 9571
EFEF 9572
EFF0 9573
EFF1 953A
EFF2 77E7
EFF3 77EC
EFF4 96C9
EFF5 79D5
EFF6 79ED
EFF7 79E3
EFF8 79EB
EFF9 7A06
EFFA 5D47
EFFB 7A03
EFFC 7A02
EFFD 7A1E
EFFE 7A14
F040 9908
F041 9909
F042 990A
F043 990B
F044 990C
F045 990E
F046 990F
F047 9911
F048 9912
F049 9913
F04A 9914
F04B 9915
F04C 9916
F04D 9917
F04E 9918
F04F 9919
F050 991A
F051 991B
F052 991C
F053 991D
F054 991E
F055 991F
F056 9920
F057 9921
F058 9922
F059 9923
F05A 9924
F05B 9925
F05C 9926
F05D 9927
F05E 9928
F05F 9929
F060 992A
F061 992B
F062 992C
F063 992D
F064 992F
F065 9930
F066 9931
F067 9932
F068 9933
F069 9934
F06A 9935
F06B 9936
F06C 9937
F06D 9938
F06E 9939
F06F 993A
F070 993B
F071 993C
F072 993D
F073 993E
F074 993F
F075 9940
F076 9941
F077 9942
F078 9943
F079 9944
F07A 9945
F07B 9946
F07C 9947
F07D 9948
F07E 9949
F080 994A
F081 994B
F082 994C
F083 994D
F084 994E
F085 994F
F086 9950
F087 9951
F088 9952
F089 9953
F08A 9956
F08B 9957
F08C 9958
F08D 9959
F08E 995A
F08F 995B
F090 995C
F091 995D
F092 995E
F093 995F
F094 9960
F095 9961
F096 9962
F097 9964
F098 9966
F099 9973
F09A 9978
F09B 9979
F09C 997B
F09D 997E
F09E 9982
F09F 9983
F0A0 9989
F0A1 7A39
F0A2 7A37
F0A3 7A51
F0A4 9ECF
F0A5 99A5
F0A6 7A70
F0A7 7688
F0A8 768E
F0A9 7693
F0AA 7699
F0AB 76A4
F0AC 74DE
F0AD 74E0
F0AE 752C
F0AF 9E20
F0B0 9E22
F0B1 9E28
F0B2 9E29
F0B3 9E2A
F0B4 9E2B
F0B5 9E2C
F0B6 9E32
F0B7 9E31
F0B8 9E36
F0B9 9E38
F0BA 9E37
F0BB 9E39
F0BC 9E3A
F0BD 9E3E
F0BE 9E41
F0BF 9E42
F0C0 9E44
F0C1 9E46
F0C2 9E47
F0C3 9E48
F0C4 9E49
F0C5 9E4B
F0C6 9E4C
F0C7 9E4E
F0C8 9E51
F0C9 9E55
F0CA 9E57
F0CB 9E5A
F0CC 9E5B
F0CD 9E5C
F0CE 9E5E
F0CF 9E63
F0D0 9E66
F0D1 9E67
F0D2 9E68
F0D3 9E69
F0D4 9E6A
F0D5 9E6B
F0D6 9E6C
F0D7 9E71
F0D8 9E6D
F0D9 9E73
F0DA 7592
F0DB 7594
F0DC 7596
F0DD 75A0
F0DE 759D
F0DF 75AC
F0E0 75A3
F0E1 75B3
F0E2 75B4
F0E3 75B8
F0E4 75C4
F0E5 75B1
F0E6 75B0
F0E7 75C3
F0E8 75C2
F0E9 75D6
F0EA 75CD
F0EB 75E3
F0EC 75E8
F0ED 75E6
F0EE 75E4
F0EF 75EB
F0F0 75E7
F0F1 7603
F0F2 75F1
F0F3 75FC
F0F4 75FF
F0F5 7610
F0F6 7600
F0F7 7605
F0F8 760C
F0F9 7617
F0FA 760A
F0FB 7625
F0FC 7618
F0FD 7615
F0FE 7619
F140 998C
F141 998E
F142 999A
F143 999B
F144 999C
F145 999D
F146 999E
F147 999F
F148 99A0
F149 99A1
F14A 99A2
F14B 99A3
F14C 99A4
F14D 99A6
F14E 99A7
F14F 99A9
F150 99AA
F151 99AB
F152 99AC
F153 99AD
F154 99AE
F155 99AF
F156 99B0
F157 99B1
F158 99B2
F159 99B3
F15A 99B4
F15B 99B5
F15C 99B6
F15D 99B7
F15E 99B8
F15F 99B9
F160 99BA
F161 99BB
F162 99BC
F163 99BD
F164 99BE
F165 99BF
F166 99C0
F167 99C1
F168 99C2
F169 99C3
F16A 99C4
F16B 99C5
F16C 99C6
F16D 99C7
F16E 99C8
F16F 99C9
F170 99CA
F171 99CB
F172 99CC
F173 99CD
F174 99CE
F175 99CF
F176 99D0
F177 99D1
F178 99D2
F179 99D3
F17A 99D4
F17B 99D5
F17C 99D6
F17D 99D7
F17E 99D8
F180 99D9
F181 99DA
F182 99DB
F183 99DC
F184 99DD
F185 99DE
F186 99DF
F187 99E0
F188 99E1
F189 99E2
F18A 99E3
F18B 99E4
F18C 99E5
F18D 99E6
F18E 99E7
F18F 99E8
F190 99E9
F191 99EA
F192 99EB
F193 99EC
F194 99ED
F195 99EE
F196 99EF
F197 99F0
F198 99F1
F199 99F2
F19A 99F3
F19B 99F4
F19C 99F5
F19D 99F6
F19E 99F7
F19F 99F8
F1A0 99F9
F1A1 761B
F1A2 763C
F1A3 7622
F1A4 7620
F1A5 7640
F1A6 762D
F1A7 7630
F1A8 763F
F1A9 7635
F1AA 7643
F1AB 763E
F1AC 7633
F1AD 764D
F1AE 765E
F1AF 7654
F1B0 765C
F1B1 7656
F1B2 766B
F1B3 766F
F1B4 7FCA
F1B5 7AE6
F1B6 7A78
F1B7 7A79
F1B8 7A80
F1B9 7A86
F1BA 7A88
F1BB 7A95
F1BC 7AA6
F1BD 7AA0
F1BE 7AAC
F1BF 7AA8
F1C0 7AAD
F1C1 7AB3
F1C2 8864
F1C3 8869
F1C4 8872
F1C5 887D
F1C6 887F
F1C7 8882
F1C8 88A2
F1C9 88C6
F1CA 88B7
F1CB 88BC
F1CC 88C9
F1CD 88E2
F1CE 88CE
F1CF 88E3
F1D0 88E5
F1D1 88F1
F1D2 891A
F1D3 88FC
F1D4 88E8
F1D5 88FE
F1D6 88F0
F1D7 8921
F1D8 8919
F1D9 8913
F1DA 891B
F1DB 890A
F1DC 8934
F1DD 892B
F1DE 8936
F1DF 8941
F1E0 8966
F1E1 897B
F1E2 758B
F1E3 80E5
F1E4 76B2
F1E5 76B4
F1E6 77DC
F1E7 8012
F1E8 8014
F1E9 8016
F1EA 801C
F1EB 8020
F1EC 8022
F1ED 8025
F1EE 8026
F1EF 8027
F1F0 8029
F1F1 8028
F1F2 8031
F1F3 800B
F1F4 8035
F1F5 8043
F1F6 8046
F1F7 804D
F1F8 8052
F1F9 8069
F1FA 8071
F1FB 8983
F1FC 9878
F1FD 9880
F1FE 9883
F240 99FA
F241 99FB
F242 99FC
F243 99FD
F244 99FE
F245 99FF
F246 9A00
F247 9A01
F248 9A02
F249 9A03
F24A 9A04
F24B 9A05
F24C 9A06
F24D 9A07
F24E 9A08
F24F 9A09
F250 9A0A
F251 9A0B
F252 9A0C
F253 9A0D
F254 9A0E
F255 9A0F
F256 9A10
F257 9A11
F258 9A12
F259 9A13
F25A 9A14
F25B 9A15
F25C 9A16
F25D 9A17
F25E 9A18
F25F 9A19
F260 9A1A
F261 9A1B
F262 9A1C
F263 9A1D
F264 9A1E
F265 9A1F
F266 9A20
F267 9A21
F268 9A22
F269 9A23
F26A 9A24
F26B 9A25
F26C 9A26
F26D 9A27
F26E 9A28
F26F 9A29
F270 9A2A
F271 9A2B
F272 9A2C
F273 9A2D
F274 9A2E
F275 9A2F
F276 9A30
F277 9A31
F278 9A32
F279 9A33
F27A 9A34
F27B 9A35
F27C 9A36
F27D 9A37
F27E 9A38
F280 9A39
F281 9A3A
F282 9A3B
F283 9A3C
F284 9A3D
F285 9A3E
F286 9A3F
F287 9A40
F288 9A41
F289 9A42
F28A 9A43
F28B 9A44
F28C 9A45
F28D 9A46
F28E 9A47
F28F 9A48
F290 9A49
F291 9A4A
F292 9A4B
F293 9A4C
F294 9A4D
F295 9A4E
F296 9A4F
F297 9A50
F298 9A51
F299 9A52
F29A 9A53
F29B 9A54
F29C 9A55
F29D 9A56
F29E 9A57
F29F 9A58
F2A0 9A59
F2A1 9889
F2A2 988C
F2A3 988D
F2A4 988F
F2A5 9894
F2A6 989A
F2A7 989B
F2A8 989E
F2A9 989F
F2AA 98A1
F2AB 98A2
F2AC 98A5
F2AD 98A6
F2AE 864D
F2AF 8654
F2B0 866C
F2B1 866E
F2B2 867F
F2B3 867A
F2B4 867C
F2B5 867B
F2B6 86A8
F2B7 868D
F2B8 868B
F2B9 86AC
F2BA 869D
F2BB 86A7
F2BC 86A3
F2BD 86AA
F2BE 8693
F2BF 86A9
F2C0 86B6
F2C1 86C4
F2C2 86B5
F2C3 86CE
F2C4 86B0
F2C5 86BA
F2C6 86B1
F2C7 86AF
F2C8 86C9
F2C9 86CF
F2CA 86B4
F2CB 86E9
F2CC 86F1
F2CD 86F2
F2CE 86ED
F2CF 86F3
F2D0 86D0
F2D1 8713
F2D2 86DE
F2D3 86F4
F2D4 86DF
F2D5 86D8
F2D6 86D1
F2D7 8703
F2D8 8707
F2D9 86F8
F2DA 8708
F2DB 870A
F2DC 870D
F2DD 8709
F2DE 8723
F2DF 873B
F2E0 871E
F2E1 8725
F2E2 872E
F2E3 871A
F2E4 873E
F2E5 8748
F2E6 8734
F2E7 8731
F2E8 8729
F2E9 8737
F2EA 873F
F2EB 8782
F2EC 8722
F2ED 877D
F2EE 877E
F2EF 877B
F2F0 8760
F2F1 8770
F2F2 874C
F2F3 876E
F2F4 878B
F2F5 8753
F2F6 8763
F2F7 877C
F2F8 8764
F2F9 8759
F2FA 8765
F2FB 8793
F2FC 87AF
F2FD 87A8
F2FE 87D2
F340 9A5A
F341 9A5B
F342 9A5C
F343 9A5D
F344 9A5E
F345 9A5F
F346 9A60
F347 9A61
F348 9A62
F349 9A63
F34A 9A64
F34B 9A65
F34C 9A66
F34D 9A67
F34E 9A68
F34F 9A69
F350 9A6A
F351 9A6B
F352 9A72
F353 9A83
F354 9A89
F355 9A8D
F356 9A8E
F357 9A94
F358 9A95
F359 9A99
F35A 9AA6
F35B 9AA9
F35C 9AAA
F35D 9AAB
F35E 9AAC
F35F 9AAD
F360 9AAE
F361 9AAF
F362 9AB2
F363 9AB3
F364 9AB4
F365 9AB5
F366 9AB9
F367 9ABB
F368 9ABD
F369 9ABE
F36A 9ABF
F36B 9AC3
F36C 9AC4
F36D 9AC6
F36E 9AC7
F36F 9AC8
F370 9AC9
F371 9ACA
F372 9ACD
F373 9ACE
F374 9ACF
F375 9AD0
F376 9AD2
F377 9AD4
F378 9AD5
F379 9AD6
F37A 9AD7
F37B 9AD9
F37C 9ADA
F37D 9ADB
F37E 9ADC
F380 9ADD
F381 9ADE
F382 9AE0
F383 9AE2
F384 9AE3
F385 9AE4
F386 9AE5
F387 9AE7
F388 9AE8
F389 9AE9
F38A 9AEA
F38B 9AEC
F38C 9AEE
F38D 9AF0
F38E 9AF1
F38F 9AF2
F390 9AF3
F391 9AF4
F392 9AF5
F393 9AF6
F394 9AF7
F395 9AF8
F396 9AFA
F397 9AFC
F398 9AFD
F399 9AFE
F39A 9AFF
F39B 9B00
F39C 9B01
F39D 9B02
F39E 9B04
F39F 9B05
F3A0 9B06
F3A1 87C6
F3A2 8788
F3A3 8785
F3A4 87AD
F3A5 8797
F3A6 8783
F3A7 87AB
F3A8 87E5
F3A9 87AC
F3AA 87B5
F3AB 87B3
F3AC 87CB
F3AD 87D3
F3AE 87BD
F3AF 87D1
F3B0 87C0
F3B1 87CA
F3B2 87DB
F3B3 87EA
F3B4 87E0
F3B5 87EE
F3B6 8816
F3B7 8813
F3B8 87FE
F3B9 880A
F3BA 881B
F3BB 8821
F3BC 8839
F3BD 883C
F3BE 7F36
F3BF 7F42
F3C0 7F44
F3C1 7F45
F3C2 8210
F3C3 7AFA
F3C4 7AFD
F3C5 7B08
F3C6 7B03
F3C7 7B04
F3C8 7B15
F3C9 7B0A
F3CA 7B2B
F3CB 7B0F
F3CC 7B47
F3CD 7B38
F3CE 7B2A
F3CF 7B19
F3D0 7B2E
F3D1 7B31
F3D2 7B20
F3D3 7B25
F3D4 7B24
F3D5 7B33
F3D6 7B3E
F3D7 7B1E
F3D8 7B58
F3D9 7B5A
F3DA 7B45
F3DB 7B75
F3DC 7B4C
F3DD 7B5D
F3DE 7B60
F3DF 7B6E
F3E0 7B7B
F3E1 7B62
F3E2 7B72
F3E3 7B71
F3E4 7B90
F3E5 7BA6
F3E6 7BA7
F3E7 7BB8
F3E8 7BAC
F3E9 7B9D
F3EA 7BA8
F3EB 7B85
F3EC 7BAA
F3ED 7B9C
F3EE 7BA2
F3EF 7BAB
F3F0 7BB4
F3F1 7BD1
F3F2 7BC1
F3F3 7BCC
F3F4 7BDD
F3F5 7BDA
F3F6 7BE5
F3F7 7BE6
F3F8 7BEA
F3F9 7C0C
F3FA 7BFE
F3FB 7BFC
F3FC 7C0F
F3FD 7C16
F3FE 7C0B
F440 9B07
F441 9B09
F442 9B0A
F443 9B0B
F444 9B0C
F445 9B0D
F446 9B0E
F447 9B10
F448 9B11
F449 9B12
F44A 9B14
F44B 9B15
F44C 9B16
F44D 9B17
F44E 9B18
F44F 9B19
F450 9B1A
F451 9B1B
F452 9B1C
F453 9B1D
F454 9B1E
F455 9B20
F456 9B21
F457 9B22
F458 9B24
F459 9B25
F45A 9B26
F45B 9B27
F45C 9B28
F45D 9B29
F45E 9B2A
F45F 9B2B
F460 9B2C
F461 9B2D
F462 9B2E
F463 9B30
F464 9B31
F465 9B33
F466 9B34
F467 9B35
F468 9B36
F469 9B37
F46A 9B38
F46B 9B39
F46C 9B3A
F46D 9B3D
F46E 9B3E
F46F 9B3F
F470 9B40
F471 9B46
F472 9B4A
F473 9B4B
F474 9B4C
F475 9B4E
F476 9B50
F477 9B52
F478 9B53
F479 9B55
F47A 9B56
F47B 9B57
F47C 9B58
F47D 9B59
F47E 9B5A
F480 9B5B
F481 9B5C
F482 9B5D
F483 9B5E
F484 9B5F
F485 9B60
F486 9B61
F487 9B62
F488 9B63
F489 9B64
F48A 9B65
F48B 9B66
F48C 9B67
F48D 9B68
F48E 9B69
F48F 9B6A
F490 9B6B
F491 9B6C
F492 9B6D
F493 9B6E
F494 9B6F
F495 9B70
F496 9B71
F497 9B72
F498 9B73
F499 9B74
F49A 9B75
F49B 9B76
F49C 9B77
F49D 9B78
F49E 9B79
F49F 9B7A
F4A0 9B7B
F4A1 7C1F
F4A2 7C2A
F4A3 7C26
F4A4 7C38
F4A5 7C41
F4A6 7C40
F4A7 81FE
F4A8 8201
F4A9 8202
F4AA 8204
F4AB 81EC
F4AC 8844
F4AD 8221
F4AE 8222
F4AF 8223
F4B0 822D
F4B1 822F
F4B2 8228
F4B3 822B
F4B4 8238
F4B5 823B
F4B6 8233
F4B7 8234
F4B8 823E
F4B9 8244
F4BA 8249
F4BB 824B
F4BC 824F
F4BD 825A
F4BE 825F
F4BF 8268
F4C0 887E
F4C1 8885
F4C2 8888
F4C3 88D8
F4C4 88DF
F4C5 895E
F4C6 7F9D
F4C7 7F9F
F4C8 7FA7
F4C9 7FAF
F4CA 7FB0
F4CB 7FB2
F4CC 7C7C
F4CD 6549
F4CE 7C91
F4CF 7C9D
F4D0 7C9C
F4D1 7C9E
F4D2 7CA2
F4D3 7CB2
F4D4 7CBC
F4D5 7CBD
F4D6 7CC1
F4D7 7CC7
F4D8 7CCC
F4D9 7CCD
F4DA 7CC8
F4DB 7CC5
F4DC 7CD7
F4DD 7CE8
F4DE 826E
F4DF 66A8
F4E0 7FBF
F4E1 7FCE
F4E2 7FD5
F4E3 7FE5
F4E4 7FE1
F4E5 7FE6
F4E6 7FE9
F4E7 7FEE
F4E8 7FF3
F4E9 7CF8
F4EA 7D77
F4EB 7DA6
F4EC 7DAE
F4ED 7E47
F4EE 7E9B
F4EF 9EB8
F4F0 9EB4
F4F1 8D73
F4F2 8D84
F4F3 8D94
F4F4 8D91
F4F5 8DB1
F4F6 8D67
F4F7 8D6D
F4F8 8C47
F4F9 8C49
F4FA 914A
F4FB 9150
F4FC 914E
F4FD 914F
F4FE 9164
F540 9B7C
F541 9B7D
F542 9B7E
F543 9B7F
F544 9B80
F545 9B81
F546 9B82
F547 9B83
F548 9B84
F549 9B85
F54A 9B86
F54B 9B87
F54C 9B88
F54D 9B89
F54E 9B8A
F54F 9B8B
F550 9B8C
F551 9B8D
F552 9B8E
F553 9B8F
F554 9B90
F555 9B91
F556 9B92
F557 9B93
F558 9B94
F559 9B95
F55A 9B96
F55B 9B97
F55C 9B98
F55D 9B99
F55E 9B9A
F55F 9B9B
F560 9B9C
F561 9B9D
F562 9B9E
F563 9B9F
F564 9BA0
F565 9BA1
F566 9BA2
F567 9BA3
F568 9BA4
F569 9BA5
F56A 9BA6
F56B 9BA7
F56C 9BA8
F56D 9BA9
F56E 9BAA
F56F 9BAB
F570 9BAC
F571 9BAD
F572 9BAE
F573 9BAF
F574 9BB0
F575 9BB1
F576 9BB2
F577 9BB3
F578 9BB4
F579 9BB5
F57A 9BB6
F57B 9BB7
F57C 9BB8
F57D 9BB9
F57E 9BBA
F580 9BBB
F581 9BBC
F582 9BBD
F583 9BBE
F584 9BBF
F585 9BC0
F586 9BC1
F587 9BC2
F588 9BC3
F589 9BC4
F58A 9BC5
F58B 9BC6
F58C 9BC7
F58D 9BC8
F58E 9BC9
F58F 9BCA
F590 9BCB
F591 9BCC
F592 9BCD
F593 9BCE
F594 9BCF
F595 9BD0
F596 9BD1
F597 9BD2
F598 9BD3
F599 9BD4
F59A 9BD5
F59B 9BD6
F59C 9BD7
F59D 9BD8
F59E 9BD9
F59F 9BDA
F5A0 9BDB
F5A1 9162
F5A2 9161
F5A3 9170
F5A4 9169
F5A5 916F
F5A6 917D
F5A7 917E
F5A8 9172
F5A9 9174
F5AA 9179
F5AB 918C
F5AC 9185
F5AD 9190
F5AE 918D
F5AF 9191
F5B0 91A2
F5B1 91A3
F5B2 91AA
F5B3 91AD
F5B4 91AE
F5B5 91AF
F5B6 91B5
F5B7 91B4
F5B8 91BA
F5B9 8C55
F5BA 9E7E
F5BB 8DB8
F5BC 8DEB
F5BD 8E05
F5BE 8E59
F5BF 8E69
F5C0 8DB5
F5C1 8DBF
F5C2 8DBC
F5C3 8DBA
F5C4 8DC4
F5C5 8DD6
F5C6 8DD7
F5C7 8DDA
F5C8 8DDE
F5C9 8DCE
F5CA 8DCF
F5CB 8DDB
F5CC 8DC6
F5CD 8DEC
F5CE 8DF7
F5CF 8DF8
F5D0 8DE3
F5D1 8DF9
F5D2 8DFB
F5D3 8DE4
F5D4 8E09
F5D5 8DFD
F5D6 8E14
F5D7 8E1D
F5D8 8E1F
F5D9 8E2C
F5DA 8E2E
F5DB 8E23
F5DC 8E2F
F5DD 8E3A
F5DE 8E40
F5DF 8E39
F5E0 8E35
F5E1 8E3D
F5E2 8E31
F5E3 8E49
F5E4 8E41
F5E5 8E42
F5E6 8E51
F5E7 8E52
F5E8 8E4A
F5E9 8E70
F5EA 8E76
F5EB 8E7C
F5EC 8E6F
F5ED 8E74
F5EE 8E85
F5EF 8E8F
F5F0 8E94
F5F1 8E90
F5F2 8E9C
F5F3 8E9E
F5F4 8C78
F5F5 8C82
F5F6 8C8A
F5F7 8C85
F5F8 8C98
F5F9 8C94
F5FA 659B
F5FB 89D6
F5FC 89DE
F5FD 89DA
F5FE 89DC
F640 9BDC
F641 9BDD
F642 9BDE
F643 9BDF
F644 9BE0
F645 9BE1
F646 9BE2
F647 9BE3
F648 9BE4
F649 9BE5
F64A 9BE6
F64B 9BE7
F64C 9BE8
F64D 9BE9
F64E 9BEA
F64F 9BEB
F650 9BEC
F651 9BED
F652 9BEE
F653 9BEF
F654 9BF0
F655 9BF1
F656 9BF2
F657 9BF3
F658 9BF4
F659 9BF5
F65A 9BF6
F65B 9BF7
F65C 9BF8
F65D 9BF9
F65E 9BFA
F65F 9BFB
F660 9BFC
F661 9BFD
F662 9BFE
F663 9BFF
F664 9C00
F665 9C01
F666 9C02
F667 9C03
F668 9C04
F669 9C05
F66A 9C06
F66B 9C07
F66C 9C08
F66D 9C09
F66E 9C0A
F66F 9C0B
F670 9C0C
F671 9C0D
F672 9C0E
F673 9C0F
F674 9C10
F675 9C11
F676 9C12
F677 9C13
F678 9C14
F679 9C15
F67A 9C16
F67B 9C17
F67C 9C18
F67D 9C19
F67E 9C1A
F680 9C1B
F681 9C1C
F682 9C1D
F683 9C1E
F684 9C1F
F685 9C20
F686 9C21
F687 9C22
F688 9C23
F689 9C24
F68A 9C25
F68B 9C26
F68C 9C27
F68D 9C28
F68E 9C29
F68F 9C2A
F690 9C2B
F691 9C2C
F692 9C2D
F693 9C2E
F694 9C2F
F695 9C30
F696 9C31
F697 9C32
F698 9C33
F699 9C34
F69A 9C35
F69B 9C36
F69C 9C37
F69D 9C38
F69E 9C39
F69F 9C3A
F6A0 9C3B
F6A1 89E5
F6A2 89EB
F6A3 89EF
F6A4 8A3E
F6A5 8B26
F6A6 9753
F6A7 96E9
F6A8 96F3
F6A9 96EF
F6AA 9706
F6AB 9701
F6AC 9708
F6AD 970F
F6AE 970E
F6AF 972A
F6B0 972D
F6B1 9730
F6B2 973E
F6B3 9F80
F6B4 9F83
F6B5 9F85
F6B6 9F86
F6B7 9F87
F6B8 9F88
F6B9 9F89
F6BA 9F8A
F6BB 9F8C
F6BC 9EFE
F6BD 9F0B
F6BE 9F0D
F6BF 96B9
F6C0 96BC
F6C1 96BD
F6C2 96CE
F6C3 96D2
F6C4 77BF
F6C5 96E0
F6C6 928E
F6C7 92AE
F6C8 92C8
F6C9 933E
F6CA 936A
F6CB 93CA
F6CC 938F
F6CD 943E
F6CE 946B
F6CF 9C7F
F6D0 9C82
F6D1 9C85
F6D2 9C86
F6D3 9C87
F6D4 9C88
F6D5 7A23
F6D6 9C8B
F6D7 9C8E
F6D8 9C90
F6D9 9C91
F6DA 9C92
F6DB 9C94
F6DC 9C95
F6DD 9C9A
F6DE 9C9B
F6DF 9C9E
F6E0 9C9F
F6E1 9CA0
F6E2 9CA1
F6E3 9CA2
F6E4 9CA3
F6E5 9CA5
F6E6 9CA6
F6E7 9CA7
F6E8 9CA8
F6E9 9CA9
F6EA 9CAB
F6EB 9CAD
F6EC 9CAE
F6ED 9CB0
F6EE 9CB1
F6EF 9CB2
F6F0 9CB3
F6F1 9CB4
F6F2 9CB5
F6F3 9CB6
F6F4 9CB7
F6F5 9CBA
F6F6 9CBB
F6F7 9CBC
F6F8 9CBD
F6F9 9CC4
F6FA 9CC5
F6FB 9CC6
F6FC 9CC7
F6FD 9CCA
F6FE 9CCB
F740 9C3C
F741 9C3D
F742 9C3E
F743 9C3F
F744 9C40
F745 9C41
F746 9C42
F747 9C43
F748 9C44
F749 9C45
F74A 9C46
F74B 9C47
F74C 9C48
F74D 9C49
F74E 9C4A
F74F 9C4B
F750 9C4C
F751 9C4D
F752 9C4E
F753 9C4F
F754 9C50
F755 9C51
F756 9C52
F757 9C53
F758 9C54
F759 9C55
F75A 9C56
F75B 9C57
F75C 9C58
F75D 9C59
F75E 9C5A
F75F 9C5B
F760 9C5C
F761 9C5D
F762 9C5E
F763 9C5F
F764 9C60
F765 9C61
F766 9C62
F767 9C63
F768 9C64
F769 9C65
F76A 9C66
F76B 9C67
F76C 9C68
F76D 9C69
F76E 9C6A
F76F 9C6B
F770 9C6C
F771 9C6D
F772 9C6E
F773 9C6F
F774 9C70
F775 9C71
F776 9C72
F777 9C73
F778 9C74
F779 9C75
F77A 9C76
F77B 9C77
F77C 9C78
F77D 9C79
F77E 9C7A
F780 9C7B
F781 9C7D
F782 9C7E
F783 9C80
F784 9C83
F785 9C84
F786 9C89
F787 9C8A
F788 9C8C
F789 9C8F
F78A 9C93
F78B 9C96
F78C 9C97
F78D 9C98
F78E 9C99
F78F 9C9D
F790 9CAA
F791 9CAC
F792 9CAF
F793 9CB9
F794 9CBE
F795 9CBF
F796 9CC0
F797 9CC1
F798 9CC2
F799 9CC8
F79A 9CC9
F79B 9CD1
F79C 9CD2
F79D 9CDA
F79E 9CDB
F79F 9CE0
F7A0 9CE1
F7A1 9CCC
F7A2 9CCD
F7A3 9CCE
F7A4 9CCF
F7A5 9CD0
F7A6 9CD3
F7A7 9CD4
F7A8 9CD5
F7A9 9CD7
F7AA 9CD8
F7AB 9CD9
F7AC 9CDC
F7AD 9CDD
F7AE 9CDF
F7AF 9CE2
F7B0 977C
F7B1 9785
F7B2 9791
F7B3 9792
F7B4 9794
F7B5 97AF
F7B6 97AB
F7B7 97A3
F7B8 97B2
F7B9 97B4
F7BA 9AB1
F7BB 9AB0
F7BC 9AB7
F7BD 9E58
F7BE 9AB6
F7BF 9ABA
F7C0 9ABC
F7C1 9AC1
F7C2 9AC0
F7C3 9AC5
F7C4 9AC2
F7C5 9ACB
F7C6 9ACC
F7C7 9AD1
F7C8 9B45
F7C9 9B43
F7CA 9B47
F7CB 9B49
F7CC 9B48
F7CD 9B4D
F7CE 9B51
F7CF 98E8
F7D0 990D
F7D1 992E
F7D2 9955
F7D3 9954
F7D4 9ADF
F7D5 9AE1
F7D6 9AE6
F7D7 9AEF
F7D8 9AEB
F7D9 9AFB
F7DA 9AED
F7DB 9AF9
F7DC 9B08
F7DD 9B0F
F7DE 9B13
F7DF 9B1F
F7E0 9B23
F7E1 9EBD
F7E2 9EBE
F7E3 7E3B
F7E4 9E82
F7E5 9E87
F7E6 9E88
F7E7 9E8B
F7E8 9E92
F7E9 93D6
F7EA 9E9D
F7EB 9E9F
F7EC 9EDB
F7ED 9EDC
F7EE 9EDD
F7EF 9EE0
F7F0 9EDF
F7F1 9EE2
F7F2 9EE9
F7F3 9EE7
F7F4 9EE5
F7F5 9EEA
F7F6 9EEF
F7F7 9F22
F7F8 9F2C
F7F9 9F2F
F7FA 9F39
F7FB 9F37
F7FC 9F3D
F7FD 9F3E
F7FE 9F44
F840 9CE3
F841 9CE4
F842 9CE5
F843 9CE6
F844 9CE7
F845 9CE8
F846 9CE9
F847 9CEA
F848 9CEB
F849 9CEC
F84A 9CED
F84B 9CEE
F84C 9CEF
F84D 9CF0
F84E 9CF1
F84F 9CF2
F850 9CF3
F851 9CF4
F852 9CF5
F853 9CF6
F854 9CF7
F855 9CF8
F856 9CF9
F857 9CFA
F858 9CFB
F859 9CFC
F85A 9CFD
F85B 9CFE
F85C 9CFF
F85D 9D00
F85E 9D01
F85F 9D02
F860 9D03
F861 9D04
F862 9D05
F863 9D06
F864 9D07
F865 9D08
F866 9D09
F867 9D0A
F868 9D0B
F869 9D0C
F86A 9D0D
F86B 9D0E
F86C 9D0F
F86D 9D10
F86E 9D11
F86F 9D12
F870 9D13
F871 9D14
F872 9D15
F873 9D16
F874 9D17
F875 9D18
F876 9D19
F877 9D1A
F878 9D1B
F879 9D1C
F87A 9D1D
F87B 9D1E
F87C 9D1F
F87D 9D20
F87E 9D21
F880 9D22
F881 9D23
F882 9D24
F883 9D25
F884 9D26
F885 9D27
F886 9D28
F887 9D29
F888 9D2A
F889 9D2B
F88A 9D2C
F88B 9D2D
F88C 9D2E
F88D 9D2F
F88E 9D30
F88F 9D31
F890 9D32
F891 9D33
F892 9D34
F893 9D35
F894 9D36
F895 9D37
F896 9D38
F897 9D39
F898 9D3A
F899 9D3B
F89A 9D3C
F89B 9D3D
F89C 9D3E
F89D 9D3F
F89E 9D40
F89F 9D41
F8A0 9D42
F940 9D43
F941 9D44
F942 9D45
F943 9D46
F944 9D47
F945 9D48
F946 9D49
F947 9D4A
F948 9D4B
F949 9D4C
F94A 9D4D
F94B 9D4E
F94C 9D4F
F94D 9D50
F94E 9D51
F94F 9D52
F950 9D53
F951 9D54
F952 9D55
F953 9D56
F954 9D57
F955 9D58
F956 9D59
F957 9D5A
F958 9D5B
F959 9D5C
F95A 9D5D
F95B 9D5E
F95C 9D5F
F95D 9D60
F95E 9D61
F95F 9D62
F960 9D63
F961 9D64
F962 9D65
F963 9D66
F964 9D67
F965 9D68
F966 9D69
F967 9D6A
F968 9D6B
F969 9D6C
F96A 9D6D
F96B 9D6E
F96C 9D6F
F96D 9D70
F96E 9D71
F96F 9D72
F970 9D73
F971 9D74
F972 9D75
F973 9D76
F974 9D77
F975 9D78
F976 9D79
F977 9D7A
F978 9D7B
F979 9D7C
F97A 9D7D
F97B 9D7E
F97C 9D7F
F97D 9D80
F97E 9D81
F980 9D82
F981 9D83
F982 9D84
F983 9D85
F984 9D86
F985 9D87
F986 9D88
F987 9D89
F988 9D8A
F989 9D8B
F98A 9D8C
F98B 9D8D
F98C 9D8E
F98D 9D8F
F98E 9D90
F98F 9D91
F990 9D92
F991 9D93
F992 9D94
F993 9D95
F994 9D96
F995 9D97
F996 9D98
F997 9D99
F998 9D9A
F999 9D9B
F99A 9D9C
F99B 9D9D
F99C 9D9E
F99D 9D9F
F99E 9DA0
F99F 9DA1
F9A0 9DA2
FA40 9DA3
FA41 9DA4
FA42 9DA5
FA43 9DA6
FA44 9DA7
FA45 9DA8
FA46 9DA9
FA47 9DAA
FA48 9DAB
FA49 9DAC
FA4A 9DAD
FA4B 9DAE
FA4C 9DAF
FA4D 9DB0
FA4E 9DB1
FA4F 9DB2
FA50 9DB3
FA51 9DB4
FA52 9DB5
FA53 9DB6
FA54 9DB7
FA55 9DB8
FA56 9DB9
FA57 9DBA
FA58 9DBB
FA59 9DBC
FA5A 9DBD
FA5B 9DBE
FA5C 9DBF
FA5D 9DC0
FA5E 9DC1
FA5F 9DC2
FA60 9DC3
FA61 9DC4
FA62 9DC5
FA63 9DC6
FA64 9DC7
FA65 9DC8
FA66 9DC9
FA67 9DCA
FA68 9DCB
FA69 9DCC
FA6A 9DCD
FA6B 9DCE
FA6C 9DCF
FA6D 9DD0
FA6E 9DD1
FA6F 9DD2
FA70 9DD3
FA71 9DD4
FA72 9DD5
FA73 9DD6
FA74 9DD7
FA75 9DD8
FA76 9DD9
FA77 9DDA
FA78 9DDB
FA79 9DDC
FA7A 9DDD
FA7B 9DDE
FA7C 9DDF
FA7D 9DE0
FA7E 9DE1
FA80 9DE2
FA81 9DE3
FA82 9DE4
FA83 9DE5
FA84 9DE6
FA85 9DE7
FA86 9DE8
FA87 9DE9
FA88 9DEA
FA89 9DEB
FA8A 9DEC
FA8B 9DED
FA8C 9DEE
FA8D 9DEF
FA8E 9DF0
FA8F 9DF1
FA90 9DF2
FA91 9DF3
FA92 9DF4
FA93 9DF5
FA94 9DF6
FA95 9DF7
FA96 9DF8
FA97 9DF9
FA98 9DFA
FA99 9DFB
FA9A 9DFC
FA9B 9DFD
FA9C 9DFE
FA9D 9DFF
FA9E 9E00
FA9F 9E01
FAA0 9E02
FB40 9E03
FB41 9E04
FB42 9E05
FB43 9E06
FB44 9E07
FB45 9E08
FB46 9E09
FB47 9E0A
FB48 9E0B
FB49 9E0C
FB4A 9E0D
FB4B 9E0E
FB4C 9E0F
FB4D 9E10
FB4E 9E11
FB4F 9E12
FB50 9E13
FB51 9E14
FB52 9E15
FB53 9E16
FB54 9E17
FB55 9E18
FB56 9E19
FB57 9E1A
FB58 9E1B
FB59 9E1C
FB5A 9E1D
FB5B 9E1E
FB5C 9E24
FB5D 9E27
FB5E 9E2E
FB5F 9E30
FB60 9E34
FB61 9E3B
FB62 9E3C
FB63 9E40
FB64 9E4D
FB65 9E50
FB66 9E52
FB67 9E53
FB68 9E54
FB69 9E56
FB6A 9E59
FB6B 9E5D
FB6C 9E5F
FB6D 9E60
FB6E 9E61
FB6F 9E62
FB70 9E65
FB71 9E6E
FB72 9E6F
FB73 9E72
FB74 9E74
FB75 9E75
FB76 9E76
FB77 9E77
FB78 9E78
FB79 9E79
FB7A 9E7A
FB7B 9E7B
FB7C 9E7C
FB7D 9E7D
FB7E 9E80
FB80 9E81
FB81 9E83
FB82 9E84
FB83 9E85
FB84 9E86
FB85 9E89
FB86 9E8A
FB87 9E8C
FB88 9E8D
FB89 9E8E
FB8A 9E8F
FB8B 9E90
FB8C 9E91
FB8D 9E94
FB8E 9E95
FB8F 9E96
FB90 9E97
FB91 9E98
FB92 9E99
FB93 9E9A
FB94 9E9B
FB95 9E9C
FB96 9E9E
FB97 9EA0
FB98 9EA1
FB99 9EA2
FB9A 9EA3
FB9B 9EA4
FB9C 9EA5
FB9D 9EA7
FB9E 9EA8
FB9F 9EA9
FBA0 9EAA
FC40 9EAB
FC41 9EAC
FC42 9EAD
FC43 9EAE
FC44 9EAF
FC45 9EB0
FC46 9EB1
FC47 9EB2
FC48 9EB3
FC49 9EB5
FC4A 9EB6
FC4B 9EB7
FC4C 9EB9
FC4D 9EBA
FC4E 9EBC
FC4F 9EBF
FC50 9EC0
FC51 9EC1
FC52 9EC2
FC53 9EC3
FC54 9EC5
FC55 9EC6
FC56 9EC7
FC57 9EC8
FC58 9ECA
FC59 9ECB
FC5A 9ECC
FC5B 9ED0
FC5C 9ED2
FC5D 9ED3
FC5E 9ED5
FC5F 9ED6
FC60 9ED7
FC61 9ED9
FC62 9EDA
FC63 9EDE
FC64 9EE1
FC65 9EE3
FC66 9EE4
FC67 9EE6
FC68 9EE8
FC69 9EEB
FC6A 9EEC
FC6B 9EED
FC6C 9EEE
FC6D 9EF0
FC6E 9EF1
FC6F 9EF2
FC70 9EF3
FC71 9EF4
FC72 9EF5
FC73 9EF6
FC74 9EF7
FC75 9EF8
FC76 9EFA
FC77 9EFD
FC78 9EFF
FC79 9F00
FC7A 9F01
FC7B 9F02
FC7C 9F03
FC7D 9F04
FC7E 9F05
FC80 9F06
FC81 9F07
FC82 9F08
FC83 9F09
FC84 9F0A
FC85 9F0C
FC86 9F0F
FC87 9F11
FC88 9F12
FC89 9F14
FC8A 9F15
FC8B 9F16
FC8C 9F18
FC8D 9F1A
FC8E 9F1B
FC8F 9F1C
FC90 9F1D
FC91 9F1E
FC92 9F1F
FC93 9F21
FC94 9F23
FC95 9F24
FC96 9F25
FC97 9F26
FC98 9F27
FC99 9F28
FC9A 9F29
FC9B 9F2A
FC9C 9F2B
FC9D 9F2D
FC9E 9F2E
FC9F 9F30
FCA0 9F31
FD40 9F32
FD41 9F33
FD42 9F34
FD43 9F35
FD44 9F36
FD45 9F38
FD46 9F3A
FD47 9F3C
FD48 9F3F
FD49 9F40
FD4A 9F41
FD4B 9F42
FD4C 9F43
FD4D 9F45
FD4E 9F46
FD4F 9F47
FD50 9F48
FD51 9F49
FD52 9F4A
FD53 9F4B
FD54 9F4C
FD55 9F4D
FD56 9F4E
FD57 9F4F
FD58 9F52
FD59 9F53
FD5A 9F54
FD5B 9F55
FD5C 9F56
FD5D 9F57
FD5E 9F58
FD5F 9F59
FD60 9F5A
FD61 9F5B
FD62 9F5C
FD63 9F5D
FD64 9F5E
FD65 9F5F
FD66 9F60
FD67 9F61
FD68 9F62
FD69 9F63
FD6A 9F64
FD6B 9F65
FD6C 9F66
FD6D 9F67
FD6E 9F68
FD6F 9F69
FD70 9F6A
FD71 9F6B
FD72 9F6C
FD73 9F6D
FD74 9F6E
FD75 9F6F
FD76 9F70
FD77 9F71
FD78 9F72
FD79 9F73
FD7A 9F74
FD7B 9F75
FD7C 9F76
FD7D 9F77
FD7E 9F78
FD80 9F79
FD81 9F7A
FD82 9F7B
FD83 9F7C
FD84 9F7D
FD85 9F7E
FD86 9F81
FD87 9F82
FD88 9F8D
FD89 9F8E
FD8A 9F8F
FD8B 9F90
FD8C 9F91
FD8D 9F92
FD8E 9F93
FD8F 9F94
FD90 9F95
FD91 9F96
FD92 9F97
FD93 9F98
FD94 9F9C
FD95 9F9D
FD96 9F9E
FD97 9FA1
FD98 9FA2
FD99 9FA3
FD9A 9FA4
FD9B 9FA5
FD9C F92C
FD9D F979
FD9E F995
FD9F F9E7
FDA0 F9F1
FE40 FA0C
FE41 FA0D
FE42 FA0E
FE43 FA0F
FE44 FA11
FE45 FA13
FE46 FA14
FE47 FA18
FE48 FA1F
FE49 FA20
FE4A FA21
FE4B FA23
FE4C FA24
FE4D FA27
FE4E FA28
FE4F FA29
| 219,799 | 22,066 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_difflib_expect.html |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8" />
<title></title>
<style type="text/css">
table.diff {font-family:Courier; border:medium;}
.diff_header {background-color:#e0e0e0}
td.diff_header {text-align:right}
.diff_next {background-color:#c0c0c0}
.diff_add {background-color:#aaffaa}
.diff_chg {background-color:#ffff77}
.diff_sub {background-color:#ffaaaa}
</style>
</head>
<body>
<table class="diff" id="difflib_chg_to0__top"
cellspacing="0" cellpadding="0" rules="groups" >
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">from</th><th class="diff_next"><br /></th><th colspan="2" class="diff_header">to</th></tr></thead>
<tbody>
<tr><td class="diff_next" id="difflib_chg_to0__0"><a href="#difflib_chg_to0__0">f</a></td><td class="diff_header" id="from0_1">1</td><td nowrap="nowrap"></td><td class="diff_next"><a href="#difflib_chg_to0__0">f</a></td><td class="diff_header" id="to0_1">1</td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to0__1">n</a></td><td class="diff_header" id="from0_2">2</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">TT</span>er than ugly.</td><td class="diff_next"><a href="#difflib_chg_to0__1">n</a></td><td class="diff_header" id="to0_2">2</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">tt</span>er than ugly.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_3">3</td><td nowrap="nowrap"><span class="diff_sub"> 2. Explicit is better than implicit.</span></td><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_4">4</td><td nowrap="nowrap"> 3. Simple is better than complex.</td><td class="diff_next"></td><td class="diff_header" id="to0_3">3</td><td nowrap="nowrap"> 3.<span class="diff_add"> </span> Simple is better than complex.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_5">5</td><td nowrap="nowrap"><span class="diff_sub"> 4. Complex is better than complicated.</span></td><td class="diff_next"></td><td class="diff_header" id="to0_4">4</td><td nowrap="nowrap"><span class="diff_add"> 4. Complicated is better than complex.</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to0_5">5</td><td nowrap="nowrap"><span class="diff_add"> 5. Flat is better than nested.</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_6">6</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_6">6</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_7">7</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_7">7</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_8">8</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_8">8</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_9">9</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_9">9</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_10">10</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_10">10</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_11">11</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_11">11</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next" id="difflib_chg_to0__1"></td><td class="diff_header" id="from0_12">12</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_12">12</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_13">13</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_13">13</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_14">14</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_14">14</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_15">15</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_15">15</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_16">16</td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to0_16">16</td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to0__2">n</a></td><td class="diff_header" id="from0_17">17</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">TT</span>er than ugly.</td><td class="diff_next"><a href="#difflib_chg_to0__2">n</a></td><td class="diff_header" id="to0_17">17</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">tt</span>er than ugly.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_18">18</td><td nowrap="nowrap"><span class="diff_sub"> 2. Explicit is better than implicit.</span></td><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_19">19</td><td nowrap="nowrap"> 3. Simple is better than complex.</td><td class="diff_next"></td><td class="diff_header" id="to0_18">18</td><td nowrap="nowrap"> 3.<span class="diff_add"> </span> Simple is better than complex.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_20">20</td><td nowrap="nowrap"><span class="diff_sub"> 4. Complex is better than complicated.</span></td><td class="diff_next"></td><td class="diff_header" id="to0_19">19</td><td nowrap="nowrap"><span class="diff_add"> 4. Complicated is better than complex.</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to0_20">20</td><td nowrap="nowrap"><span class="diff_add"> 5. Flat is better than nested.</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_21">21</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_21">21</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_22">22</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_22">22</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_23">23</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_23">23</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_24">24</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_24">24</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_25">25</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_25">25</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_26">26</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_26">26</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next" id="difflib_chg_to0__2"></td><td class="diff_header" id="from0_27">27</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_27">27</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_28">28</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_28">28</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_29">29</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_29">29</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_30">30</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_30">30</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_31">31</td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to0_31">31</td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to0__top">t</a></td><td class="diff_header" id="from0_32">32</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">TT</span>er than ugly.</td><td class="diff_next"><a href="#difflib_chg_to0__top">t</a></td><td class="diff_header" id="to0_32">32</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">tt</span>er than ugly.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_33">33</td><td nowrap="nowrap"><span class="diff_sub"> 2. Explicit is better than implicit.</span></td><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_34">34</td><td nowrap="nowrap"> 3. Simple is better than complex.</td><td class="diff_next"></td><td class="diff_header" id="to0_33">33</td><td nowrap="nowrap"> 3.<span class="diff_add"> </span> Simple is better than complex.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_35">35</td><td nowrap="nowrap"><span class="diff_sub"> 4. Complex is better than complicated.</span></td><td class="diff_next"></td><td class="diff_header" id="to0_34">34</td><td nowrap="nowrap"><span class="diff_add"> 4. Complicated is better than complex.</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to0_35">35</td><td nowrap="nowrap"><span class="diff_add"> 5. Flat is better than nested.</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_36">36</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_36">36</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_37">37</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_37">37</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_38">38</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_38">38</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_39">39</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_39">39</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_40">40</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_40">40</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_41">41</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_41">41</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_42">42</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_42">42</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_43">43</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_43">43</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_44">44</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_44">44</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_45">45</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to0_45">45</td><td nowrap="nowrap">123</td></tr>
</tbody>
</table>
<table class="diff" summary="Legends">
<tr> <th colspan="2"> Legends </th> </tr>
<tr> <td> <table border="" summary="Colors">
<tr><th> Colors </th> </tr>
<tr><td class="diff_add"> Added </td></tr>
<tr><td class="diff_chg">Changed</td> </tr>
<tr><td class="diff_sub">Deleted</td> </tr>
</table></td>
<td> <table border="" summary="Links">
<tr><th colspan="2"> Links </th> </tr>
<tr><td>(f)irst change</td> </tr>
<tr><td>(n)ext change</td> </tr>
<tr><td>(t)op</td> </tr>
</table></td> </tr>
</table>
<h2>Context (first diff within numlines=5(default))</h2>
<table class="diff" id="difflib_chg_to1__top"
cellspacing="0" cellpadding="0" rules="groups" >
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">from</th><th class="diff_next"><br /></th><th colspan="2" class="diff_header">to</th></tr></thead>
<tbody>
<tr><td class="diff_next" id="difflib_chg_to1__0"><a href="#difflib_chg_to1__0">f</a></td><td class="diff_header" id="from1_1">1</td><td nowrap="nowrap"></td><td class="diff_next"><a href="#difflib_chg_to1__0">f</a></td><td class="diff_header" id="to1_1">1</td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to1__1">n</a></td><td class="diff_header" id="from1_2">2</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">TT</span>er than ugly.</td><td class="diff_next"><a href="#difflib_chg_to1__1">n</a></td><td class="diff_header" id="to1_2">2</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">tt</span>er than ugly.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_3">3</td><td nowrap="nowrap"><span class="diff_sub"> 2. Explicit is better than implicit.</span></td><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_4">4</td><td nowrap="nowrap"> 3. Simple is better than complex.</td><td class="diff_next"></td><td class="diff_header" id="to1_3">3</td><td nowrap="nowrap"> 3.<span class="diff_add"> </span> Simple is better than complex.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_5">5</td><td nowrap="nowrap"><span class="diff_sub"> 4. Complex is better than complicated.</span></td><td class="diff_next"></td><td class="diff_header" id="to1_4">4</td><td nowrap="nowrap"><span class="diff_add"> 4. Complicated is better than complex.</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to1_5">5</td><td nowrap="nowrap"><span class="diff_add"> 5. Flat is better than nested.</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_6">6</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to1_6">6</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_7">7</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to1_7">7</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_8">8</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to1_8">8</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_9">9</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to1_9">9</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_10">10</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to1_10">10</td><td nowrap="nowrap">123</td></tr>
</tbody>
<tbody>
<tr><td class="diff_next" id="difflib_chg_to1__1"></td><td class="diff_header" id="from1_12">12</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to1_12">12</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_13">13</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to1_13">13</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_14">14</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to1_14">14</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_15">15</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to1_15">15</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_16">16</td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to1_16">16</td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to1__2">n</a></td><td class="diff_header" id="from1_17">17</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">TT</span>er than ugly.</td><td class="diff_next"><a href="#difflib_chg_to1__2">n</a></td><td class="diff_header" id="to1_17">17</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">tt</span>er than ugly.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_18">18</td><td nowrap="nowrap"><span class="diff_sub"> 2. Explicit is better than implicit.</span></td><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_19">19</td><td nowrap="nowrap"> 3. Simple is better than complex.</td><td class="diff_next"></td><td class="diff_header" id="to1_18">18</td><td nowrap="nowrap"> 3.<span class="diff_add"> </span> Simple is better than complex.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_20">20</td><td nowrap="nowrap"><span class="diff_sub"> 4. Complex is better than complicated.</span></td><td class="diff_next"></td><td class="diff_header" id="to1_19">19</td><td nowrap="nowrap"><span class="diff_add"> 4. Complicated is better than complex.</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to1_20">20</td><td nowrap="nowrap"><span class="diff_add"> 5. Flat is better than nested.</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_21">21</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to1_21">21</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_22">22</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to1_22">22</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_23">23</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to1_23">23</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_24">24</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to1_24">24</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_25">25</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to1_25">25</td><td nowrap="nowrap">123</td></tr>
</tbody>
<tbody>
<tr><td class="diff_next" id="difflib_chg_to1__2"></td><td class="diff_header" id="from1_27">27</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to1_27">27</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_28">28</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to1_28">28</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_29">29</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to1_29">29</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_30">30</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to1_30">30</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_31">31</td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to1_31">31</td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to1__top">t</a></td><td class="diff_header" id="from1_32">32</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">TT</span>er than ugly.</td><td class="diff_next"><a href="#difflib_chg_to1__top">t</a></td><td class="diff_header" id="to1_32">32</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">tt</span>er than ugly.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_33">33</td><td nowrap="nowrap"><span class="diff_sub"> 2. Explicit is better than implicit.</span></td><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_34">34</td><td nowrap="nowrap"> 3. Simple is better than complex.</td><td class="diff_next"></td><td class="diff_header" id="to1_33">33</td><td nowrap="nowrap"> 3.<span class="diff_add"> </span> Simple is better than complex.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_35">35</td><td nowrap="nowrap"><span class="diff_sub"> 4. Complex is better than complicated.</span></td><td class="diff_next"></td><td class="diff_header" id="to1_34">34</td><td nowrap="nowrap"><span class="diff_add"> 4. Complicated is better than complex.</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to1_35">35</td><td nowrap="nowrap"><span class="diff_add"> 5. Flat is better than nested.</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_36">36</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to1_36">36</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_37">37</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to1_37">37</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_38">38</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to1_38">38</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_39">39</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to1_39">39</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from1_40">40</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to1_40">40</td><td nowrap="nowrap">123</td></tr>
</tbody>
</table>
<h2>Context (first diff after numlines=5(default))</h2>
<table class="diff" id="difflib_chg_to2__top"
cellspacing="0" cellpadding="0" rules="groups" >
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">from</th><th class="diff_next"><br /></th><th colspan="2" class="diff_header">to</th></tr></thead>
<tbody>
<tr><td class="diff_next" id="difflib_chg_to2__0"></td><td class="diff_header" id="from2_7">7</td><td nowrap="nowrap">456</td><td class="diff_next"></td><td class="diff_header" id="to2_7">7</td><td nowrap="nowrap">456</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_8">8</td><td nowrap="nowrap">456</td><td class="diff_next"></td><td class="diff_header" id="to2_8">8</td><td nowrap="nowrap">456</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_9">9</td><td nowrap="nowrap">456</td><td class="diff_next"></td><td class="diff_header" id="to2_9">9</td><td nowrap="nowrap">456</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_10">10</td><td nowrap="nowrap">456</td><td class="diff_next"></td><td class="diff_header" id="to2_10">10</td><td nowrap="nowrap">456</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_11">11</td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to2_11">11</td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to2__1">n</a></td><td class="diff_header" id="from2_12">12</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">TT</span>er than ugly.</td><td class="diff_next"><a href="#difflib_chg_to2__1">n</a></td><td class="diff_header" id="to2_12">12</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">tt</span>er than ugly.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_13">13</td><td nowrap="nowrap"><span class="diff_sub"> 2. Explicit is better than implicit.</span></td><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_14">14</td><td nowrap="nowrap"> 3. Simple is better than complex.</td><td class="diff_next"></td><td class="diff_header" id="to2_13">13</td><td nowrap="nowrap"> 3.<span class="diff_add"> </span> Simple is better than complex.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_15">15</td><td nowrap="nowrap"><span class="diff_sub"> 4. Complex is better than complicated.</span></td><td class="diff_next"></td><td class="diff_header" id="to2_14">14</td><td nowrap="nowrap"><span class="diff_add"> 4. Complicated is better than complex.</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to2_15">15</td><td nowrap="nowrap"><span class="diff_add"> 5. Flat is better than nested.</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_16">16</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to2_16">16</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_17">17</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to2_17">17</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_18">18</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to2_18">18</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_19">19</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to2_19">19</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_20">20</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to2_20">20</td><td nowrap="nowrap">123</td></tr>
</tbody>
<tbody>
<tr><td class="diff_next" id="difflib_chg_to2__1"></td><td class="diff_header" id="from2_22">22</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to2_22">22</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_23">23</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to2_23">23</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_24">24</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to2_24">24</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_25">25</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to2_25">25</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_26">26</td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to2_26">26</td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to2__2">n</a></td><td class="diff_header" id="from2_27">27</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">TT</span>er than ugly.</td><td class="diff_next"><a href="#difflib_chg_to2__2">n</a></td><td class="diff_header" id="to2_27">27</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">tt</span>er than ugly.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_28">28</td><td nowrap="nowrap"><span class="diff_sub"> 2. Explicit is better than implicit.</span></td><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_29">29</td><td nowrap="nowrap"> 3. Simple is better than complex.</td><td class="diff_next"></td><td class="diff_header" id="to2_28">28</td><td nowrap="nowrap"> 3.<span class="diff_add"> </span> Simple is better than complex.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_30">30</td><td nowrap="nowrap"><span class="diff_sub"> 4. Complex is better than complicated.</span></td><td class="diff_next"></td><td class="diff_header" id="to2_29">29</td><td nowrap="nowrap"><span class="diff_add"> 4. Complicated is better than complex.</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to2_30">30</td><td nowrap="nowrap"><span class="diff_add"> 5. Flat is better than nested.</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_31">31</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to2_31">31</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_32">32</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to2_32">32</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_33">33</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to2_33">33</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_34">34</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to2_34">34</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_35">35</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to2_35">35</td><td nowrap="nowrap">123</td></tr>
</tbody>
<tbody>
<tr><td class="diff_next" id="difflib_chg_to2__2"></td><td class="diff_header" id="from2_37">37</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to2_37">37</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_38">38</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to2_38">38</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_39">39</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to2_39">39</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_40">40</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to2_40">40</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_41">41</td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to2_41">41</td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to2__top">t</a></td><td class="diff_header" id="from2_42">42</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">TT</span>er than ugly.</td><td class="diff_next"><a href="#difflib_chg_to2__top">t</a></td><td class="diff_header" id="to2_42">42</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">tt</span>er than ugly.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_43">43</td><td nowrap="nowrap"><span class="diff_sub"> 2. Explicit is better than implicit.</span></td><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_44">44</td><td nowrap="nowrap"> 3. Simple is better than complex.</td><td class="diff_next"></td><td class="diff_header" id="to2_43">43</td><td nowrap="nowrap"> 3.<span class="diff_add"> </span> Simple is better than complex.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_45">45</td><td nowrap="nowrap"><span class="diff_sub"> 4. Complex is better than complicated.</span></td><td class="diff_next"></td><td class="diff_header" id="to2_44">44</td><td nowrap="nowrap"><span class="diff_add"> 4. Complicated is better than complex.</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to2_45">45</td><td nowrap="nowrap"><span class="diff_add"> 5. Flat is better than nested.</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_46">46</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to2_46">46</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_47">47</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to2_47">47</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_48">48</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to2_48">48</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_49">49</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to2_49">49</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from2_50">50</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to2_50">50</td><td nowrap="nowrap">123</td></tr>
</tbody>
</table>
<h2>Context (numlines=6)</h2>
<table class="diff" id="difflib_chg_to3__top"
cellspacing="0" cellpadding="0" rules="groups" >
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">from</th><th class="diff_next"><br /></th><th colspan="2" class="diff_header">to</th></tr></thead>
<tbody>
<tr><td class="diff_next" id="difflib_chg_to3__0"><a href="#difflib_chg_to3__0">f</a></td><td class="diff_header" id="from3_1">1</td><td nowrap="nowrap"></td><td class="diff_next"><a href="#difflib_chg_to3__0">f</a></td><td class="diff_header" id="to3_1">1</td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to3__1">n</a></td><td class="diff_header" id="from3_2">2</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">TT</span>er than ugly.</td><td class="diff_next"><a href="#difflib_chg_to3__1">n</a></td><td class="diff_header" id="to3_2">2</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">tt</span>er than ugly.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_3">3</td><td nowrap="nowrap"><span class="diff_sub"> 2. Explicit is better than implicit.</span></td><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_4">4</td><td nowrap="nowrap"> 3. Simple is better than complex.</td><td class="diff_next"></td><td class="diff_header" id="to3_3">3</td><td nowrap="nowrap"> 3.<span class="diff_add"> </span> Simple is better than complex.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_5">5</td><td nowrap="nowrap"><span class="diff_sub"> 4. Complex is better than complicated.</span></td><td class="diff_next"></td><td class="diff_header" id="to3_4">4</td><td nowrap="nowrap"><span class="diff_add"> 4. Complicated is better than complex.</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to3_5">5</td><td nowrap="nowrap"><span class="diff_add"> 5. Flat is better than nested.</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_6">6</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to3_6">6</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_7">7</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to3_7">7</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_8">8</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to3_8">8</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_9">9</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to3_9">9</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_10">10</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to3_10">10</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next" id="difflib_chg_to3__1"></td><td class="diff_header" id="from3_11">11</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to3_11">11</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_12">12</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to3_12">12</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_13">13</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to3_13">13</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_14">14</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to3_14">14</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_15">15</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to3_15">15</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_16">16</td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to3_16">16</td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to3__2">n</a></td><td class="diff_header" id="from3_17">17</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">TT</span>er than ugly.</td><td class="diff_next"><a href="#difflib_chg_to3__2">n</a></td><td class="diff_header" id="to3_17">17</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">tt</span>er than ugly.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_18">18</td><td nowrap="nowrap"><span class="diff_sub"> 2. Explicit is better than implicit.</span></td><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_19">19</td><td nowrap="nowrap"> 3. Simple is better than complex.</td><td class="diff_next"></td><td class="diff_header" id="to3_18">18</td><td nowrap="nowrap"> 3.<span class="diff_add"> </span> Simple is better than complex.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_20">20</td><td nowrap="nowrap"><span class="diff_sub"> 4. Complex is better than complicated.</span></td><td class="diff_next"></td><td class="diff_header" id="to3_19">19</td><td nowrap="nowrap"><span class="diff_add"> 4. Complicated is better than complex.</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to3_20">20</td><td nowrap="nowrap"><span class="diff_add"> 5. Flat is better than nested.</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_21">21</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to3_21">21</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_22">22</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to3_22">22</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_23">23</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to3_23">23</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_24">24</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to3_24">24</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_25">25</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to3_25">25</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next" id="difflib_chg_to3__2"></td><td class="diff_header" id="from3_26">26</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to3_26">26</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_27">27</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to3_27">27</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_28">28</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to3_28">28</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_29">29</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to3_29">29</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_30">30</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to3_30">30</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_31">31</td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to3_31">31</td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to3__top">t</a></td><td class="diff_header" id="from3_32">32</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">TT</span>er than ugly.</td><td class="diff_next"><a href="#difflib_chg_to3__top">t</a></td><td class="diff_header" id="to3_32">32</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">tt</span>er than ugly.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_33">33</td><td nowrap="nowrap"><span class="diff_sub"> 2. Explicit is better than implicit.</span></td><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_34">34</td><td nowrap="nowrap"> 3. Simple is better than complex.</td><td class="diff_next"></td><td class="diff_header" id="to3_33">33</td><td nowrap="nowrap"> 3.<span class="diff_add"> </span> Simple is better than complex.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_35">35</td><td nowrap="nowrap"><span class="diff_sub"> 4. Complex is better than complicated.</span></td><td class="diff_next"></td><td class="diff_header" id="to3_34">34</td><td nowrap="nowrap"><span class="diff_add"> 4. Complicated is better than complex.</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to3_35">35</td><td nowrap="nowrap"><span class="diff_add"> 5. Flat is better than nested.</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_36">36</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to3_36">36</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_37">37</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to3_37">37</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_38">38</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to3_38">38</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_39">39</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to3_39">39</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_40">40</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to3_40">40</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from3_41">41</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to3_41">41</td><td nowrap="nowrap">123</td></tr>
</tbody>
</table>
<h2>Context (numlines=0)</h2>
<table class="diff" id="difflib_chg_to4__top"
cellspacing="0" cellpadding="0" rules="groups" >
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">from</th><th class="diff_next"><br /></th><th colspan="2" class="diff_header">to</th></tr></thead>
<tbody>
<tr><td class="diff_next" id="difflib_chg_to4__0"><a href="#difflib_chg_to4__1">n</a></td><td class="diff_header" id="from4_2">2</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">TT</span>er than ugly.</td><td class="diff_next"><a href="#difflib_chg_to4__1">n</a></td><td class="diff_header" id="to4_2">2</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">tt</span>er than ugly.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from4_3">3</td><td nowrap="nowrap"><span class="diff_sub"> 2. Explicit is better than implicit.</span></td><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from4_4">4</td><td nowrap="nowrap"> 3. Simple is better than complex.</td><td class="diff_next"></td><td class="diff_header" id="to4_3">3</td><td nowrap="nowrap"> 3.<span class="diff_add"> </span> Simple is better than complex.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from4_5">5</td><td nowrap="nowrap"><span class="diff_sub"> 4. Complex is better than complicated.</span></td><td class="diff_next"></td><td class="diff_header" id="to4_4">4</td><td nowrap="nowrap"><span class="diff_add"> 4. Complicated is better than complex.</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to4_5">5</td><td nowrap="nowrap"><span class="diff_add"> 5. Flat is better than nested.</span></td></tr>
</tbody>
<tbody>
<tr><td class="diff_next" id="difflib_chg_to4__1"><a href="#difflib_chg_to4__2">n</a></td><td class="diff_header" id="from4_17">17</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">TT</span>er than ugly.</td><td class="diff_next"><a href="#difflib_chg_to4__2">n</a></td><td class="diff_header" id="to4_17">17</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">tt</span>er than ugly.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from4_18">18</td><td nowrap="nowrap"><span class="diff_sub"> 2. Explicit is better than implicit.</span></td><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from4_19">19</td><td nowrap="nowrap"> 3. Simple is better than complex.</td><td class="diff_next"></td><td class="diff_header" id="to4_18">18</td><td nowrap="nowrap"> 3.<span class="diff_add"> </span> Simple is better than complex.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from4_20">20</td><td nowrap="nowrap"><span class="diff_sub"> 4. Complex is better than complicated.</span></td><td class="diff_next"></td><td class="diff_header" id="to4_19">19</td><td nowrap="nowrap"><span class="diff_add"> 4. Complicated is better than complex.</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to4_20">20</td><td nowrap="nowrap"><span class="diff_add"> 5. Flat is better than nested.</span></td></tr>
</tbody>
<tbody>
<tr><td class="diff_next" id="difflib_chg_to4__2"><a href="#difflib_chg_to4__top">t</a></td><td class="diff_header" id="from4_32">32</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">TT</span>er than ugly.</td><td class="diff_next"><a href="#difflib_chg_to4__top">t</a></td><td class="diff_header" id="to4_32">32</td><td nowrap="nowrap"> 1. Beautiful is be<span class="diff_chg">tt</span>er than ugly.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from4_33">33</td><td nowrap="nowrap"><span class="diff_sub"> 2. Explicit is better than implicit.</span></td><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from4_34">34</td><td nowrap="nowrap"> 3. Simple is better than complex.</td><td class="diff_next"></td><td class="diff_header" id="to4_33">33</td><td nowrap="nowrap"> 3.<span class="diff_add"> </span> Simple is better than complex.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from4_35">35</td><td nowrap="nowrap"><span class="diff_sub"> 4. Complex is better than complicated.</span></td><td class="diff_next"></td><td class="diff_header" id="to4_34">34</td><td nowrap="nowrap"><span class="diff_add"> 4. Complicated is better than complex.</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to4_35">35</td><td nowrap="nowrap"><span class="diff_add"> 5. Flat is better than nested.</span></td></tr>
</tbody>
</table>
<h2>Same Context</h2>
<table class="diff" id="difflib_chg_to5__top"
cellspacing="0" cellpadding="0" rules="groups" >
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">from</th><th class="diff_next"><br /></th><th colspan="2" class="diff_header">to</th></tr></thead>
<tbody>
<tr><td class="diff_next"><a href="#difflib_chg_to5__top">t</a></td><td></td><td> No Differences Found </td><td class="diff_next"><a href="#difflib_chg_to5__top">t</a></td><td></td><td> No Differences Found </td></tr>
</tbody>
</table>
<h2>Same Full</h2>
<table class="diff" id="difflib_chg_to6__top"
cellspacing="0" cellpadding="0" rules="groups" >
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">from</th><th class="diff_next"><br /></th><th colspan="2" class="diff_header">to</th></tr></thead>
<tbody>
<tr><td class="diff_next"><a href="#difflib_chg_to6__top">t</a></td><td class="diff_header" id="from6_1">1</td><td nowrap="nowrap"></td><td class="diff_next"><a href="#difflib_chg_to6__top">t</a></td><td class="diff_header" id="to6_1">1</td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_2">2</td><td nowrap="nowrap"> 1. Beautiful is beTTer than ugly.</td><td class="diff_next"></td><td class="diff_header" id="to6_2">2</td><td nowrap="nowrap"> 1. Beautiful is beTTer than ugly.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_3">3</td><td nowrap="nowrap"> 2. Explicit is better than implicit.</td><td class="diff_next"></td><td class="diff_header" id="to6_3">3</td><td nowrap="nowrap"> 2. Explicit is better than implicit.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_4">4</td><td nowrap="nowrap"> 3. Simple is better than complex.</td><td class="diff_next"></td><td class="diff_header" id="to6_4">4</td><td nowrap="nowrap"> 3. Simple is better than complex.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_5">5</td><td nowrap="nowrap"> 4. Complex is better than complicated.</td><td class="diff_next"></td><td class="diff_header" id="to6_5">5</td><td nowrap="nowrap"> 4. Complex is better than complicated.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_6">6</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_6">6</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_7">7</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_7">7</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_8">8</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_8">8</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_9">9</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_9">9</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_10">10</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_10">10</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_11">11</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_11">11</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_12">12</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_12">12</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_13">13</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_13">13</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_14">14</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_14">14</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_15">15</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_15">15</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_16">16</td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to6_16">16</td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_17">17</td><td nowrap="nowrap"> 1. Beautiful is beTTer than ugly.</td><td class="diff_next"></td><td class="diff_header" id="to6_17">17</td><td nowrap="nowrap"> 1. Beautiful is beTTer than ugly.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_18">18</td><td nowrap="nowrap"> 2. Explicit is better than implicit.</td><td class="diff_next"></td><td class="diff_header" id="to6_18">18</td><td nowrap="nowrap"> 2. Explicit is better than implicit.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_19">19</td><td nowrap="nowrap"> 3. Simple is better than complex.</td><td class="diff_next"></td><td class="diff_header" id="to6_19">19</td><td nowrap="nowrap"> 3. Simple is better than complex.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_20">20</td><td nowrap="nowrap"> 4. Complex is better than complicated.</td><td class="diff_next"></td><td class="diff_header" id="to6_20">20</td><td nowrap="nowrap"> 4. Complex is better than complicated.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_21">21</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_21">21</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_22">22</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_22">22</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_23">23</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_23">23</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_24">24</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_24">24</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_25">25</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_25">25</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_26">26</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_26">26</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_27">27</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_27">27</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_28">28</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_28">28</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_29">29</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_29">29</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_30">30</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_30">30</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_31">31</td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to6_31">31</td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_32">32</td><td nowrap="nowrap"> 1. Beautiful is beTTer than ugly.</td><td class="diff_next"></td><td class="diff_header" id="to6_32">32</td><td nowrap="nowrap"> 1. Beautiful is beTTer than ugly.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_33">33</td><td nowrap="nowrap"> 2. Explicit is better than implicit.</td><td class="diff_next"></td><td class="diff_header" id="to6_33">33</td><td nowrap="nowrap"> 2. Explicit is better than implicit.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_34">34</td><td nowrap="nowrap"> 3. Simple is better than complex.</td><td class="diff_next"></td><td class="diff_header" id="to6_34">34</td><td nowrap="nowrap"> 3. Simple is better than complex.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_35">35</td><td nowrap="nowrap"> 4. Complex is better than complicated.</td><td class="diff_next"></td><td class="diff_header" id="to6_35">35</td><td nowrap="nowrap"> 4. Complex is better than complicated.</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_36">36</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_36">36</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_37">37</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_37">37</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_38">38</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_38">38</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_39">39</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_39">39</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_40">40</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_40">40</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_41">41</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_41">41</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_42">42</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_42">42</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_43">43</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_43">43</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_44">44</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_44">44</td><td nowrap="nowrap">123</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from6_45">45</td><td nowrap="nowrap">123</td><td class="diff_next"></td><td class="diff_header" id="to6_45">45</td><td nowrap="nowrap">123</td></tr>
</tbody>
</table>
<h2>Empty Context</h2>
<table class="diff" id="difflib_chg_to7__top"
cellspacing="0" cellpadding="0" rules="groups" >
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">from</th><th class="diff_next"><br /></th><th colspan="2" class="diff_header">to</th></tr></thead>
<tbody>
<tr><td class="diff_next"><a href="#difflib_chg_to7__top">t</a></td><td></td><td> No Differences Found </td><td class="diff_next"><a href="#difflib_chg_to7__top">t</a></td><td></td><td> No Differences Found </td></tr>
</tbody>
</table>
<h2>Empty Full</h2>
<table class="diff" id="difflib_chg_to8__top"
cellspacing="0" cellpadding="0" rules="groups" >
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">from</th><th class="diff_next"><br /></th><th colspan="2" class="diff_header">to</th></tr></thead>
<tbody>
<tr><td class="diff_next"><a href="#difflib_chg_to8__top">t</a></td><td></td><td> Empty File </td><td class="diff_next"><a href="#difflib_chg_to8__top">t</a></td><td></td><td> Empty File </td></tr>
</tbody>
</table>
<h2>tabsize=2</h2>
<table class="diff" id="difflib_chg_to9__top"
cellspacing="0" cellpadding="0" rules="groups" >
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<tbody>
<tr><td class="diff_next" id="difflib_chg_to9__0"><a href="#difflib_chg_to9__0">f</a></td><td class="diff_header" id="from9_1">1</td><td nowrap="nowrap"></td><td class="diff_next"><a href="#difflib_chg_to9__0">f</a></td><td class="diff_header" id="to9_1">1</td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to9__top">t</a></td><td class="diff_header" id="from9_2">2</td><td nowrap="nowrap"><span class="diff_chg"> </span>Line 1: preceded by from:[tt] to:[ssss]</td><td class="diff_next"><a href="#difflib_chg_to9__top">t</a></td><td class="diff_header" id="to9_2">2</td><td nowrap="nowrap"><span class="diff_chg"> </span>Line 1: preceded by from:[tt] to:[ssss]</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from9_3">3</td><td nowrap="nowrap"> <span class="diff_chg"> </span> Line 2: preceded by from:[sstt] to:[sssst]</td><td class="diff_next"></td><td class="diff_header" id="to9_3">3</td><td nowrap="nowrap"> <span class="diff_chg"> </span> Line 2: preceded by from:[sstt] to:[sssst]</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from9_4">4</td><td nowrap="nowrap"> <span class="diff_chg"> </span>Line 3: preceded by from:[sstst] to:[ssssss]</td><td class="diff_next"></td><td class="diff_header" id="to9_4">4</td><td nowrap="nowrap"> <span class="diff_chg"> </span>Line 3: preceded by from:[sstst] to:[ssssss]</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from9_5">5</td><td nowrap="nowrap">Line 4: <span class="diff_chg"> </span>has from:[sst] to:[sss] after :</td><td class="diff_next"></td><td class="diff_header" id="to9_5">5</td><td nowrap="nowrap">Line 4: <span class="diff_chg"> </span>has from:[sst] to:[sss] after :</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from9_6">6</td><td nowrap="nowrap">Line 5: has from:[t] to:[ss] at end<span class="diff_sub"> </span></td><td class="diff_next"></td><td class="diff_header" id="to9_6">6</td><td nowrap="nowrap">Line 5: has from:[t] to:[ss] at end</td></tr>
</tbody>
</table>
<h2>tabsize=default</h2>
<table class="diff" id="difflib_chg_to10__top"
cellspacing="0" cellpadding="0" rules="groups" >
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<tbody>
<tr><td class="diff_next" id="difflib_chg_to10__0"><a href="#difflib_chg_to10__0">f</a></td><td class="diff_header" id="from10_1">1</td><td nowrap="nowrap"></td><td class="diff_next"><a href="#difflib_chg_to10__0">f</a></td><td class="diff_header" id="to10_1">1</td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to10__top">t</a></td><td class="diff_header" id="from10_2">2</td><td nowrap="nowrap"><span class="diff_chg"> </span>Line 1: preceded by from:[tt] to:[ssss]</td><td class="diff_next"><a href="#difflib_chg_to10__top">t</a></td><td class="diff_header" id="to10_2">2</td><td nowrap="nowrap"><span class="diff_chg"> </span>Line 1: preceded by from:[tt] to:[ssss]</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from10_3">3</td><td nowrap="nowrap"> <span class="diff_chg"> </span> Line 2: preceded by from:[sstt] to:[sssst]</td><td class="diff_next"></td><td class="diff_header" id="to10_3">3</td><td nowrap="nowrap"> <span class="diff_chg"> </span> Line 2: preceded by from:[sstt] to:[sssst]</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from10_4">4</td><td nowrap="nowrap"> <span class="diff_chg"> </span>Line 3: preceded by from:[sstst] to:[ssssss]</td><td class="diff_next"></td><td class="diff_header" id="to10_4">4</td><td nowrap="nowrap"> <span class="diff_chg"> </span>Line 3: preceded by from:[sstst] to:[ssssss]</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from10_5">5</td><td nowrap="nowrap">Line 4: <span class="diff_chg"> </span>has from:[sst] to:[sss] after :</td><td class="diff_next"></td><td class="diff_header" id="to10_5">5</td><td nowrap="nowrap">Line 4: <span class="diff_chg"> </span>has from:[sst] to:[sss] after :</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from10_6">6</td><td nowrap="nowrap">Line 5: has from:[t] to:[ss] at end<span class="diff_sub"> </span></td><td class="diff_next"></td><td class="diff_header" id="to10_6">6</td><td nowrap="nowrap">Line 5: has from:[t] to:[ss] at end</td></tr>
</tbody>
</table>
<h2>Context (wrapcolumn=14,numlines=0)</h2>
<table class="diff" id="difflib_chg_to11__top"
cellspacing="0" cellpadding="0" rules="groups" >
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<tbody>
<tr><td class="diff_next" id="difflib_chg_to11__0"><a href="#difflib_chg_to11__1">n</a></td><td class="diff_header" id="from11_4">4</td><td nowrap="nowrap"><span class="diff_sub">line 2</span></td><td class="diff_next"><a href="#difflib_chg_to11__1">n</a></td><td class="diff_header" id="to11_4">4</td><td nowrap="nowrap"><span class="diff_add">line 2 adde</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"> </td><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_add">d</span></td></tr>
</tbody>
<tbody>
<tr><td class="diff_next" id="difflib_chg_to11__1"><a href="#difflib_chg_to11__2">n</a></td><td class="diff_header" id="from11_6">6</td><td nowrap="nowrap">line 4 chan<span class="diff_chg">g</span></td><td class="diff_next"><a href="#difflib_chg_to11__2">n</a></td><td class="diff_header" id="to11_6">6</td><td nowrap="nowrap">line 4 chan<span class="diff_chg">G</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_chg">e</span>d</td><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_chg">E</span>d</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from11_7">7</td><td nowrap="nowrap">line 5<span class="diff_chg"> </span> chan<span class="diff_chg">g</span></td><td class="diff_next"></td><td class="diff_header" id="to11_7">7</td><td nowrap="nowrap">line 5<span class="diff_chg">a</span> chan<span class="diff_chg">G</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_chg"></span>ed</td><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_chg"></span>ed</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from11_8">8</td><td nowrap="nowrap">line 6<span class="diff_chg"> </span> chang</td><td class="diff_next"></td><td class="diff_header" id="to11_8">8</td><td nowrap="nowrap">line 6<span class="diff_chg">a</span> chang</td></tr>
<tr><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_chg">e</span>d</td><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_chg">E</span>d</td></tr>
</tbody>
<tbody>
<tr><td class="diff_next" id="difflib_chg_to11__2"><a href="#difflib_chg_to11__3">n</a></td><td class="diff_header" id="from11_10">10</td><td nowrap="nowrap"><span class="diff_sub">line 8 subtra</span></td><td class="diff_next"><a href="#difflib_chg_to11__3">n</a></td><td class="diff_header" id="to11_10">10</td><td nowrap="nowrap"><span class="diff_add">line 8</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_sub">cted</span></td><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"> </td></tr>
</tbody>
<tbody>
<tr><td class="diff_next" id="difflib_chg_to11__3"><a href="#difflib_chg_to11__top">t</a></td><td class="diff_header" id="from11_12">12</td><td nowrap="nowrap"><span class="diff_sub">12345678901234</span></td><td class="diff_next"><a href="#difflib_chg_to11__top">t</a></td><td class="diff_header" id="to11_12">12</td><td nowrap="nowrap"><span class="diff_add">1234567890</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_sub">56789012345689</span></td><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"> </td></tr>
<tr><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_sub">012345</span></td><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"> </td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from11_13">13</td><td nowrap="nowrap"><span class="diff_sub">short line</span></td><td class="diff_next"></td><td class="diff_header" id="to11_13">13</td><td nowrap="nowrap"><span class="diff_add">another long l</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"> </td><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_add">ine that needs</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"> </td><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_add"> to be wrapped</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from11_14">14</td><td nowrap="nowrap">just fit<span class="diff_chg">s</span> in!!</td><td class="diff_next"></td><td class="diff_header" id="to11_14">14</td><td nowrap="nowrap">just fit<span class="diff_chg">S</span> in!!</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from11_15">15</td><td nowrap="nowrap">just fits in t</td><td class="diff_next"></td><td class="diff_header" id="to11_15">15</td><td nowrap="nowrap">just fits in t</td></tr>
<tr><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap">wo line<span class="diff_chg">s</span> yup!!</td><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap">wo line<span class="diff_chg">S</span> yup!!</td></tr>
</tbody>
</table>
<h2>wrapcolumn=14,splitlines()</h2>
<table class="diff" id="difflib_chg_to12__top"
cellspacing="0" cellpadding="0" rules="groups" >
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<tbody>
<tr><td class="diff_next" id="difflib_chg_to12__0"><a href="#difflib_chg_to12__0">f</a></td><td class="diff_header" id="from12_1">1</td><td nowrap="nowrap">line 0</td><td class="diff_next"><a href="#difflib_chg_to12__0">f</a></td><td class="diff_header" id="to12_1">1</td><td nowrap="nowrap">line 0</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from12_2">2</td><td nowrap="nowrap">12345678901234</td><td class="diff_next"></td><td class="diff_header" id="to12_2">2</td><td nowrap="nowrap">12345678901234</td></tr>
<tr><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap">56789012345689</td><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap">56789012345689</td></tr>
<tr><td class="diff_next" id="difflib_chg_to12__1"></td><td class="diff_header">></td><td nowrap="nowrap">012345</td><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap">012345</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from12_3">3</td><td nowrap="nowrap">line 1</td><td class="diff_next"></td><td class="diff_header" id="to12_3">3</td><td nowrap="nowrap">line 1</td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to12__1">n</a></td><td class="diff_header" id="from12_4">4</td><td nowrap="nowrap"><span class="diff_sub">line 2</span></td><td class="diff_next"><a href="#difflib_chg_to12__1">n</a></td><td class="diff_header" id="to12_4">4</td><td nowrap="nowrap"><span class="diff_add">line 2 adde</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"> </td><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_add">d</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from12_5">5</td><td nowrap="nowrap">line 3</td><td class="diff_next"></td><td class="diff_header" id="to12_5">5</td><td nowrap="nowrap">line 3</td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to12__2">n</a></td><td class="diff_header" id="from12_6">6</td><td nowrap="nowrap">line 4 chan<span class="diff_chg">g</span></td><td class="diff_next"><a href="#difflib_chg_to12__2">n</a></td><td class="diff_header" id="to12_6">6</td><td nowrap="nowrap">line 4 chan<span class="diff_chg">G</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_chg">e</span>d</td><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_chg">E</span>d</td></tr>
<tr><td class="diff_next" id="difflib_chg_to12__2"></td><td class="diff_header" id="from12_7">7</td><td nowrap="nowrap">line 5<span class="diff_chg"> </span> chan<span class="diff_chg">g</span></td><td class="diff_next"></td><td class="diff_header" id="to12_7">7</td><td nowrap="nowrap">line 5<span class="diff_chg">a</span> chan<span class="diff_chg">G</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_chg"></span>ed</td><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_chg"></span>ed</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from12_8">8</td><td nowrap="nowrap">line 6<span class="diff_chg"> </span> chang</td><td class="diff_next"></td><td class="diff_header" id="to12_8">8</td><td nowrap="nowrap">line 6<span class="diff_chg">a</span> chang</td></tr>
<tr><td class="diff_next" id="difflib_chg_to12__3"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_chg">e</span>d</td><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_chg">E</span>d</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from12_9">9</td><td nowrap="nowrap">line 7</td><td class="diff_next"></td><td class="diff_header" id="to12_9">9</td><td nowrap="nowrap">line 7</td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to12__3">n</a></td><td class="diff_header" id="from12_10">10</td><td nowrap="nowrap"><span class="diff_sub">line 8 subtra</span></td><td class="diff_next"><a href="#difflib_chg_to12__3">n</a></td><td class="diff_header" id="to12_10">10</td><td nowrap="nowrap"><span class="diff_add">line 8</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_sub">cted</span></td><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"> </td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from12_11">11</td><td nowrap="nowrap">line 9</td><td class="diff_next"></td><td class="diff_header" id="to12_11">11</td><td nowrap="nowrap">line 9</td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to12__top">t</a></td><td class="diff_header" id="from12_12">12</td><td nowrap="nowrap"><span class="diff_sub">12345678901234</span></td><td class="diff_next"><a href="#difflib_chg_to12__top">t</a></td><td class="diff_header" id="to12_12">12</td><td nowrap="nowrap"><span class="diff_add">1234567890</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_sub">56789012345689</span></td><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"> </td></tr>
<tr><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_sub">012345</span></td><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"> </td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from12_13">13</td><td nowrap="nowrap"><span class="diff_sub">short line</span></td><td class="diff_next"></td><td class="diff_header" id="to12_13">13</td><td nowrap="nowrap"><span class="diff_add">another long l</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"> </td><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_add">ine that needs</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"> </td><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_add"> to be wrapped</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from12_14">14</td><td nowrap="nowrap">just fit<span class="diff_chg">s</span> in!!</td><td class="diff_next"></td><td class="diff_header" id="to12_14">14</td><td nowrap="nowrap">just fit<span class="diff_chg">S</span> in!!</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from12_15">15</td><td nowrap="nowrap">just fits in t</td><td class="diff_next"></td><td class="diff_header" id="to12_15">15</td><td nowrap="nowrap">just fits in t</td></tr>
<tr><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap">wo line<span class="diff_chg">s</span> yup!!</td><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap">wo line<span class="diff_chg">S</span> yup!!</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from12_16">16</td><td nowrap="nowrap">the end</td><td class="diff_next"></td><td class="diff_header" id="to12_16">16</td><td nowrap="nowrap">the end</td></tr>
</tbody>
</table>
<h2>wrapcolumn=14,splitlines(True)</h2>
<table class="diff" id="difflib_chg_to13__top"
cellspacing="0" cellpadding="0" rules="groups" >
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<tbody>
<tr><td class="diff_next" id="difflib_chg_to13__0"><a href="#difflib_chg_to13__0">f</a></td><td class="diff_header" id="from13_1">1</td><td nowrap="nowrap">line 0</td><td class="diff_next"><a href="#difflib_chg_to13__0">f</a></td><td class="diff_header" id="to13_1">1</td><td nowrap="nowrap">line 0</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from13_2">2</td><td nowrap="nowrap">12345678901234</td><td class="diff_next"></td><td class="diff_header" id="to13_2">2</td><td nowrap="nowrap">12345678901234</td></tr>
<tr><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap">56789012345689</td><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap">56789012345689</td></tr>
<tr><td class="diff_next" id="difflib_chg_to13__1"></td><td class="diff_header">></td><td nowrap="nowrap">012345</td><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap">012345</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from13_3">3</td><td nowrap="nowrap">line 1</td><td class="diff_next"></td><td class="diff_header" id="to13_3">3</td><td nowrap="nowrap">line 1</td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to13__1">n</a></td><td class="diff_header" id="from13_4">4</td><td nowrap="nowrap"><span class="diff_sub">line 2</span></td><td class="diff_next"><a href="#difflib_chg_to13__1">n</a></td><td class="diff_header" id="to13_4">4</td><td nowrap="nowrap"><span class="diff_add">line 2 adde</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"> </td><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_add">d</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from13_5">5</td><td nowrap="nowrap">line 3</td><td class="diff_next"></td><td class="diff_header" id="to13_5">5</td><td nowrap="nowrap">line 3</td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to13__2">n</a></td><td class="diff_header" id="from13_6">6</td><td nowrap="nowrap">line 4 chan<span class="diff_chg">g</span></td><td class="diff_next"><a href="#difflib_chg_to13__2">n</a></td><td class="diff_header" id="to13_6">6</td><td nowrap="nowrap">line 4 chan<span class="diff_chg">G</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_chg">e</span>d</td><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_chg">E</span>d</td></tr>
<tr><td class="diff_next" id="difflib_chg_to13__2"></td><td class="diff_header" id="from13_7">7</td><td nowrap="nowrap">line 5<span class="diff_chg"> </span> chan<span class="diff_chg">g</span></td><td class="diff_next"></td><td class="diff_header" id="to13_7">7</td><td nowrap="nowrap">line 5<span class="diff_chg">a</span> chan<span class="diff_chg">G</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_chg"></span>ed</td><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_chg"></span>ed</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from13_8">8</td><td nowrap="nowrap">line 6<span class="diff_chg"> </span> chang</td><td class="diff_next"></td><td class="diff_header" id="to13_8">8</td><td nowrap="nowrap">line 6<span class="diff_chg">a</span> chang</td></tr>
<tr><td class="diff_next" id="difflib_chg_to13__3"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_chg">e</span>d</td><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_chg">E</span>d</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from13_9">9</td><td nowrap="nowrap">line 7</td><td class="diff_next"></td><td class="diff_header" id="to13_9">9</td><td nowrap="nowrap">line 7</td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to13__3">n</a></td><td class="diff_header" id="from13_10">10</td><td nowrap="nowrap"><span class="diff_sub">line 8 subtra</span></td><td class="diff_next"><a href="#difflib_chg_to13__3">n</a></td><td class="diff_header" id="to13_10">10</td><td nowrap="nowrap"><span class="diff_add">line 8</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_sub">cted</span></td><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"> </td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from13_11">11</td><td nowrap="nowrap">line 9</td><td class="diff_next"></td><td class="diff_header" id="to13_11">11</td><td nowrap="nowrap">line 9</td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to13__top">t</a></td><td class="diff_header" id="from13_12">12</td><td nowrap="nowrap"><span class="diff_sub">12345678901234</span></td><td class="diff_next"><a href="#difflib_chg_to13__top">t</a></td><td class="diff_header" id="to13_12">12</td><td nowrap="nowrap"><span class="diff_add">1234567890</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_sub">56789012345689</span></td><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"> </td></tr>
<tr><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_sub">012345</span></td><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"> </td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from13_13">13</td><td nowrap="nowrap"><span class="diff_sub">short line</span></td><td class="diff_next"></td><td class="diff_header" id="to13_13">13</td><td nowrap="nowrap"><span class="diff_add">another long l</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"> </td><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_add">ine that needs</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header"></td><td nowrap="nowrap"> </td><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap"><span class="diff_add"> to be wrapped</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from13_14">14</td><td nowrap="nowrap">just fit<span class="diff_chg">s</span> in!!</td><td class="diff_next"></td><td class="diff_header" id="to13_14">14</td><td nowrap="nowrap">just fit<span class="diff_chg">S</span> in!!</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from13_15">15</td><td nowrap="nowrap">just fits in t</td><td class="diff_next"></td><td class="diff_header" id="to13_15">15</td><td nowrap="nowrap">just fits in t</td></tr>
<tr><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap">wo line<span class="diff_chg">s</span> yup!!</td><td class="diff_next"></td><td class="diff_header">></td><td nowrap="nowrap">wo line<span class="diff_chg">S</span> yup!!</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from13_16">16</td><td nowrap="nowrap">the end</td><td class="diff_next"></td><td class="diff_header" id="to13_16">16</td><td nowrap="nowrap">the end</td></tr>
</tbody>
</table>
</body>
</html> | 103,266 | 526 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/pystone.py | #! /usr/bin/env python3
"""
"PYSTONE" Benchmark Program
Version: Python/1.2 (corresponds to C/1.1 plus 3 Pystone fixes)
Author: Reinhold P. Weicker, CACM Vol 27, No 10, 10/84 pg. 1013.
Translated from ADA to C by Rick Richardson.
Every method to preserve ADA-likeness has been used,
at the expense of C-ness.
Translated from C to Python by Guido van Rossum.
Version History:
Version 1.1 corrects two bugs in version 1.0:
First, it leaked memory: in Proc1(), NextRecord ends
up having a pointer to itself. I have corrected this
by zapping NextRecord.PtrComp at the end of Proc1().
Second, Proc3() used the operator != to compare a
record to None. This is rather inefficient and not
true to the intention of the original benchmark (where
a pointer comparison to None is intended; the !=
operator attempts to find a method __cmp__ to do value
comparison of the record). Version 1.1 runs 5-10
percent faster than version 1.0, so benchmark figures
of different versions can't be compared directly.
Version 1.2 changes the division to floor division.
Under Python 3 version 1.1 would use the normal division
operator, resulting in some of the operations mistakenly
yielding floats. Version 1.2 instead uses floor division
making the benchmark an integer benchmark again.
"""
LOOPS = 50000
from time import time
__version__ = "1.2"
[Ident1, Ident2, Ident3, Ident4, Ident5] = range(1, 6)
class Record:
def __init__(self, PtrComp = None, Discr = 0, EnumComp = 0,
IntComp = 0, StringComp = 0):
self.PtrComp = PtrComp
self.Discr = Discr
self.EnumComp = EnumComp
self.IntComp = IntComp
self.StringComp = StringComp
def copy(self):
return Record(self.PtrComp, self.Discr, self.EnumComp,
self.IntComp, self.StringComp)
TRUE = 1
FALSE = 0
def main(loops=LOOPS):
benchtime, stones = pystones(loops)
print("Pystone(%s) time for %d passes = %g" % \
(__version__, loops, benchtime))
print("This machine benchmarks at %g pystones/second" % stones)
def pystones(loops=LOOPS):
return Proc0(loops)
IntGlob = 0
BoolGlob = FALSE
Char1Glob = '\0'
Char2Glob = '\0'
Array1Glob = [0]*51
Array2Glob = [x[:] for x in [Array1Glob]*51]
PtrGlb = None
PtrGlbNext = None
def Proc0(loops=LOOPS):
global IntGlob
global BoolGlob
global Char1Glob
global Char2Glob
global Array1Glob
global Array2Glob
global PtrGlb
global PtrGlbNext
starttime = time()
for i in range(loops):
pass
nulltime = time() - starttime
PtrGlbNext = Record()
PtrGlb = Record()
PtrGlb.PtrComp = PtrGlbNext
PtrGlb.Discr = Ident1
PtrGlb.EnumComp = Ident3
PtrGlb.IntComp = 40
PtrGlb.StringComp = "DHRYSTONE PROGRAM, SOME STRING"
String1Loc = "DHRYSTONE PROGRAM, 1'ST STRING"
Array2Glob[8][7] = 10
starttime = time()
for i in range(loops):
Proc5()
Proc4()
IntLoc1 = 2
IntLoc2 = 3
String2Loc = "DHRYSTONE PROGRAM, 2'ND STRING"
EnumLoc = Ident2
BoolGlob = not Func2(String1Loc, String2Loc)
while IntLoc1 < IntLoc2:
IntLoc3 = 5 * IntLoc1 - IntLoc2
IntLoc3 = Proc7(IntLoc1, IntLoc2)
IntLoc1 = IntLoc1 + 1
Proc8(Array1Glob, Array2Glob, IntLoc1, IntLoc3)
PtrGlb = Proc1(PtrGlb)
CharIndex = 'A'
while CharIndex <= Char2Glob:
if EnumLoc == Func1(CharIndex, 'C'):
EnumLoc = Proc6(Ident1)
CharIndex = chr(ord(CharIndex)+1)
IntLoc3 = IntLoc2 * IntLoc1
IntLoc2 = IntLoc3 // IntLoc1
IntLoc2 = 7 * (IntLoc3 - IntLoc2) - IntLoc1
IntLoc1 = Proc2(IntLoc1)
benchtime = time() - starttime - nulltime
if benchtime == 0.0:
loopsPerBenchtime = 0.0
else:
loopsPerBenchtime = (loops / benchtime)
return benchtime, loopsPerBenchtime
def Proc1(PtrParIn):
PtrParIn.PtrComp = NextRecord = PtrGlb.copy()
PtrParIn.IntComp = 5
NextRecord.IntComp = PtrParIn.IntComp
NextRecord.PtrComp = PtrParIn.PtrComp
NextRecord.PtrComp = Proc3(NextRecord.PtrComp)
if NextRecord.Discr == Ident1:
NextRecord.IntComp = 6
NextRecord.EnumComp = Proc6(PtrParIn.EnumComp)
NextRecord.PtrComp = PtrGlb.PtrComp
NextRecord.IntComp = Proc7(NextRecord.IntComp, 10)
else:
PtrParIn = NextRecord.copy()
NextRecord.PtrComp = None
return PtrParIn
def Proc2(IntParIO):
IntLoc = IntParIO + 10
while 1:
if Char1Glob == 'A':
IntLoc = IntLoc - 1
IntParIO = IntLoc - IntGlob
EnumLoc = Ident1
if EnumLoc == Ident1:
break
return IntParIO
def Proc3(PtrParOut):
global IntGlob
if PtrGlb is not None:
PtrParOut = PtrGlb.PtrComp
else:
IntGlob = 100
PtrGlb.IntComp = Proc7(10, IntGlob)
return PtrParOut
def Proc4():
global Char2Glob
BoolLoc = Char1Glob == 'A'
BoolLoc = BoolLoc or BoolGlob
Char2Glob = 'B'
def Proc5():
global Char1Glob
global BoolGlob
Char1Glob = 'A'
BoolGlob = FALSE
def Proc6(EnumParIn):
EnumParOut = EnumParIn
if not Func3(EnumParIn):
EnumParOut = Ident4
if EnumParIn == Ident1:
EnumParOut = Ident1
elif EnumParIn == Ident2:
if IntGlob > 100:
EnumParOut = Ident1
else:
EnumParOut = Ident4
elif EnumParIn == Ident3:
EnumParOut = Ident2
elif EnumParIn == Ident4:
pass
elif EnumParIn == Ident5:
EnumParOut = Ident3
return EnumParOut
def Proc7(IntParI1, IntParI2):
IntLoc = IntParI1 + 2
IntParOut = IntParI2 + IntLoc
return IntParOut
def Proc8(Array1Par, Array2Par, IntParI1, IntParI2):
global IntGlob
IntLoc = IntParI1 + 5
Array1Par[IntLoc] = IntParI2
Array1Par[IntLoc+1] = Array1Par[IntLoc]
Array1Par[IntLoc+30] = IntLoc
for IntIndex in range(IntLoc, IntLoc+2):
Array2Par[IntLoc][IntIndex] = IntLoc
Array2Par[IntLoc][IntLoc-1] = Array2Par[IntLoc][IntLoc-1] + 1
Array2Par[IntLoc+20][IntLoc] = Array1Par[IntLoc]
IntGlob = 5
def Func1(CharPar1, CharPar2):
CharLoc1 = CharPar1
CharLoc2 = CharLoc1
if CharLoc2 != CharPar2:
return Ident1
else:
return Ident2
def Func2(StrParI1, StrParI2):
IntLoc = 1
while IntLoc <= 1:
if Func1(StrParI1[IntLoc], StrParI2[IntLoc+1]) == Ident1:
CharLoc = 'A'
IntLoc = IntLoc + 1
if CharLoc >= 'W' and CharLoc <= 'Z':
IntLoc = 7
if CharLoc == 'X':
return TRUE
else:
if StrParI1 > StrParI2:
IntLoc = IntLoc + 7
return TRUE
else:
return FALSE
def Func3(EnumParIn):
EnumLoc = EnumParIn
if EnumLoc == Ident3: return TRUE
return FALSE
if __name__ == '__main__':
import sys
def error(msg):
print(msg, end=' ', file=sys.stderr)
print("usage: %s [number_of_loops]" % sys.argv[0], file=sys.stderr)
sys.exit(100)
nargs = len(sys.argv) - 1
if nargs > 1:
error("%d arguments are too many;" % nargs)
elif nargs == 1:
try: loops = int(sys.argv[1])
except ValueError:
error("Invalid argument %r;" % sys.argv[1])
else:
loops = LOOPS
main(loops)
| 7,731 | 278 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_urllib_response.py | """Unit tests for code in urllib.response."""
import socket
import tempfile
import urllib.response
import unittest
class TestResponse(unittest.TestCase):
def setUp(self):
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.fp = self.sock.makefile('rb')
self.test_headers = {"Host": "www.python.org",
"Connection": "close"}
def test_with(self):
addbase = urllib.response.addbase(self.fp)
self.assertIsInstance(addbase, tempfile._TemporaryFileWrapper)
def f():
with addbase as spam:
pass
self.assertFalse(self.fp.closed)
f()
self.assertTrue(self.fp.closed)
self.assertRaises(ValueError, f)
def test_addclosehook(self):
closehook_called = False
def closehook():
nonlocal closehook_called
closehook_called = True
closehook = urllib.response.addclosehook(self.fp, closehook)
closehook.close()
self.assertTrue(self.fp.closed)
self.assertTrue(closehook_called)
def test_addinfo(self):
info = urllib.response.addinfo(self.fp, self.test_headers)
self.assertEqual(info.info(), self.test_headers)
def test_addinfourl(self):
url = "http://www.python.org"
code = 200
infourl = urllib.response.addinfourl(self.fp, self.test_headers,
url, code)
self.assertEqual(infourl.info(), self.test_headers)
self.assertEqual(infourl.geturl(), url)
self.assertEqual(infourl.getcode(), code)
def tearDown(self):
self.sock.close()
if __name__ == '__main__':
unittest.main()
| 1,728 | 60 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_wave.py | import unittest
from test import audiotests
from test import support
from audioop import byteswap
import sys
import wave
class WaveTest(audiotests.AudioWriteTests,
audiotests.AudioTestsWithSourceFile):
module = wave
class WavePCM8Test(WaveTest, unittest.TestCase):
sndfilename = 'pluck-pcm8.wav'
sndfilenframes = 3307
nchannels = 2
sampwidth = 1
framerate = 11025
nframes = 48
comptype = 'NONE'
compname = 'not compressed'
frames = bytes.fromhex("""\
827F CB80 B184 0088 4B86 C883 3F81 837E 387A 3473 A96B 9A66 \
6D64 4662 8E60 6F60 D762 7B68 936F 5877 177B 757C 887B 5F7B \
917A BE7B 3C7C E67F 4F84 C389 418E D192 6E97 0296 FF94 0092 \
C98E D28D 6F8F 4E8F 648C E38A 888A AB8B D18E 0B91 368E C48A \
""")
class WavePCM16Test(WaveTest, unittest.TestCase):
sndfilename = 'pluck-pcm16.wav'
sndfilenframes = 3307
nchannels = 2
sampwidth = 2
framerate = 11025
nframes = 48
comptype = 'NONE'
compname = 'not compressed'
frames = bytes.fromhex("""\
022EFFEA 4B5C00F9 311404EF 80DC0843 CBDF06B2 48AA03F3 BFE701B2 036BFE7C \
B857FA3E B4B2F34F 2999EBCA 1A5FE6D7 EDFCE491 C626E279 0E05E0B8 EF27E02D \
5754E275 FB31E843 1373EF89 D827F72C 978BFB7A F5F7FC11 0866FB9C DF30FB42 \
117FFA36 3EE4FB5D BC75FCB6 66D5FF5F CF16040E 43220978 C1BC0EC8 511F12A4 \
EEDF1755 82061666 7FFF1446 80001296 499C0EB2 52BA0DB9 EFB70F5C CE400FBC \
E4B50CEB 63440A5A 08CA0A1F 2BBA0B0B 51460E47 8BCB113C B6F50EEA 44150A59 \
""")
if sys.byteorder != 'big':
frames = byteswap(frames, 2)
class WavePCM24Test(WaveTest, unittest.TestCase):
sndfilename = 'pluck-pcm24.wav'
sndfilenframes = 3307
nchannels = 2
sampwidth = 3
framerate = 11025
nframes = 48
comptype = 'NONE'
compname = 'not compressed'
frames = bytes.fromhex("""\
022D65FFEB9D 4B5A0F00FA54 3113C304EE2B 80DCD6084303 \
CBDEC006B261 48A99803F2F8 BFE82401B07D 036BFBFE7B5D \
B85756FA3EC9 B4B055F3502B 299830EBCB62 1A5CA7E6D99A \
EDFA3EE491BD C625EBE27884 0E05A9E0B6CF EF2929E02922 \
5758D8E27067 FB3557E83E16 1377BFEF8402 D82C5BF7272A \
978F16FB7745 F5F865FC1013 086635FB9C4E DF30FCFB40EE \
117FE0FA3438 3EE6B8FB5AC3 BC77A3FCB2F4 66D6DAFF5F32 \
CF13B9041275 431D69097A8C C1BB600EC74E 5120B912A2BA \
EEDF641754C0 8207001664B7 7FFFFF14453F 8000001294E6 \
499C1B0EB3B2 52B73E0DBCA0 EFB2B20F5FD8 CE3CDB0FBE12 \
E4B49C0CEA2D 6344A80A5A7C 08C8FE0A1FFE 2BB9860B0A0E \
51486F0E44E1 8BCC64113B05 B6F4EC0EEB36 4413170A5B48 \
""")
if sys.byteorder != 'big':
frames = byteswap(frames, 3)
class WavePCM32Test(WaveTest, unittest.TestCase):
sndfilename = 'pluck-pcm32.wav'
sndfilenframes = 3307
nchannels = 2
sampwidth = 4
framerate = 11025
nframes = 48
comptype = 'NONE'
compname = 'not compressed'
frames = bytes.fromhex("""\
022D65BCFFEB9D92 4B5A0F8000FA549C 3113C34004EE2BC0 80DCD680084303E0 \
CBDEC0C006B26140 48A9980003F2F8FC BFE8248001B07D92 036BFB60FE7B5D34 \
B8575600FA3EC920 B4B05500F3502BC0 29983000EBCB6240 1A5CA7A0E6D99A60 \
EDFA3E80E491BD40 C625EB80E27884A0 0E05A9A0E0B6CFE0 EF292940E0292280 \
5758D800E2706700 FB3557D8E83E1640 1377BF00EF840280 D82C5B80F7272A80 \
978F1600FB774560 F5F86510FC101364 086635A0FB9C4E20 DF30FC40FB40EE28 \
117FE0A0FA3438B0 3EE6B840FB5AC3F0 BC77A380FCB2F454 66D6DA80FF5F32B4 \
CF13B980041275B0 431D6980097A8C00 C1BB60000EC74E00 5120B98012A2BAA0 \
EEDF64C01754C060 820700001664B780 7FFFFFFF14453F40 800000001294E6E0 \
499C1B000EB3B270 52B73E000DBCA020 EFB2B2E00F5FD880 CE3CDB400FBE1270 \
E4B49CC00CEA2D90 6344A8800A5A7CA0 08C8FE800A1FFEE0 2BB986C00B0A0E00 \
51486F800E44E190 8BCC6480113B0580 B6F4EC000EEB3630 441317800A5B48A0 \
""")
if sys.byteorder != 'big':
frames = byteswap(frames, 4)
class MiscTestCase(unittest.TestCase):
def test__all__(self):
blacklist = {'WAVE_FORMAT_PCM'}
support.check__all__(self, wave, blacklist=blacklist)
if __name__ == '__main__':
unittest.main()
| 4,186 | 114 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_zlib.py | import unittest
from test import support
import binascii
import pickle
import random
import sys
import cosmo
import zlib
from test.support import bigmemtest, _1G, _4G
requires_Compress_copy = unittest.skipUnless(
hasattr(zlib.compressobj(), "copy"),
'requires Compress.copy()')
requires_Decompress_copy = unittest.skipUnless(
hasattr(zlib.decompressobj(), "copy"),
'requires Decompress.copy()')
class VersionTestCase(unittest.TestCase):
def test_library_version(self):
# Test that the major version of the actual library in use matches the
# major version that we were compiled against. We can't guarantee that
# the minor versions will match (even on the machine on which the module
# was compiled), and the API is stable between minor versions, so
# testing only the major versions avoids spurious failures.
self.assertEqual(zlib.ZLIB_RUNTIME_VERSION[0], zlib.ZLIB_VERSION[0])
class ChecksumTestCase(unittest.TestCase):
# checksum test cases
def test_crc32start(self):
self.assertEqual(zlib.crc32(b""), zlib.crc32(b"", 0))
self.assertTrue(zlib.crc32(b"abc", 0xffffffff))
def test_crc32empty(self):
self.assertEqual(zlib.crc32(b"", 0), 0)
self.assertEqual(zlib.crc32(b"", 1), 1)
self.assertEqual(zlib.crc32(b"", 432), 432)
def test_adler32start(self):
self.assertEqual(zlib.adler32(b""), zlib.adler32(b"", 1))
self.assertTrue(zlib.adler32(b"abc", 0xffffffff))
def test_adler32empty(self):
self.assertEqual(zlib.adler32(b"", 0), 0)
self.assertEqual(zlib.adler32(b"", 1), 1)
self.assertEqual(zlib.adler32(b"", 432), 432)
def test_penguins(self):
self.assertEqual(zlib.crc32(b"penguin", 0), 0x0e5c1a120)
self.assertEqual(zlib.crc32(b"penguin", 1), 0x43b6aa94)
self.assertEqual(zlib.adler32(b"penguin", 0), 0x0bcf02f6)
self.assertEqual(zlib.adler32(b"penguin", 1), 0x0bd602f7)
self.assertEqual(zlib.crc32(b"penguin"), zlib.crc32(b"penguin", 0))
self.assertEqual(zlib.adler32(b"penguin"),zlib.adler32(b"penguin",1))
def test_crc32_adler32_unsigned(self):
foo = b'abcdefghijklmnop'
# explicitly test signed behavior
self.assertEqual(zlib.crc32(foo), 2486878355)
self.assertEqual(zlib.crc32(b'spam'), 1138425661)
self.assertEqual(zlib.adler32(foo+foo), 3573550353)
self.assertEqual(zlib.adler32(b'spam'), 72286642)
def test_same_as_binascii_crc32(self):
foo = b'abcdefghijklmnop'
crc = 2486878355
self.assertEqual(binascii.crc32(foo), crc)
self.assertEqual(zlib.crc32(foo), crc)
self.assertEqual(binascii.crc32(b'spam'), zlib.crc32(b'spam'))
# Issue #10276 - check that inputs >=4GB are handled correctly.
class ChecksumBigBufferTestCase(unittest.TestCase):
@bigmemtest(size=_4G + 4, memuse=1, dry_run=False)
def test_big_buffer(self, size):
data = b"nyan" * (_1G + 1)
self.assertEqual(zlib.crc32(data), 1044521549)
self.assertEqual(zlib.adler32(data), 2256789997)
class ExceptionTestCase(unittest.TestCase):
# make sure we generate some expected errors
def test_badlevel(self):
# specifying compression level out of range causes an error
# (but -1 is Z_DEFAULT_COMPRESSION and apparently the zlib
# accepts 0 too)
self.assertRaises(zlib.error, zlib.compress, b'ERROR', 10)
def test_badargs(self):
self.assertRaises(TypeError, zlib.adler32)
self.assertRaises(TypeError, zlib.crc32)
self.assertRaises(TypeError, zlib.compress)
self.assertRaises(TypeError, zlib.decompress)
for arg in (42, None, '', 'abc', (), []):
self.assertRaises(TypeError, zlib.adler32, arg)
self.assertRaises(TypeError, zlib.crc32, arg)
self.assertRaises(TypeError, zlib.compress, arg)
self.assertRaises(TypeError, zlib.decompress, arg)
def test_badcompressobj(self):
# verify failure on building compress object with bad params
self.assertRaises(ValueError, zlib.compressobj, 1, zlib.DEFLATED, 0)
# specifying total bits too large causes an error
self.assertRaises(ValueError,
zlib.compressobj, 1, zlib.DEFLATED, zlib.MAX_WBITS + 1)
def test_baddecompressobj(self):
# verify failure on building decompress object with bad params
self.assertRaises(ValueError, zlib.decompressobj, -1)
def test_decompressobj_badflush(self):
# verify failure on calling decompressobj.flush with bad params
self.assertRaises(ValueError, zlib.decompressobj().flush, 0)
self.assertRaises(ValueError, zlib.decompressobj().flush, -1)
@support.cpython_only
def test_overflow(self):
with self.assertRaisesRegex(OverflowError, 'int too large'):
zlib.decompress(b'', 15, sys.maxsize + 1)
with self.assertRaisesRegex(OverflowError, 'int too large'):
zlib.decompressobj().decompress(b'', sys.maxsize + 1)
with self.assertRaisesRegex(OverflowError, 'int too large'):
zlib.decompressobj().flush(sys.maxsize + 1)
class BaseCompressTestCase(object):
def check_big_compress_buffer(self, size, compress_func):
_1M = 1024 * 1024
# Generate 10MB worth of random, and expand it by repeating it.
# The assumption is that zlib's memory is not big enough to exploit
# such spread out redundancy.
data = b''.join([random.getrandbits(8 * _1M).to_bytes(_1M, 'little')
for i in range(10)])
data = data * (size // len(data) + 1)
try:
compress_func(data)
finally:
# Release memory
data = None
def check_big_decompress_buffer(self, size, decompress_func):
data = b'x' * size
try:
compressed = zlib.compress(data, 1)
finally:
# Release memory
data = None
data = decompress_func(compressed)
# Sanity check
try:
self.assertEqual(len(data), size)
self.assertEqual(len(data.strip(b'x')), 0)
finally:
data = None
class CompressTestCase(BaseCompressTestCase, unittest.TestCase):
# Test compression in one go (whole message compression)
def test_speech(self):
x = zlib.compress(HAMLET_SCENE)
self.assertEqual(zlib.decompress(x), HAMLET_SCENE)
def test_keywords(self):
x = zlib.compress(HAMLET_SCENE, level=3)
self.assertEqual(zlib.decompress(x), HAMLET_SCENE)
with self.assertRaises(TypeError):
zlib.compress(data=HAMLET_SCENE, level=3)
self.assertEqual(zlib.decompress(x,
wbits=zlib.MAX_WBITS,
bufsize=zlib.DEF_BUF_SIZE),
HAMLET_SCENE)
def test_speech128(self):
# compress more data
data = HAMLET_SCENE * 128
x = zlib.compress(data)
self.assertEqual(zlib.compress(bytearray(data)), x)
for ob in x, bytearray(x):
self.assertEqual(zlib.decompress(ob), data)
def test_incomplete_stream(self):
# A useful error message is given
x = zlib.compress(HAMLET_SCENE)
self.assertRaisesRegex(zlib.error,
"Error -5 while decompressing data: incomplete or truncated stream",
zlib.decompress, x[:-1])
# Memory use of the following functions takes into account overallocation
@bigmemtest(size=_1G + 1024 * 1024, memuse=3)
def test_big_compress_buffer(self, size):
compress = lambda s: zlib.compress(s, 1)
self.check_big_compress_buffer(size, compress)
@bigmemtest(size=_1G + 1024 * 1024, memuse=2)
def test_big_decompress_buffer(self, size):
self.check_big_decompress_buffer(size, zlib.decompress)
@bigmemtest(size=_4G, memuse=1)
def test_large_bufsize(self, size):
# Test decompress(bufsize) parameter greater than the internal limit
data = HAMLET_SCENE * 10
compressed = zlib.compress(data, 1)
self.assertEqual(zlib.decompress(compressed, 15, size), data)
def test_custom_bufsize(self):
data = HAMLET_SCENE * 10
compressed = zlib.compress(data, 1)
self.assertEqual(zlib.decompress(compressed, 15, CustomInt()), data)
@unittest.skipUnless(sys.maxsize > 2**32, 'requires 64bit platform')
@bigmemtest(size=_4G + 100, memuse=4)
def test_64bit_compress(self, size):
data = b'x' * size
try:
comp = zlib.compress(data, 0)
self.assertEqual(zlib.decompress(comp), data)
finally:
comp = data = None
class CompressObjectTestCase(BaseCompressTestCase, unittest.TestCase):
# Test compression object
def test_pair(self):
# straightforward compress/decompress objects
datasrc = HAMLET_SCENE * 128
datazip = zlib.compress(datasrc)
# should compress both bytes and bytearray data
for data in (datasrc, bytearray(datasrc)):
co = zlib.compressobj()
x1 = co.compress(data)
x2 = co.flush()
self.assertRaises(zlib.error, co.flush) # second flush should not work
self.assertEqual(x1 + x2, datazip)
for v1, v2 in ((x1, x2), (bytearray(x1), bytearray(x2))):
dco = zlib.decompressobj()
y1 = dco.decompress(v1 + v2)
y2 = dco.flush()
self.assertEqual(data, y1 + y2)
self.assertIsInstance(dco.unconsumed_tail, bytes)
self.assertIsInstance(dco.unused_data, bytes)
def test_keywords(self):
level = 2
method = zlib.DEFLATED
wbits = -12
memLevel = 9
strategy = zlib.Z_FILTERED
co = zlib.compressobj(level=level,
method=method,
wbits=wbits,
memLevel=memLevel,
strategy=strategy,
zdict=b"")
do = zlib.decompressobj(wbits=wbits, zdict=b"")
with self.assertRaises(TypeError):
co.compress(data=HAMLET_SCENE)
with self.assertRaises(TypeError):
do.decompress(data=zlib.compress(HAMLET_SCENE))
x = co.compress(HAMLET_SCENE) + co.flush()
y = do.decompress(x, max_length=len(HAMLET_SCENE)) + do.flush()
self.assertEqual(HAMLET_SCENE, y)
def test_compressoptions(self):
# specify lots of options to compressobj()
level = 2
method = zlib.DEFLATED
wbits = -12
memLevel = 9
strategy = zlib.Z_FILTERED
co = zlib.compressobj(level, method, wbits, memLevel, strategy)
x1 = co.compress(HAMLET_SCENE)
x2 = co.flush()
dco = zlib.decompressobj(wbits)
y1 = dco.decompress(x1 + x2)
y2 = dco.flush()
self.assertEqual(HAMLET_SCENE, y1 + y2)
def test_compressincremental(self):
# compress object in steps, decompress object as one-shot
data = HAMLET_SCENE * 128
co = zlib.compressobj()
bufs = []
for i in range(0, len(data), 256):
bufs.append(co.compress(data[i:i+256]))
bufs.append(co.flush())
combuf = b''.join(bufs)
dco = zlib.decompressobj()
y1 = dco.decompress(b''.join(bufs))
y2 = dco.flush()
self.assertEqual(data, y1 + y2)
def test_decompinc(self, flush=False, source=None, cx=256, dcx=64):
# compress object in steps, decompress object in steps
source = source or HAMLET_SCENE
data = source * 128
co = zlib.compressobj()
bufs = []
for i in range(0, len(data), cx):
bufs.append(co.compress(data[i:i+cx]))
bufs.append(co.flush())
combuf = b''.join(bufs)
decombuf = zlib.decompress(combuf)
# Test type of return value
self.assertIsInstance(decombuf, bytes)
self.assertEqual(data, decombuf)
dco = zlib.decompressobj()
bufs = []
for i in range(0, len(combuf), dcx):
bufs.append(dco.decompress(combuf[i:i+dcx]))
self.assertEqual(b'', dco.unconsumed_tail, ########
"(A) uct should be b'': not %d long" %
len(dco.unconsumed_tail))
self.assertEqual(b'', dco.unused_data)
if flush:
bufs.append(dco.flush())
else:
while True:
chunk = dco.decompress(b'')
if chunk:
bufs.append(chunk)
else:
break
self.assertEqual(b'', dco.unconsumed_tail, ########
"(B) uct should be b'': not %d long" %
len(dco.unconsumed_tail))
self.assertEqual(b'', dco.unused_data)
self.assertEqual(data, b''.join(bufs))
# Failure means: "decompressobj with init options failed"
def test_decompincflush(self):
self.test_decompinc(flush=True)
def test_decompimax(self, source=None, cx=256, dcx=64):
# compress in steps, decompress in length-restricted steps
source = source or HAMLET_SCENE
# Check a decompression object with max_length specified
data = source * 128
co = zlib.compressobj()
bufs = []
for i in range(0, len(data), cx):
bufs.append(co.compress(data[i:i+cx]))
bufs.append(co.flush())
combuf = b''.join(bufs)
self.assertEqual(data, zlib.decompress(combuf),
'compressed data failure')
dco = zlib.decompressobj()
bufs = []
cb = combuf
while cb:
#max_length = 1 + len(cb)//10
chunk = dco.decompress(cb, dcx)
self.assertFalse(len(chunk) > dcx,
'chunk too big (%d>%d)' % (len(chunk), dcx))
bufs.append(chunk)
cb = dco.unconsumed_tail
bufs.append(dco.flush())
self.assertEqual(data, b''.join(bufs), 'Wrong data retrieved')
def test_decompressmaxlen(self, flush=False):
# Check a decompression object with max_length specified
data = HAMLET_SCENE * 128
co = zlib.compressobj()
bufs = []
for i in range(0, len(data), 256):
bufs.append(co.compress(data[i:i+256]))
bufs.append(co.flush())
combuf = b''.join(bufs)
self.assertEqual(data, zlib.decompress(combuf),
'compressed data failure')
dco = zlib.decompressobj()
bufs = []
cb = combuf
while cb:
max_length = 1 + len(cb)//10
chunk = dco.decompress(cb, max_length)
self.assertFalse(len(chunk) > max_length,
'chunk too big (%d>%d)' % (len(chunk),max_length))
bufs.append(chunk)
cb = dco.unconsumed_tail
if flush:
bufs.append(dco.flush())
else:
while chunk:
chunk = dco.decompress(b'', max_length)
self.assertFalse(len(chunk) > max_length,
'chunk too big (%d>%d)' % (len(chunk),max_length))
bufs.append(chunk)
self.assertEqual(data, b''.join(bufs), 'Wrong data retrieved')
def test_decompressmaxlenflush(self):
self.test_decompressmaxlen(flush=True)
def test_maxlenmisc(self):
# Misc tests of max_length
dco = zlib.decompressobj()
self.assertRaises(ValueError, dco.decompress, b"", -1)
self.assertEqual(b'', dco.unconsumed_tail)
def test_maxlen_large(self):
# Sizes up to sys.maxsize should be accepted, although zlib is
# internally limited to expressing sizes with unsigned int
data = HAMLET_SCENE * 10
self.assertGreater(len(data), zlib.DEF_BUF_SIZE)
compressed = zlib.compress(data, 1)
dco = zlib.decompressobj()
self.assertEqual(dco.decompress(compressed, sys.maxsize), data)
def test_maxlen_custom(self):
data = HAMLET_SCENE * 10
compressed = zlib.compress(data, 1)
dco = zlib.decompressobj()
self.assertEqual(dco.decompress(compressed, CustomInt()), data[:100])
def test_clear_unconsumed_tail(self):
# Issue #12050: calling decompress() without providing max_length
# should clear the unconsumed_tail attribute.
cdata = b"x\x9cKLJ\x06\x00\x02M\x01" # "abc"
dco = zlib.decompressobj()
ddata = dco.decompress(cdata, 1)
ddata += dco.decompress(dco.unconsumed_tail)
self.assertEqual(dco.unconsumed_tail, b"")
def test_flushes(self):
# Test flush() with the various options, using all the
# different levels in order to provide more variations.
sync_opt = ['Z_NO_FLUSH', 'Z_SYNC_FLUSH', 'Z_FULL_FLUSH',
'Z_PARTIAL_FLUSH']
ver = tuple(int(v) for v in zlib.ZLIB_RUNTIME_VERSION.split('.'))
# Z_BLOCK has a known failure prior to 1.2.5.3
if ver >= (1, 2, 5, 3):
sync_opt.append('Z_BLOCK')
sync_opt = [getattr(zlib, opt) for opt in sync_opt
if hasattr(zlib, opt)]
data = HAMLET_SCENE * 8
for sync in sync_opt:
for level in range(10):
try:
obj = zlib.compressobj( level )
a = obj.compress( data[:3000] )
b = obj.flush( sync )
c = obj.compress( data[3000:] )
d = obj.flush()
except:
print("Error for flush mode={}, level={}"
.format(sync, level))
raise
self.assertEqual(zlib.decompress(b''.join([a,b,c,d])),
data, ("Decompress failed: flush "
"mode=%i, level=%i") % (sync, level))
del obj
@unittest.skipUnless(hasattr(zlib, 'Z_SYNC_FLUSH'),
'requires zlib.Z_SYNC_FLUSH')
def test_odd_flush(self):
# Test for odd flushing bugs noted in 2.0, and hopefully fixed in 2.1
import random
# Testing on 17K of "random" data
# Create compressor and decompressor objects
co = zlib.compressobj(zlib.Z_BEST_COMPRESSION)
dco = zlib.decompressobj()
# Try 17K of data
# generate random data stream
try:
# In 2.3 and later, WichmannHill is the RNG of the bug report
gen = random.WichmannHill()
except AttributeError:
try:
# 2.2 called it Random
gen = random.Random()
except AttributeError:
# others might simply have a single RNG
gen = random
gen.seed(1)
data = genblock(1, 17 * 1024, generator=gen)
# compress, sync-flush, and decompress
first = co.compress(data)
second = co.flush(zlib.Z_SYNC_FLUSH)
expanded = dco.decompress(first + second)
# if decompressed data is different from the input data, choke.
self.assertEqual(expanded, data, "17K random source doesn't match")
def test_empty_flush(self):
# Test that calling .flush() on unused objects works.
# (Bug #1083110 -- calling .flush() on decompress objects
# caused a core dump.)
co = zlib.compressobj(zlib.Z_BEST_COMPRESSION)
self.assertTrue(co.flush()) # Returns a zlib header
dco = zlib.decompressobj()
self.assertEqual(dco.flush(), b"") # Returns nothing
def test_dictionary(self):
h = HAMLET_SCENE
# Build a simulated dictionary out of the words in HAMLET.
words = h.split()
random.shuffle(words)
zdict = b''.join(words)
# Use it to compress HAMLET.
co = zlib.compressobj(zdict=zdict)
cd = co.compress(h) + co.flush()
# Verify that it will decompress with the dictionary.
dco = zlib.decompressobj(zdict=zdict)
self.assertEqual(dco.decompress(cd) + dco.flush(), h)
# Verify that it fails when not given the dictionary.
dco = zlib.decompressobj()
self.assertRaises(zlib.error, dco.decompress, cd)
def test_dictionary_streaming(self):
# This simulates the reuse of a compressor object for compressing
# several separate data streams.
co = zlib.compressobj(zdict=HAMLET_SCENE)
do = zlib.decompressobj(zdict=HAMLET_SCENE)
piece = HAMLET_SCENE[1000:1500]
d0 = co.compress(piece) + co.flush(zlib.Z_SYNC_FLUSH)
d1 = co.compress(piece[100:]) + co.flush(zlib.Z_SYNC_FLUSH)
d2 = co.compress(piece[:-100]) + co.flush(zlib.Z_SYNC_FLUSH)
self.assertEqual(do.decompress(d0), piece)
self.assertEqual(do.decompress(d1), piece[100:])
self.assertEqual(do.decompress(d2), piece[:-100])
def test_decompress_incomplete_stream(self):
# This is 'foo', deflated
x = b'x\x9cK\xcb\xcf\x07\x00\x02\x82\x01E'
# For the record
self.assertEqual(zlib.decompress(x), b'foo')
self.assertRaises(zlib.error, zlib.decompress, x[:-5])
# Omitting the stream end works with decompressor objects
# (see issue #8672).
dco = zlib.decompressobj()
y = dco.decompress(x[:-5])
y += dco.flush()
self.assertEqual(y, b'foo')
def test_decompress_eof(self):
x = b'x\x9cK\xcb\xcf\x07\x00\x02\x82\x01E' # 'foo'
dco = zlib.decompressobj()
self.assertFalse(dco.eof)
dco.decompress(x[:-5])
self.assertFalse(dco.eof)
dco.decompress(x[-5:])
self.assertTrue(dco.eof)
dco.flush()
self.assertTrue(dco.eof)
def test_decompress_eof_incomplete_stream(self):
x = b'x\x9cK\xcb\xcf\x07\x00\x02\x82\x01E' # 'foo'
dco = zlib.decompressobj()
self.assertFalse(dco.eof)
dco.decompress(x[:-5])
self.assertFalse(dco.eof)
dco.flush()
self.assertFalse(dco.eof)
def test_decompress_unused_data(self):
# Repeated calls to decompress() after EOF should accumulate data in
# dco.unused_data, instead of just storing the arg to the last call.
source = b'abcdefghijklmnopqrstuvwxyz'
remainder = b'0123456789'
y = zlib.compress(source)
x = y + remainder
for maxlen in 0, 1000:
for step in 1, 2, len(y), len(x):
dco = zlib.decompressobj()
data = b''
for i in range(0, len(x), step):
if i < len(y):
self.assertEqual(dco.unused_data, b'')
if maxlen == 0:
data += dco.decompress(x[i : i + step])
self.assertEqual(dco.unconsumed_tail, b'')
else:
data += dco.decompress(
dco.unconsumed_tail + x[i : i + step], maxlen)
data += dco.flush()
self.assertTrue(dco.eof)
self.assertEqual(data, source)
self.assertEqual(dco.unconsumed_tail, b'')
self.assertEqual(dco.unused_data, remainder)
# issue27164
def test_decompress_raw_with_dictionary(self):
zdict = b'abcdefghijklmnopqrstuvwxyz'
co = zlib.compressobj(wbits=-zlib.MAX_WBITS, zdict=zdict)
comp = co.compress(zdict) + co.flush()
dco = zlib.decompressobj(wbits=-zlib.MAX_WBITS, zdict=zdict)
uncomp = dco.decompress(comp) + dco.flush()
self.assertEqual(zdict, uncomp)
def test_flush_with_freed_input(self):
# Issue #16411: decompressor accesses input to last decompress() call
# in flush(), even if this object has been freed in the meanwhile.
input1 = b'abcdefghijklmnopqrstuvwxyz'
input2 = b'QWERTYUIOPASDFGHJKLZXCVBNM'
data = zlib.compress(input1)
dco = zlib.decompressobj()
dco.decompress(data, 1)
del data
data = zlib.compress(input2)
self.assertEqual(dco.flush(), input1[1:])
@bigmemtest(size=_4G, memuse=1)
def test_flush_large_length(self, size):
# Test flush(length) parameter greater than internal limit UINT_MAX
input = HAMLET_SCENE * 10
data = zlib.compress(input, 1)
dco = zlib.decompressobj()
dco.decompress(data, 1)
self.assertEqual(dco.flush(size), input[1:])
def test_flush_custom_length(self):
input = HAMLET_SCENE * 10
data = zlib.compress(input, 1)
dco = zlib.decompressobj()
dco.decompress(data, 1)
self.assertEqual(dco.flush(CustomInt()), input[1:])
@requires_Compress_copy
def test_compresscopy(self):
# Test copying a compression object
data0 = HAMLET_SCENE
data1 = bytes(str(HAMLET_SCENE, "ascii").swapcase(), "ascii")
c0 = zlib.compressobj(zlib.Z_BEST_COMPRESSION)
bufs0 = []
bufs0.append(c0.compress(data0))
c1 = c0.copy()
bufs1 = bufs0[:]
bufs0.append(c0.compress(data0))
bufs0.append(c0.flush())
s0 = b''.join(bufs0)
bufs1.append(c1.compress(data1))
bufs1.append(c1.flush())
s1 = b''.join(bufs1)
self.assertEqual(zlib.decompress(s0),data0+data0)
self.assertEqual(zlib.decompress(s1),data0+data1)
@requires_Compress_copy
def test_badcompresscopy(self):
# Test copying a compression object in an inconsistent state
c = zlib.compressobj()
c.compress(HAMLET_SCENE)
c.flush()
self.assertRaises(ValueError, c.copy)
@requires_Decompress_copy
def test_decompresscopy(self):
# Test copying a decompression object
data = HAMLET_SCENE
comp = zlib.compress(data)
# Test type of return value
self.assertIsInstance(comp, bytes)
d0 = zlib.decompressobj()
bufs0 = []
bufs0.append(d0.decompress(comp[:32]))
d1 = d0.copy()
bufs1 = bufs0[:]
bufs0.append(d0.decompress(comp[32:]))
s0 = b''.join(bufs0)
bufs1.append(d1.decompress(comp[32:]))
s1 = b''.join(bufs1)
self.assertEqual(s0,s1)
self.assertEqual(s0,data)
@requires_Decompress_copy
def test_baddecompresscopy(self):
# Test copying a compression object in an inconsistent state
data = zlib.compress(HAMLET_SCENE)
d = zlib.decompressobj()
d.decompress(data)
d.flush()
self.assertRaises(ValueError, d.copy)
def test_compresspickle(self):
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
with self.assertRaises((TypeError, pickle.PicklingError)):
pickle.dumps(zlib.compressobj(zlib.Z_BEST_COMPRESSION), proto)
def test_decompresspickle(self):
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
with self.assertRaises((TypeError, pickle.PicklingError)):
pickle.dumps(zlib.decompressobj(), proto)
# Memory use of the following functions takes into account overallocation
@unittest.skipUnless(cosmo.MODE == "dbg", "disabled tracemalloc")
@bigmemtest(size=_1G + 1024 * 1024, memuse=3)
def test_big_compress_buffer(self, size):
import tracemalloc
tracemalloc.start(20)
c = zlib.compressobj(1)
compress = lambda s: c.compress(s) + c.flush()
self.check_big_compress_buffer(size, compress)
@bigmemtest(size=_1G + 1024 * 1024, memuse=2)
def test_big_decompress_buffer(self, size):
d = zlib.decompressobj()
decompress = lambda s: d.decompress(s) + d.flush()
self.check_big_decompress_buffer(size, decompress)
@unittest.skipUnless(sys.maxsize > 2**32, 'requires 64bit platform')
@bigmemtest(size=_4G + 100, memuse=4)
def test_64bit_compress(self, size):
data = b'x' * size
co = zlib.compressobj(0)
do = zlib.decompressobj()
try:
comp = co.compress(data) + co.flush()
uncomp = do.decompress(comp) + do.flush()
self.assertEqual(uncomp, data)
finally:
comp = uncomp = data = None
@unittest.skipUnless(sys.maxsize > 2**32, 'requires 64bit platform')
@bigmemtest(size=_4G + 100, memuse=3)
def test_large_unused_data(self, size):
data = b'abcdefghijklmnop'
unused = b'x' * size
comp = zlib.compress(data) + unused
do = zlib.decompressobj()
try:
uncomp = do.decompress(comp) + do.flush()
self.assertEqual(unused, do.unused_data)
self.assertEqual(uncomp, data)
finally:
unused = comp = do = None
@unittest.skipUnless(sys.maxsize > 2**32, 'requires 64bit platform')
@bigmemtest(size=_4G + 100, memuse=5)
def test_large_unconsumed_tail(self, size):
data = b'x' * size
do = zlib.decompressobj()
try:
comp = zlib.compress(data, 0)
uncomp = do.decompress(comp, 1) + do.flush()
self.assertEqual(uncomp, data)
self.assertEqual(do.unconsumed_tail, b'')
finally:
comp = uncomp = data = None
def test_wbits(self):
# wbits=0 only supported since zlib v1.2.3.5
# Register "1.2.3" as "1.2.3.0"
# or "1.2.0-linux","1.2.0.f","1.2.0.f-linux"
v = zlib.ZLIB_RUNTIME_VERSION.split('-', 1)[0].split('.')
if len(v) < 4:
v.append('0')
elif not v[-1].isnumeric():
v[-1] = '0'
v = tuple(map(int, v))
supports_wbits_0 = v >= (1, 2, 3, 5)
co = zlib.compressobj(level=1, wbits=15)
zlib15 = co.compress(HAMLET_SCENE) + co.flush()
self.assertEqual(zlib.decompress(zlib15, 15), HAMLET_SCENE)
if supports_wbits_0:
self.assertEqual(zlib.decompress(zlib15, 0), HAMLET_SCENE)
self.assertEqual(zlib.decompress(zlib15, 32 + 15), HAMLET_SCENE)
with self.assertRaisesRegex(zlib.error, 'invalid window size'):
zlib.decompress(zlib15, 14)
dco = zlib.decompressobj(wbits=32 + 15)
self.assertEqual(dco.decompress(zlib15), HAMLET_SCENE)
dco = zlib.decompressobj(wbits=14)
with self.assertRaisesRegex(zlib.error, 'invalid window size'):
dco.decompress(zlib15)
co = zlib.compressobj(level=1, wbits=9)
zlib9 = co.compress(HAMLET_SCENE) + co.flush()
self.assertEqual(zlib.decompress(zlib9, 9), HAMLET_SCENE)
self.assertEqual(zlib.decompress(zlib9, 15), HAMLET_SCENE)
if supports_wbits_0:
self.assertEqual(zlib.decompress(zlib9, 0), HAMLET_SCENE)
self.assertEqual(zlib.decompress(zlib9, 32 + 9), HAMLET_SCENE)
dco = zlib.decompressobj(wbits=32 + 9)
self.assertEqual(dco.decompress(zlib9), HAMLET_SCENE)
co = zlib.compressobj(level=1, wbits=-15)
deflate15 = co.compress(HAMLET_SCENE) + co.flush()
self.assertEqual(zlib.decompress(deflate15, -15), HAMLET_SCENE)
dco = zlib.decompressobj(wbits=-15)
self.assertEqual(dco.decompress(deflate15), HAMLET_SCENE)
co = zlib.compressobj(level=1, wbits=-9)
deflate9 = co.compress(HAMLET_SCENE) + co.flush()
self.assertEqual(zlib.decompress(deflate9, -9), HAMLET_SCENE)
self.assertEqual(zlib.decompress(deflate9, -15), HAMLET_SCENE)
dco = zlib.decompressobj(wbits=-9)
self.assertEqual(dco.decompress(deflate9), HAMLET_SCENE)
co = zlib.compressobj(level=1, wbits=16 + 15)
gzip = co.compress(HAMLET_SCENE) + co.flush()
self.assertEqual(zlib.decompress(gzip, 16 + 15), HAMLET_SCENE)
self.assertEqual(zlib.decompress(gzip, 32 + 15), HAMLET_SCENE)
dco = zlib.decompressobj(32 + 15)
self.assertEqual(dco.decompress(gzip), HAMLET_SCENE)
def genblock(seed, length, step=1024, generator=random):
"""length-byte stream of random data from a seed (in step-byte blocks)."""
if seed is not None:
generator.seed(seed)
randint = generator.randint
if length < step or step < 2:
step = length
blocks = bytes()
for i in range(0, length, step):
blocks += bytes(randint(0, 255) for x in range(step))
return blocks
def choose_lines(source, number, seed=None, generator=random):
"""Return a list of number lines randomly chosen from the source"""
if seed is not None:
generator.seed(seed)
sources = source.split('\n')
return [generator.choice(sources) for n in range(number)]
HAMLET_SCENE = b"""
LAERTES
O, fear me not.
I stay too long: but here my father comes.
Enter POLONIUS
A double blessing is a double grace,
Occasion smiles upon a second leave.
LORD POLONIUS
Yet here, Laertes! aboard, aboard, for shame!
The wind sits in the shoulder of your sail,
And you are stay'd for. There; my blessing with thee!
And these few precepts in thy memory
See thou character. Give thy thoughts no tongue,
Nor any unproportioned thought his act.
Be thou familiar, but by no means vulgar.
Those friends thou hast, and their adoption tried,
Grapple them to thy soul with hoops of steel;
But do not dull thy palm with entertainment
Of each new-hatch'd, unfledged comrade. Beware
Of entrance to a quarrel, but being in,
Bear't that the opposed may beware of thee.
Give every man thy ear, but few thy voice;
Take each man's censure, but reserve thy judgment.
Costly thy habit as thy purse can buy,
But not express'd in fancy; rich, not gaudy;
For the apparel oft proclaims the man,
And they in France of the best rank and station
Are of a most select and generous chief in that.
Neither a borrower nor a lender be;
For loan oft loses both itself and friend,
And borrowing dulls the edge of husbandry.
This above all: to thine ownself be true,
And it must follow, as the night the day,
Thou canst not then be false to any man.
Farewell: my blessing season this in thee!
LAERTES
Most humbly do I take my leave, my lord.
LORD POLONIUS
The time invites you; go; your servants tend.
LAERTES
Farewell, Ophelia; and remember well
What I have said to you.
OPHELIA
'Tis in my memory lock'd,
And you yourself shall keep the key of it.
LAERTES
Farewell.
"""
class CustomInt:
def __int__(self):
return 100
if __name__ == "__main__":
unittest.main()
| 34,959 | 919 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_largefile.py | """Test largefile support on system where this makes sense.
"""
import os
import stat
import sys
import unittest
from test.support import TESTFN, requires, unlink, bigmemtest
import io # C implementation of io
import _pyio as pyio # Python implementation of io
# size of file to create (>2 GiB; 2 GiB == 2,147,483,648 bytes)
size = 2_500_000_000
class LargeFileTest:
"""Test that each file function works as expected for large
(i.e. > 2GB) files.
"""
def setUp(self):
if os.path.exists(TESTFN):
mode = 'r+b'
else:
mode = 'w+b'
with self.open(TESTFN, mode) as f:
current_size = os.fstat(f.fileno())[stat.ST_SIZE]
if current_size == size+1:
return
if current_size == 0:
f.write(b'z')
f.seek(0)
f.seek(size)
f.write(b'a')
f.flush()
self.assertEqual(os.fstat(f.fileno())[stat.ST_SIZE], size+1)
@classmethod
def tearDownClass(cls):
with cls.open(TESTFN, 'wb'):
pass
if not os.stat(TESTFN)[stat.ST_SIZE] == 0:
raise cls.failureException('File was not truncated by opening '
'with mode "wb"')
# _pyio.FileIO.readall() uses a temporary bytearray then casted to bytes,
# so memuse=2 is needed
@bigmemtest(size=size, memuse=2, dry_run=False)
def test_large_read(self, _size):
# bpo-24658: Test that a read greater than 2GB does not fail.
with self.open(TESTFN, "rb") as f:
self.assertEqual(len(f.read()), size + 1)
self.assertEqual(f.tell(), size + 1)
def test_osstat(self):
self.assertEqual(os.stat(TESTFN)[stat.ST_SIZE], size+1)
def test_seek_read(self):
with self.open(TESTFN, 'rb') as f:
self.assertEqual(f.tell(), 0)
self.assertEqual(f.read(1), b'z')
self.assertEqual(f.tell(), 1)
f.seek(0)
self.assertEqual(f.tell(), 0)
f.seek(0, 0)
self.assertEqual(f.tell(), 0)
f.seek(42)
self.assertEqual(f.tell(), 42)
f.seek(42, 0)
self.assertEqual(f.tell(), 42)
f.seek(42, 1)
self.assertEqual(f.tell(), 84)
f.seek(0, 1)
self.assertEqual(f.tell(), 84)
f.seek(0, 2) # seek from the end
self.assertEqual(f.tell(), size + 1 + 0)
f.seek(-10, 2)
self.assertEqual(f.tell(), size + 1 - 10)
f.seek(-size-1, 2)
self.assertEqual(f.tell(), 0)
f.seek(size)
self.assertEqual(f.tell(), size)
# the 'a' that was written at the end of file above
self.assertEqual(f.read(1), b'a')
f.seek(-size-1, 1)
self.assertEqual(f.read(1), b'z')
self.assertEqual(f.tell(), 1)
def test_lseek(self):
with self.open(TESTFN, 'rb') as f:
self.assertEqual(os.lseek(f.fileno(), 0, 0), 0)
self.assertEqual(os.lseek(f.fileno(), 42, 0), 42)
self.assertEqual(os.lseek(f.fileno(), 42, 1), 84)
self.assertEqual(os.lseek(f.fileno(), 0, 1), 84)
self.assertEqual(os.lseek(f.fileno(), 0, 2), size+1+0)
self.assertEqual(os.lseek(f.fileno(), -10, 2), size+1-10)
self.assertEqual(os.lseek(f.fileno(), -size-1, 2), 0)
self.assertEqual(os.lseek(f.fileno(), size, 0), size)
# the 'a' that was written at the end of file above
self.assertEqual(f.read(1), b'a')
def test_truncate(self):
with self.open(TESTFN, 'r+b') as f:
if not hasattr(f, 'truncate'):
raise unittest.SkipTest("open().truncate() not available "
"on this system")
f.seek(0, 2)
# else we've lost track of the true size
self.assertEqual(f.tell(), size+1)
# Cut it back via seek + truncate with no argument.
newsize = size - 10
f.seek(newsize)
f.truncate()
self.assertEqual(f.tell(), newsize) # else pointer moved
f.seek(0, 2)
self.assertEqual(f.tell(), newsize) # else wasn't truncated
# Ensure that truncate(smaller than true size) shrinks
# the file.
newsize -= 1
f.seek(42)
f.truncate(newsize)
self.assertEqual(f.tell(), 42)
f.seek(0, 2)
self.assertEqual(f.tell(), newsize)
# XXX truncate(larger than true size) is ill-defined
# across platform; cut it waaaaay back
f.seek(0)
f.truncate(1)
self.assertEqual(f.tell(), 0) # else pointer moved
f.seek(0)
self.assertEqual(len(f.read()), 1) # else wasn't truncated
def test_seekable(self):
# Issue #5016; seekable() can return False when the current position
# is negative when truncated to an int.
for pos in (2**31-1, 2**31, 2**31+1):
with self.open(TESTFN, 'rb') as f:
f.seek(pos)
self.assertTrue(f.seekable())
def setUpModule():
try:
import signal
# The default handler for SIGXFSZ is to abort the process.
# By ignoring it, system calls exceeding the file size resource
# limit will raise OSError instead of crashing the interpreter.
signal.signal(signal.SIGXFSZ, signal.SIG_IGN)
except (ImportError, AttributeError):
pass
# On Windows and Mac OSX this test consumes large resources; It
# takes a long time to build the >2 GiB file and takes >2 GiB of disk
# space therefore the resource must be enabled to run this test.
# If not, nothing after this line stanza will be executed.
if sys.platform[:3] == 'win' or sys.platform == 'darwin':
requires('largefile',
'test requires %s bytes and a long time to run' % str(size))
else:
# Only run if the current filesystem supports large files.
# (Skip this test on Windows, since we now always support
# large files.)
f = open(TESTFN, 'wb', buffering=0)
try:
# 2**31 == 2147483648
f.seek(2147483649)
# Seeking is not enough of a test: you must write and flush, too!
f.write(b'x')
f.flush()
except (OSError, OverflowError):
raise unittest.SkipTest("filesystem does not have "
"largefile support")
finally:
f.close()
unlink(TESTFN)
class CLargeFileTest(LargeFileTest, unittest.TestCase):
open = staticmethod(io.open)
class PyLargeFileTest(LargeFileTest, unittest.TestCase):
open = staticmethod(pyio.open)
def tearDownModule():
unlink(TESTFN)
if __name__ == '__main__':
unittest.main()
| 6,993 | 190 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_wait4.py | """This test checks for correct wait4() behavior.
"""
import os
import time
import sys
import unittest
from test.fork_wait import ForkWait
from test.support import reap_children, get_attribute
# If either of these do not exist, skip this test.
get_attribute(os, 'fork')
get_attribute(os, 'wait4')
class Wait4Test(ForkWait):
def wait_impl(self, cpid):
option = os.WNOHANG
if sys.platform.startswith('aix'):
# Issue #11185: wait4 is broken on AIX and will always return 0
# with WNOHANG.
option = 0
deadline = time.monotonic() + 10.0
while time.monotonic() <= deadline:
# wait4() shouldn't hang, but some of the buildbots seem to hang
# in the forking tests. This is an attempt to fix the problem.
spid, status, rusage = os.wait4(cpid, option)
if spid == cpid:
break
time.sleep(0.1)
self.assertEqual(spid, cpid)
self.assertEqual(status, 0, "cause = %d, exit = %d" % (status&0xff, status>>8))
self.assertTrue(rusage)
def tearDownModule():
reap_children()
if __name__ == "__main__":
unittest.main()
| 1,182 | 40 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_grammar.py | # Python test set -- part 1, grammar.
# This just tests whether the parser accepts them all.
from test.support import check_syntax_error
import inspect
import unittest
import sys
# testing import *
from sys import *
# different import patterns to check that __annotations__ does not interfere
# with import machinery
import test.ann_module as ann_module
import typing
from collections import ChainMap
from test import ann_module2
import test
# These are shared with test_tokenize and other test modules.
#
# Note: since several test cases filter out floats by looking for "e" and ".",
# don't add hexadecimal literals that contain "e" or "E".
VALID_UNDERSCORE_LITERALS = [
'0_0_0',
'4_2',
'1_0000_0000',
'0b1001_0100',
'0xffff_ffff',
'0o5_7_7',
'1_00_00.5',
'1_00_00.5e5',
'1_00_00e5_1',
'1e1_0',
'.1_4',
'.1_4e1',
'0b_0',
'0x_f',
'0o_5',
'1_00_00j',
'1_00_00.5j',
'1_00_00e5_1j',
'.1_4j',
'(1_2.5+3_3j)',
'(.5_6j)',
]
INVALID_UNDERSCORE_LITERALS = [
# Trailing underscores:
'0_',
'42_',
'1.4j_',
'0x_',
'0b1_',
'0xf_',
'0o5_',
'0 if 1_Else 1',
# Underscores in the base selector:
'0_b0',
'0_xf',
'0_o5',
# Old-style octal, still disallowed:
# '0_7',
'09_99',
# Multiple consecutive underscores:
'4_______2',
'0.1__4',
'0.1__4j',
'0b1001__0100',
'0xffff__ffff',
'0x___',
'0o5__77',
'1e1__0',
'1e1__0j',
# Underscore right before a dot:
'1_.4',
'1_.4j',
# Underscore right after a dot:
'1._4',
'1._4j',
'._5',
'._5j',
# Underscore right after a sign:
'1.0e+_1',
'1.0e+_1j',
# Underscore right before j:
'1.4_j',
'1.4e5_j',
# Underscore right before e:
'1_e1',
'1.4_e1',
'1.4_e1j',
# Underscore right after e:
'1e_1',
'1.4e_1',
'1.4e_1j',
# Complex cases with parens:
'(1+1.5_j_)',
'(1+1.5_j)',
]
class TokenTests(unittest.TestCase):
def test_backslash(self):
# Backslash means line continuation:
x = 1 \
+ 1
self.assertEqual(x, 2, 'backslash for line continuation')
# Backslash does not means continuation in comments :\
x = 0
self.assertEqual(x, 0, 'backslash ending comment')
def test_plain_integers(self):
self.assertEqual(type(000), type(0))
self.assertEqual(0xff, 255)
self.assertEqual(0o377, 255)
self.assertEqual(2147483647, 0o17777777777)
self.assertEqual(0b1001, 9)
# "0x" is not a valid literal
self.assertRaises(SyntaxError, eval, "0x")
from sys import maxsize
if maxsize == 2147483647:
self.assertEqual(-2147483647-1, -0o20000000000)
# XXX -2147483648
self.assertTrue(0o37777777777 > 0)
self.assertTrue(0xffffffff > 0)
self.assertTrue(0b1111111111111111111111111111111 > 0)
for s in ('2147483648', '0o40000000000', '0x100000000',
'0b10000000000000000000000000000000'):
try:
x = eval(s)
except OverflowError:
self.fail("OverflowError on huge integer literal %r" % s)
elif maxsize == 9223372036854775807:
self.assertEqual(-9223372036854775807-1, -0o1000000000000000000000)
self.assertTrue(0o1777777777777777777777 > 0)
self.assertTrue(0xffffffffffffffff > 0)
self.assertTrue(0b11111111111111111111111111111111111111111111111111111111111111 > 0)
for s in '9223372036854775808', '0o2000000000000000000000', \
'0x10000000000000000', \
'0b100000000000000000000000000000000000000000000000000000000000000':
try:
x = eval(s)
except OverflowError:
self.fail("OverflowError on huge integer literal %r" % s)
else:
self.fail('Weird maxsize value %r' % maxsize)
def test_long_integers(self):
x = 0
x = 0xffffffffffffffff
x = 0Xffffffffffffffff
x = 0o77777777777777777
x = 0O77777777777777777
x = 123456789012345678901234567890
x = 0b100000000000000000000000000000000000000000000000000000000000000000000
x = 0B111111111111111111111111111111111111111111111111111111111111111111111
def test_floats(self):
x = 3.14
x = 314.
x = 0.314
# XXX x = 000.314
x = .314
x = 3e14
x = 3E14
x = 3e-14
x = 3e+14
x = 3.e14
x = .3e14
x = 3.1e4
def test_float_exponent_tokenization(self):
# See issue 21642.
self.assertEqual(1 if 1else 0, 1)
self.assertEqual(1 if 0else 0, 0)
self.assertRaises(SyntaxError, eval, "0 if 1Else 0")
def test_underscore_literals(self):
for lit in VALID_UNDERSCORE_LITERALS:
self.assertEqual(eval(lit), eval(lit.replace('_', '')))
for lit in INVALID_UNDERSCORE_LITERALS:
self.assertRaises(SyntaxError, eval, lit)
# Sanity check: no literal begins with an underscore
self.assertRaises(NameError, eval, "_0")
def test_string_literals(self):
x = ''; y = ""; self.assertTrue(len(x) == 0 and x == y)
x = '\''; y = "'"; self.assertTrue(len(x) == 1 and x == y and ord(x) == 39)
x = '"'; y = "\""; self.assertTrue(len(x) == 1 and x == y and ord(x) == 34)
x = "doesn't \"shrink\" does it"
y = 'doesn\'t "shrink" does it'
self.assertTrue(len(x) == 24 and x == y)
x = "does \"shrink\" doesn't it"
y = 'does "shrink" doesn\'t it'
self.assertTrue(len(x) == 24 and x == y)
x = """
The "quick"
brown fox
jumps over
the 'lazy' dog.
"""
y = '\nThe "quick"\nbrown fox\njumps over\nthe \'lazy\' dog.\n'
self.assertEqual(x, y)
y = '''
The "quick"
brown fox
jumps over
the 'lazy' dog.
'''
self.assertEqual(x, y)
y = "\n\
The \"quick\"\n\
brown fox\n\
jumps over\n\
the 'lazy' dog.\n\
"
self.assertEqual(x, y)
y = '\n\
The \"quick\"\n\
brown fox\n\
jumps over\n\
the \'lazy\' dog.\n\
'
self.assertEqual(x, y)
def test_ellipsis(self):
x = ...
self.assertTrue(x is Ellipsis)
self.assertRaises(SyntaxError, eval, ".. .")
def test_eof_error(self):
samples = ("def foo(", "\ndef foo(", "def foo(\n")
for s in samples:
with self.assertRaises(SyntaxError) as cm:
compile(s, "<test>", "exec")
self.assertIn("unexpected EOF", str(cm.exception))
var_annot_global: int # a global annotated is necessary for test_var_annot
# custom namespace for testing __annotations__
class CNS:
def __init__(self):
self._dct = {}
def __setitem__(self, item, value):
self._dct[item.lower()] = value
def __getitem__(self, item):
return self._dct[item]
class GrammarTests(unittest.TestCase):
# single_input: NEWLINE | simple_stmt | compound_stmt NEWLINE
# XXX can't test in a script -- this rule is only used when interactive
# file_input: (NEWLINE | stmt)* ENDMARKER
# Being tested as this very moment this very module
# expr_input: testlist NEWLINE
# XXX Hard to test -- used only in calls to input()
def test_eval_input(self):
# testlist ENDMARKER
x = eval('1, 0 or 1')
def test_var_annot_basics(self):
# all these should be allowed
var1: int = 5
var2: [int, str]
my_lst = [42]
def one():
return 1
int.new_attr: int
[list][0]: type
my_lst[one()-1]: int = 5
self.assertEqual(my_lst, [5])
def test_var_annot_syntax_errors(self):
# parser pass
check_syntax_error(self, "def f: int")
check_syntax_error(self, "x: int: str")
check_syntax_error(self, "def f():\n"
" nonlocal x: int\n")
# AST pass
check_syntax_error(self, "[x, 0]: int\n")
check_syntax_error(self, "f(): int\n")
check_syntax_error(self, "(x,): int")
check_syntax_error(self, "def f():\n"
" (x, y): int = (1, 2)\n")
# symtable pass
check_syntax_error(self, "def f():\n"
" x: int\n"
" global x\n")
check_syntax_error(self, "def f():\n"
" global x\n"
" x: int\n")
def test_var_annot_basic_semantics(self):
# execution order
with self.assertRaises(ZeroDivisionError):
no_name[does_not_exist]: no_name_again = 1/0
with self.assertRaises(NameError):
no_name[does_not_exist]: 1/0 = 0
global var_annot_global
# function semantics
def f():
st: str = "Hello"
a.b: int = (1, 2)
return st
self.assertEqual(f.__annotations__, {})
def f_OK():
x: 1/0
f_OK()
def fbad():
x: int
print(x)
with self.assertRaises(UnboundLocalError):
fbad()
def f2bad():
(no_such_global): int
print(no_such_global)
try:
f2bad()
except Exception as e:
self.assertIs(type(e), NameError)
# class semantics
class C:
__foo: int
s: str = "attr"
z = 2
def __init__(self, x):
self.x: int = x
self.assertEqual(C.__annotations__, {'_C__foo': int, 's': str})
with self.assertRaises(NameError):
class CBad:
no_such_name_defined.attr: int = 0
with self.assertRaises(NameError):
class Cbad2(C):
x: int
x.y: list = []
def test_var_annot_metaclass_semantics(self):
class CMeta(type):
@classmethod
def __prepare__(metacls, name, bases, **kwds):
return {'__annotations__': CNS()}
class CC(metaclass=CMeta):
XX: 'ANNOT'
self.assertEqual(CC.__annotations__['xx'], 'ANNOT')
def test_var_annot_module_semantics(self):
with self.assertRaises(AttributeError):
print(test.__annotations__)
self.assertEqual(ann_module.__annotations__,
{1: 2, 'x': int, 'y': str, 'f': typing.Tuple[int, int]})
self.assertEqual(ann_module.M.__annotations__,
{'123': 123, 'o': type})
self.assertEqual(ann_module2.__annotations__, {})
def test_var_annot_in_module(self):
# check that functions fail the same way when executed
# outside of module where they were defined
from test.ann_module3 import f_bad_ann, g_bad_ann, D_bad_ann
with self.assertRaises(NameError):
f_bad_ann()
with self.assertRaises(NameError):
g_bad_ann()
with self.assertRaises(NameError):
D_bad_ann(5)
def test_var_annot_simple_exec(self):
gns = {}; lns= {}
exec("'docstring'\n"
"__annotations__[1] = 2\n"
"x: int = 5\n", gns, lns)
self.assertEqual(lns["__annotations__"], {1: 2, 'x': int})
with self.assertRaises(KeyError):
gns['__annotations__']
def test_var_annot_custom_maps(self):
# tests with custom locals() and __annotations__
ns = {'__annotations__': CNS()}
exec('X: int; Z: str = "Z"; (w): complex = 1j', ns)
self.assertEqual(ns['__annotations__']['x'], int)
self.assertEqual(ns['__annotations__']['z'], str)
with self.assertRaises(KeyError):
ns['__annotations__']['w']
nonloc_ns = {}
class CNS2:
def __init__(self):
self._dct = {}
def __setitem__(self, item, value):
nonlocal nonloc_ns
self._dct[item] = value
nonloc_ns[item] = value
def __getitem__(self, item):
return self._dct[item]
exec('x: int = 1', {}, CNS2())
self.assertEqual(nonloc_ns['__annotations__']['x'], int)
def test_var_annot_refleak(self):
# complex case: custom locals plus custom __annotations__
# this was causing refleak
cns = CNS()
nonloc_ns = {'__annotations__': cns}
class CNS2:
def __init__(self):
self._dct = {'__annotations__': cns}
def __setitem__(self, item, value):
nonlocal nonloc_ns
self._dct[item] = value
nonloc_ns[item] = value
def __getitem__(self, item):
return self._dct[item]
exec('X: str', {}, CNS2())
self.assertEqual(nonloc_ns['__annotations__']['x'], str)
def test_funcdef(self):
### [decorators] 'def' NAME parameters ['->' test] ':' suite
### decorator: '@' dotted_name [ '(' [arglist] ')' ] NEWLINE
### decorators: decorator+
### parameters: '(' [typedargslist] ')'
### typedargslist: ((tfpdef ['=' test] ',')*
### ('*' [tfpdef] (',' tfpdef ['=' test])* [',' '**' tfpdef] | '**' tfpdef)
### | tfpdef ['=' test] (',' tfpdef ['=' test])* [','])
### tfpdef: NAME [':' test]
### varargslist: ((vfpdef ['=' test] ',')*
### ('*' [vfpdef] (',' vfpdef ['=' test])* [',' '**' vfpdef] | '**' vfpdef)
### | vfpdef ['=' test] (',' vfpdef ['=' test])* [','])
### vfpdef: NAME
def f1(): pass
f1()
f1(*())
f1(*(), **{})
def f2(one_argument): pass
def f3(two, arguments): pass
self.assertEqual(f2.__code__.co_varnames, ('one_argument',))
self.assertEqual(f3.__code__.co_varnames, ('two', 'arguments'))
def a1(one_arg,): pass
def a2(two, args,): pass
def v0(*rest): pass
def v1(a, *rest): pass
def v2(a, b, *rest): pass
f1()
f2(1)
f2(1,)
f3(1, 2)
f3(1, 2,)
v0()
v0(1)
v0(1,)
v0(1,2)
v0(1,2,3,4,5,6,7,8,9,0)
v1(1)
v1(1,)
v1(1,2)
v1(1,2,3)
v1(1,2,3,4,5,6,7,8,9,0)
v2(1,2)
v2(1,2,3)
v2(1,2,3,4)
v2(1,2,3,4,5,6,7,8,9,0)
def d01(a=1): pass
d01()
d01(1)
d01(*(1,))
d01(*[] or [2])
d01(*() or (), *{} and (), **() or {})
d01(**{'a':2})
d01(**{'a':2} or {})
def d11(a, b=1): pass
d11(1)
d11(1, 2)
d11(1, **{'b':2})
def d21(a, b, c=1): pass
d21(1, 2)
d21(1, 2, 3)
d21(*(1, 2, 3))
d21(1, *(2, 3))
d21(1, 2, *(3,))
d21(1, 2, **{'c':3})
def d02(a=1, b=2): pass
d02()
d02(1)
d02(1, 2)
d02(*(1, 2))
d02(1, *(2,))
d02(1, **{'b':2})
d02(**{'a': 1, 'b': 2})
def d12(a, b=1, c=2): pass
d12(1)
d12(1, 2)
d12(1, 2, 3)
def d22(a, b, c=1, d=2): pass
d22(1, 2)
d22(1, 2, 3)
d22(1, 2, 3, 4)
def d01v(a=1, *rest): pass
d01v()
d01v(1)
d01v(1, 2)
d01v(*(1, 2, 3, 4))
d01v(*(1,))
d01v(**{'a':2})
def d11v(a, b=1, *rest): pass
d11v(1)
d11v(1, 2)
d11v(1, 2, 3)
def d21v(a, b, c=1, *rest): pass
d21v(1, 2)
d21v(1, 2, 3)
d21v(1, 2, 3, 4)
d21v(*(1, 2, 3, 4))
d21v(1, 2, **{'c': 3})
def d02v(a=1, b=2, *rest): pass
d02v()
d02v(1)
d02v(1, 2)
d02v(1, 2, 3)
d02v(1, *(2, 3, 4))
d02v(**{'a': 1, 'b': 2})
def d12v(a, b=1, c=2, *rest): pass
d12v(1)
d12v(1, 2)
d12v(1, 2, 3)
d12v(1, 2, 3, 4)
d12v(*(1, 2, 3, 4))
d12v(1, 2, *(3, 4, 5))
d12v(1, *(2,), **{'c': 3})
def d22v(a, b, c=1, d=2, *rest): pass
d22v(1, 2)
d22v(1, 2, 3)
d22v(1, 2, 3, 4)
d22v(1, 2, 3, 4, 5)
d22v(*(1, 2, 3, 4))
d22v(1, 2, *(3, 4, 5))
d22v(1, *(2, 3), **{'d': 4})
# keyword argument type tests
try:
str('x', **{b'foo':1 })
except TypeError:
pass
else:
self.fail('Bytes should not work as keyword argument names')
# keyword only argument tests
def pos0key1(*, key): return key
pos0key1(key=100)
def pos2key2(p1, p2, *, k1, k2=100): return p1,p2,k1,k2
pos2key2(1, 2, k1=100)
pos2key2(1, 2, k1=100, k2=200)
pos2key2(1, 2, k2=100, k1=200)
def pos2key2dict(p1, p2, *, k1=100, k2, **kwarg): return p1,p2,k1,k2,kwarg
pos2key2dict(1,2,k2=100,tokwarg1=100,tokwarg2=200)
pos2key2dict(1,2,tokwarg1=100,tokwarg2=200, k2=100)
self.assertRaises(SyntaxError, eval, "def f(*): pass")
self.assertRaises(SyntaxError, eval, "def f(*,): pass")
self.assertRaises(SyntaxError, eval, "def f(*, **kwds): pass")
# keyword arguments after *arglist
def f(*args, **kwargs):
return args, kwargs
self.assertEqual(f(1, x=2, *[3, 4], y=5), ((1, 3, 4),
{'x':2, 'y':5}))
self.assertEqual(f(1, *(2,3), 4), ((1, 2, 3, 4), {}))
self.assertRaises(SyntaxError, eval, "f(1, x=2, *(3,4), x=5)")
self.assertEqual(f(**{'eggs':'scrambled', 'spam':'fried'}),
((), {'eggs':'scrambled', 'spam':'fried'}))
self.assertEqual(f(spam='fried', **{'eggs':'scrambled'}),
((), {'eggs':'scrambled', 'spam':'fried'}))
# Check ast errors in *args and *kwargs
check_syntax_error(self, "f(*g(1=2))")
check_syntax_error(self, "f(**g(1=2))")
# argument annotation tests
def f(x) -> list: pass
self.assertEqual(f.__annotations__, {'return': list})
def f(x: int): pass
self.assertEqual(f.__annotations__, {'x': int})
def f(*x: str): pass
self.assertEqual(f.__annotations__, {'x': str})
def f(**x: float): pass
self.assertEqual(f.__annotations__, {'x': float})
def f(x, y: 1+2): pass
self.assertEqual(f.__annotations__, {'y': 3})
def f(a, b: 1, c: 2, d): pass
self.assertEqual(f.__annotations__, {'b': 1, 'c': 2})
def f(a, b: 1, c: 2, d, e: 3 = 4, f=5, *g: 6): pass
self.assertEqual(f.__annotations__,
{'b': 1, 'c': 2, 'e': 3, 'g': 6})
def f(a, b: 1, c: 2, d, e: 3 = 4, f=5, *g: 6, h: 7, i=8, j: 9 = 10,
**k: 11) -> 12: pass
self.assertEqual(f.__annotations__,
{'b': 1, 'c': 2, 'e': 3, 'g': 6, 'h': 7, 'j': 9,
'k': 11, 'return': 12})
# Check for issue #20625 -- annotations mangling
class Spam:
def f(self, *, __kw: 1):
pass
class Ham(Spam): pass
self.assertEqual(Spam.f.__annotations__, {'_Spam__kw': 1})
self.assertEqual(Ham.f.__annotations__, {'_Spam__kw': 1})
# Check for SF Bug #1697248 - mixing decorators and a return annotation
def null(x): return x
@null
def f(x) -> list: pass
self.assertEqual(f.__annotations__, {'return': list})
# test closures with a variety of opargs
closure = 1
def f(): return closure
def f(x=1): return closure
def f(*, k=1): return closure
def f() -> int: return closure
# Check trailing commas are permitted in funcdef argument list
def f(a,): pass
def f(*args,): pass
def f(**kwds,): pass
def f(a, *args,): pass
def f(a, **kwds,): pass
def f(*args, b,): pass
def f(*, b,): pass
def f(*args, **kwds,): pass
def f(a, *args, b,): pass
def f(a, *, b,): pass
def f(a, *args, **kwds,): pass
def f(*args, b, **kwds,): pass
def f(*, b, **kwds,): pass
def f(a, *args, b, **kwds,): pass
def f(a, *, b, **kwds,): pass
def test_lambdef(self):
### lambdef: 'lambda' [varargslist] ':' test
l1 = lambda : 0
self.assertEqual(l1(), 0)
l2 = lambda : a[d] # XXX just testing the expression
l3 = lambda : [2 < x for x in [-1, 3, 0]]
self.assertEqual(l3(), [0, 1, 0])
l4 = lambda x = lambda y = lambda z=1 : z : y() : x()
self.assertEqual(l4(), 1)
l5 = lambda x, y, z=2: x + y + z
self.assertEqual(l5(1, 2), 5)
self.assertEqual(l5(1, 2, 3), 6)
check_syntax_error(self, "lambda x: x = 2")
check_syntax_error(self, "lambda (None,): None")
l6 = lambda x, y, *, k=20: x+y+k
self.assertEqual(l6(1,2), 1+2+20)
self.assertEqual(l6(1,2,k=10), 1+2+10)
# check that trailing commas are permitted
l10 = lambda a,: 0
l11 = lambda *args,: 0
l12 = lambda **kwds,: 0
l13 = lambda a, *args,: 0
l14 = lambda a, **kwds,: 0
l15 = lambda *args, b,: 0
l16 = lambda *, b,: 0
l17 = lambda *args, **kwds,: 0
l18 = lambda a, *args, b,: 0
l19 = lambda a, *, b,: 0
l20 = lambda a, *args, **kwds,: 0
l21 = lambda *args, b, **kwds,: 0
l22 = lambda *, b, **kwds,: 0
l23 = lambda a, *args, b, **kwds,: 0
l24 = lambda a, *, b, **kwds,: 0
### stmt: simple_stmt | compound_stmt
# Tested below
def test_simple_stmt(self):
### simple_stmt: small_stmt (';' small_stmt)* [';']
x = 1; pass; del x
def foo():
# verify statements that end with semi-colons
x = 1; pass; del x;
foo()
### small_stmt: expr_stmt | pass_stmt | del_stmt | flow_stmt | import_stmt | global_stmt | access_stmt
# Tested below
def test_expr_stmt(self):
# (exprlist '=')* exprlist
1
1, 2, 3
x = 1
x = 1, 2, 3
x = y = z = 1, 2, 3
x, y, z = 1, 2, 3
abc = a, b, c = x, y, z = xyz = 1, 2, (3, 4)
check_syntax_error(self, "x + 1 = 1")
check_syntax_error(self, "a + 1 = b + 2")
# Check the heuristic for print & exec covers significant cases
# As well as placing some limits on false positives
def test_former_statements_refer_to_builtins(self):
keywords = "print", "exec"
# Cases where we want the custom error
cases = [
"{} foo",
"{} {{1:foo}}",
"if 1: {} foo",
"if 1: {} {{1:foo}}",
"if 1:\n {} foo",
"if 1:\n {} {{1:foo}}",
]
for keyword in keywords:
custom_msg = "call to '{}'".format(keyword)
for case in cases:
source = case.format(keyword)
with self.subTest(source=source):
with self.assertRaisesRegex(SyntaxError, custom_msg):
exec(source)
source = source.replace("foo", "(foo.)")
with self.subTest(source=source):
with self.assertRaisesRegex(SyntaxError, "invalid syntax"):
exec(source)
def test_del_stmt(self):
# 'del' exprlist
abc = [1,2,3]
x, y, z = abc
xyz = x, y, z
del abc
del x, y, (z, xyz)
def test_pass_stmt(self):
# 'pass'
pass
# flow_stmt: break_stmt | continue_stmt | return_stmt | raise_stmt
# Tested below
def test_break_stmt(self):
# 'break'
while 1: break
def test_continue_stmt(self):
# 'continue'
i = 1
while i: i = 0; continue
msg = ""
while not msg:
msg = "ok"
try:
continue
msg = "continue failed to continue inside try"
except:
msg = "continue inside try called except block"
if msg != "ok":
self.fail(msg)
msg = ""
while not msg:
msg = "finally block not called"
try:
continue
finally:
msg = "ok"
if msg != "ok":
self.fail(msg)
def test_break_continue_loop(self):
# This test warrants an explanation. It is a test specifically for SF bugs
# #463359 and #462937. The bug is that a 'break' statement executed or
# exception raised inside a try/except inside a loop, *after* a continue
# statement has been executed in that loop, will cause the wrong number of
# arguments to be popped off the stack and the instruction pointer reset to
# a very small number (usually 0.) Because of this, the following test
# *must* written as a function, and the tracking vars *must* be function
# arguments with default values. Otherwise, the test will loop and loop.
def test_inner(extra_burning_oil = 1, count=0):
big_hippo = 2
while big_hippo:
count += 1
try:
if extra_burning_oil and big_hippo == 1:
extra_burning_oil -= 1
break
big_hippo -= 1
continue
except:
raise
if count > 2 or big_hippo != 1:
self.fail("continue then break in try/except in loop broken!")
test_inner()
def test_return(self):
# 'return' [testlist]
def g1(): return
def g2(): return 1
g1()
x = g2()
check_syntax_error(self, "class foo:return 1")
def test_break_in_finally(self):
count = 0
while count < 2:
count += 1
try:
pass
finally:
break
self.assertEqual(count, 1)
count = 0
while count < 2:
count += 1
try:
continue
finally:
break
self.assertEqual(count, 1)
count = 0
while count < 2:
count += 1
try:
1/0
finally:
break
self.assertEqual(count, 1)
for count in [0, 1]:
self.assertEqual(count, 0)
try:
pass
finally:
break
self.assertEqual(count, 0)
for count in [0, 1]:
self.assertEqual(count, 0)
try:
continue
finally:
break
self.assertEqual(count, 0)
for count in [0, 1]:
self.assertEqual(count, 0)
try:
1/0
finally:
break
self.assertEqual(count, 0)
def test_return_in_finally(self):
def g1():
try:
pass
finally:
return 1
self.assertEqual(g1(), 1)
def g2():
try:
return 2
finally:
return 3
self.assertEqual(g2(), 3)
def g3():
try:
1/0
finally:
return 4
self.assertEqual(g3(), 4)
def test_yield(self):
# Allowed as standalone statement
def g(): yield 1
def g(): yield from ()
# Allowed as RHS of assignment
def g(): x = yield 1
def g(): x = yield from ()
# Ordinary yield accepts implicit tuples
def g(): yield 1, 1
def g(): x = yield 1, 1
# 'yield from' does not
check_syntax_error(self, "def g(): yield from (), 1")
check_syntax_error(self, "def g(): x = yield from (), 1")
# Requires parentheses as subexpression
def g(): 1, (yield 1)
def g(): 1, (yield from ())
check_syntax_error(self, "def g(): 1, yield 1")
check_syntax_error(self, "def g(): 1, yield from ()")
# Requires parentheses as call argument
def g(): f((yield 1))
def g(): f((yield 1), 1)
def g(): f((yield from ()))
def g(): f((yield from ()), 1)
check_syntax_error(self, "def g(): f(yield 1)")
check_syntax_error(self, "def g(): f(yield 1, 1)")
check_syntax_error(self, "def g(): f(yield from ())")
check_syntax_error(self, "def g(): f(yield from (), 1)")
# Not allowed at top level
check_syntax_error(self, "yield")
check_syntax_error(self, "yield from")
# Not allowed at class scope
check_syntax_error(self, "class foo:yield 1")
check_syntax_error(self, "class foo:yield from ()")
# Check annotation refleak on SyntaxError
check_syntax_error(self, "def g(a:(yield)): pass")
def test_raise(self):
# 'raise' test [',' test]
try: raise RuntimeError('just testing')
except RuntimeError: pass
try: raise KeyboardInterrupt
except KeyboardInterrupt: pass
def test_import(self):
# 'import' dotted_as_names
import sys
import time, sys
# 'from' dotted_name 'import' ('*' | '(' import_as_names ')' | import_as_names)
from time import time
from time import (time)
# not testable inside a function, but already done at top of the module
# from sys import *
from sys import path, argv
from sys import (path, argv)
from sys import (path, argv,)
def test_global(self):
# 'global' NAME (',' NAME)*
global a
global a, b
global one, two, three, four, five, six, seven, eight, nine, ten
def test_nonlocal(self):
# 'nonlocal' NAME (',' NAME)*
x = 0
y = 0
def f():
nonlocal x
nonlocal x, y
def test_assert(self):
# assertTruestmt: 'assert' test [',' test]
assert 1
assert 1, 1
assert lambda x:x
assert 1, lambda x:x+1
try:
assert True
except AssertionError as e:
self.fail("'assert True' should not have raised an AssertionError")
try:
assert True, 'this should always pass'
except AssertionError as e:
self.fail("'assert True, msg' should not have "
"raised an AssertionError")
# these tests fail if python is run with -O, so check __debug__
@unittest.skipUnless(__debug__, "Won't work if __debug__ is False")
def testAssert2(self):
try:
assert 0, "msg"
except AssertionError as e:
self.assertEqual(e.args[0], "msg")
else:
self.fail("AssertionError not raised by assert 0")
try:
assert False
except AssertionError as e:
self.assertEqual(len(e.args), 0)
else:
self.fail("AssertionError not raised by 'assert False'")
### compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | funcdef | classdef
# Tested below
def test_if(self):
# 'if' test ':' suite ('elif' test ':' suite)* ['else' ':' suite]
if 1: pass
if 1: pass
else: pass
if 0: pass
elif 0: pass
if 0: pass
elif 0: pass
elif 0: pass
elif 0: pass
else: pass
def test_while(self):
# 'while' test ':' suite ['else' ':' suite]
while 0: pass
while 0: pass
else: pass
# Issue1920: "while 0" is optimized away,
# ensure that the "else" clause is still present.
x = 0
while 0:
x = 1
else:
x = 2
self.assertEqual(x, 2)
def test_for(self):
# 'for' exprlist 'in' exprlist ':' suite ['else' ':' suite]
for i in 1, 2, 3: pass
for i, j, k in (): pass
else: pass
class Squares:
def __init__(self, max):
self.max = max
self.sofar = []
def __len__(self): return len(self.sofar)
def __getitem__(self, i):
if not 0 <= i < self.max: raise IndexError
n = len(self.sofar)
while n <= i:
self.sofar.append(n*n)
n = n+1
return self.sofar[i]
n = 0
for x in Squares(10): n = n+x
if n != 285:
self.fail('for over growing sequence')
result = []
for x, in [(1,), (2,), (3,)]:
result.append(x)
self.assertEqual(result, [1, 2, 3])
def test_try(self):
### try_stmt: 'try' ':' suite (except_clause ':' suite)+ ['else' ':' suite]
### | 'try' ':' suite 'finally' ':' suite
### except_clause: 'except' [expr ['as' expr]]
try:
1/0
except ZeroDivisionError:
pass
else:
pass
try: 1/0
except EOFError: pass
except TypeError as msg: pass
except: pass
else: pass
try: 1/0
except (EOFError, TypeError, ZeroDivisionError): pass
try: 1/0
except (EOFError, TypeError, ZeroDivisionError) as msg: pass
try: pass
finally: pass
def test_suite(self):
# simple_stmt | NEWLINE INDENT NEWLINE* (stmt NEWLINE*)+ DEDENT
if 1: pass
if 1:
pass
if 1:
#
#
#
pass
pass
#
pass
#
def test_test(self):
### and_test ('or' and_test)*
### and_test: not_test ('and' not_test)*
### not_test: 'not' not_test | comparison
if not 1: pass
if 1 and 1: pass
if 1 or 1: pass
if not not not 1: pass
if not 1 and 1 and 1: pass
if 1 and 1 or 1 and 1 and 1 or not 1 and 1: pass
def test_comparison(self):
### comparison: expr (comp_op expr)*
### comp_op: '<'|'>'|'=='|'>='|'<='|'!='|'in'|'not' 'in'|'is'|'is' 'not'
if 1: pass
x = (1 == 1)
if 1 == 1: pass
if 1 != 1: pass
if 1 < 1: pass
if 1 > 1: pass
if 1 <= 1: pass
if 1 >= 1: pass
if 1 is 1: pass
if 1 is not 1: pass
if 1 in (): pass
if 1 not in (): pass
if 1 < 1 > 1 == 1 >= 1 <= 1 != 1 in 1 not in 1 is 1 is not 1: pass
def test_binary_mask_ops(self):
x = 1 & 1
x = 1 ^ 1
x = 1 | 1
def test_shift_ops(self):
x = 1 << 1
x = 1 >> 1
x = 1 << 1 >> 1
def test_additive_ops(self):
x = 1
x = 1 + 1
x = 1 - 1 - 1
x = 1 - 1 + 1 - 1 + 1
def test_multiplicative_ops(self):
x = 1 * 1
x = 1 / 1
x = 1 % 1
x = 1 / 1 * 1 % 1
def test_unary_ops(self):
x = +1
x = -1
x = ~1
x = ~1 ^ 1 & 1 | 1 & 1 ^ -1
x = -1*1/1 + 1*1 - ---1*1
def test_selectors(self):
### trailer: '(' [testlist] ')' | '[' subscript ']' | '.' NAME
### subscript: expr | [expr] ':' [expr]
import sys, time
c = sys.path[0]
x = time.time()
x = sys.modules['time'].time()
a = '01234'
c = a[0]
c = a[-1]
s = a[0:5]
s = a[:5]
s = a[0:]
s = a[:]
s = a[-5:]
s = a[:-1]
s = a[-4:-3]
# A rough test of SF bug 1333982. http://python.org/sf/1333982
# The testing here is fairly incomplete.
# Test cases should include: commas with 1 and 2 colons
d = {}
d[1] = 1
d[1,] = 2
d[1,2] = 3
d[1,2,3] = 4
L = list(d)
L.sort(key=lambda x: (type(x).__name__, x))
self.assertEqual(str(L), '[1, (1,), (1, 2), (1, 2, 3)]')
def test_atoms(self):
### atom: '(' [testlist] ')' | '[' [testlist] ']' | '{' [dictsetmaker] '}' | NAME | NUMBER | STRING
### dictsetmaker: (test ':' test (',' test ':' test)* [',']) | (test (',' test)* [','])
x = (1)
x = (1 or 2 or 3)
x = (1 or 2 or 3, 2, 3)
x = []
x = [1]
x = [1 or 2 or 3]
x = [1 or 2 or 3, 2, 3]
x = []
x = {}
x = {'one': 1}
x = {'one': 1,}
x = {'one' or 'two': 1 or 2}
x = {'one': 1, 'two': 2}
x = {'one': 1, 'two': 2,}
x = {'one': 1, 'two': 2, 'three': 3, 'four': 4, 'five': 5, 'six': 6}
x = {'one'}
x = {'one', 1,}
x = {'one', 'two', 'three'}
x = {2, 3, 4,}
x = x
x = 'x'
x = 123
### exprlist: expr (',' expr)* [',']
### testlist: test (',' test)* [',']
# These have been exercised enough above
def test_classdef(self):
# 'class' NAME ['(' [testlist] ')'] ':' suite
class B: pass
class B2(): pass
class C1(B): pass
class C2(B): pass
class D(C1, C2, B): pass
class C:
def meth1(self): pass
def meth2(self, arg): pass
def meth3(self, a1, a2): pass
# decorator: '@' dotted_name [ '(' [arglist] ')' ] NEWLINE
# decorators: decorator+
# decorated: decorators (classdef | funcdef)
def class_decorator(x): return x
@class_decorator
class G: pass
def test_dictcomps(self):
# dictorsetmaker: ( (test ':' test (comp_for |
# (',' test ':' test)* [','])) |
# (test (comp_for | (',' test)* [','])) )
nums = [1, 2, 3]
self.assertEqual({i:i+1 for i in nums}, {1: 2, 2: 3, 3: 4})
def test_listcomps(self):
# list comprehension tests
nums = [1, 2, 3, 4, 5]
strs = ["Apple", "Banana", "Coconut"]
spcs = [" Apple", " Banana ", "Coco nut "]
self.assertEqual([s.strip() for s in spcs], ['Apple', 'Banana', 'Coco nut'])
self.assertEqual([3 * x for x in nums], [3, 6, 9, 12, 15])
self.assertEqual([x for x in nums if x > 2], [3, 4, 5])
self.assertEqual([(i, s) for i in nums for s in strs],
[(1, 'Apple'), (1, 'Banana'), (1, 'Coconut'),
(2, 'Apple'), (2, 'Banana'), (2, 'Coconut'),
(3, 'Apple'), (3, 'Banana'), (3, 'Coconut'),
(4, 'Apple'), (4, 'Banana'), (4, 'Coconut'),
(5, 'Apple'), (5, 'Banana'), (5, 'Coconut')])
self.assertEqual([(i, s) for i in nums for s in [f for f in strs if "n" in f]],
[(1, 'Banana'), (1, 'Coconut'), (2, 'Banana'), (2, 'Coconut'),
(3, 'Banana'), (3, 'Coconut'), (4, 'Banana'), (4, 'Coconut'),
(5, 'Banana'), (5, 'Coconut')])
self.assertEqual([(lambda a:[a**i for i in range(a+1)])(j) for j in range(5)],
[[1], [1, 1], [1, 2, 4], [1, 3, 9, 27], [1, 4, 16, 64, 256]])
def test_in_func(l):
return [0 < x < 3 for x in l if x > 2]
self.assertEqual(test_in_func(nums), [False, False, False])
def test_nested_front():
self.assertEqual([[y for y in [x, x + 1]] for x in [1,3,5]],
[[1, 2], [3, 4], [5, 6]])
test_nested_front()
check_syntax_error(self, "[i, s for i in nums for s in strs]")
check_syntax_error(self, "[x if y]")
suppliers = [
(1, "Boeing"),
(2, "Ford"),
(3, "Macdonalds")
]
parts = [
(10, "Airliner"),
(20, "Engine"),
(30, "Cheeseburger")
]
suppart = [
(1, 10), (1, 20), (2, 20), (3, 30)
]
x = [
(sname, pname)
for (sno, sname) in suppliers
for (pno, pname) in parts
for (sp_sno, sp_pno) in suppart
if sno == sp_sno and pno == sp_pno
]
self.assertEqual(x, [('Boeing', 'Airliner'), ('Boeing', 'Engine'), ('Ford', 'Engine'),
('Macdonalds', 'Cheeseburger')])
def test_genexps(self):
# generator expression tests
g = ([x for x in range(10)] for x in range(1))
self.assertEqual(next(g), [x for x in range(10)])
try:
next(g)
self.fail('should produce StopIteration exception')
except StopIteration:
pass
a = 1
try:
g = (a for d in a)
next(g)
self.fail('should produce TypeError')
except TypeError:
pass
self.assertEqual(list((x, y) for x in 'abcd' for y in 'abcd'), [(x, y) for x in 'abcd' for y in 'abcd'])
self.assertEqual(list((x, y) for x in 'ab' for y in 'xy'), [(x, y) for x in 'ab' for y in 'xy'])
a = [x for x in range(10)]
b = (x for x in (y for y in a))
self.assertEqual(sum(b), sum([x for x in range(10)]))
self.assertEqual(sum(x**2 for x in range(10)), sum([x**2 for x in range(10)]))
self.assertEqual(sum(x*x for x in range(10) if x%2), sum([x*x for x in range(10) if x%2]))
self.assertEqual(sum(x for x in (y for y in range(10))), sum([x for x in range(10)]))
self.assertEqual(sum(x for x in (y for y in (z for z in range(10)))), sum([x for x in range(10)]))
self.assertEqual(sum(x for x in [y for y in (z for z in range(10))]), sum([x for x in range(10)]))
self.assertEqual(sum(x for x in (y for y in (z for z in range(10) if True)) if True), sum([x for x in range(10)]))
self.assertEqual(sum(x for x in (y for y in (z for z in range(10) if True) if False) if True), 0)
check_syntax_error(self, "foo(x for x in range(10), 100)")
check_syntax_error(self, "foo(100, x for x in range(10))")
def test_comprehension_specials(self):
# test for outmost iterable precomputation
x = 10; g = (i for i in range(x)); x = 5
self.assertEqual(len(list(g)), 10)
# This should hold, since we're only precomputing outmost iterable.
x = 10; t = False; g = ((i,j) for i in range(x) if t for j in range(x))
x = 5; t = True;
self.assertEqual([(i,j) for i in range(10) for j in range(5)], list(g))
# Grammar allows multiple adjacent 'if's in listcomps and genexps,
# even though it's silly. Make sure it works (ifelse broke this.)
self.assertEqual([ x for x in range(10) if x % 2 if x % 3 ], [1, 5, 7])
self.assertEqual(list(x for x in range(10) if x % 2 if x % 3), [1, 5, 7])
# verify unpacking single element tuples in listcomp/genexp.
self.assertEqual([x for x, in [(4,), (5,), (6,)]], [4, 5, 6])
self.assertEqual(list(x for x, in [(7,), (8,), (9,)]), [7, 8, 9])
def test_with_statement(self):
class manager(object):
def __enter__(self):
return (1, 2)
def __exit__(self, *args):
pass
with manager():
pass
with manager() as x:
pass
with manager() as (x, y):
pass
with manager(), manager():
pass
with manager() as x, manager() as y:
pass
with manager() as x, manager():
pass
def test_if_else_expr(self):
# Test ifelse expressions in various cases
def _checkeval(msg, ret):
"helper to check that evaluation of expressions is done correctly"
print(msg)
return ret
# the next line is not allowed anymore
#self.assertEqual([ x() for x in lambda: True, lambda: False if x() ], [True])
self.assertEqual([ x() for x in (lambda: True, lambda: False) if x() ], [True])
self.assertEqual([ x(False) for x in (lambda x: False if x else True, lambda x: True if x else False) if x(False) ], [True])
self.assertEqual((5 if 1 else _checkeval("check 1", 0)), 5)
self.assertEqual((_checkeval("check 2", 0) if 0 else 5), 5)
self.assertEqual((5 and 6 if 0 else 1), 1)
self.assertEqual(((5 and 6) if 0 else 1), 1)
self.assertEqual((5 and (6 if 1 else 1)), 6)
self.assertEqual((0 or _checkeval("check 3", 2) if 0 else 3), 3)
self.assertEqual((1 or _checkeval("check 4", 2) if 1 else _checkeval("check 5", 3)), 1)
self.assertEqual((0 or 5 if 1 else _checkeval("check 6", 3)), 5)
self.assertEqual((not 5 if 1 else 1), False)
self.assertEqual((not 5 if 0 else 1), 1)
self.assertEqual((6 + 1 if 1 else 2), 7)
self.assertEqual((6 - 1 if 1 else 2), 5)
self.assertEqual((6 * 2 if 1 else 4), 12)
self.assertEqual((6 / 2 if 1 else 3), 3)
self.assertEqual((6 < 4 if 0 else 2), 2)
def test_paren_evaluation(self):
self.assertEqual(16 // (4 // 2), 8)
self.assertEqual((16 // 4) // 2, 2)
self.assertEqual(16 // 4 // 2, 2)
self.assertTrue(False is (2 is 3))
self.assertFalse((False is 2) is 3)
self.assertFalse(False is 2 is 3)
def test_matrix_mul(self):
# This is not intended to be a comprehensive test, rather just to be few
# samples of the @ operator in test_grammar.py.
class M:
def __matmul__(self, o):
return 4
def __imatmul__(self, o):
self.other = o
return self
m = M()
self.assertEqual(m @ m, 4)
m @= 42
self.assertEqual(m.other, 42)
def test_async_await(self):
async def test():
def sum():
pass
if 1:
await someobj()
self.assertEqual(test.__name__, 'test')
self.assertTrue(bool(test.__code__.co_flags & inspect.CO_COROUTINE))
def decorator(func):
setattr(func, '_marked', True)
return func
@decorator
async def test2():
return 22
self.assertTrue(test2._marked)
self.assertEqual(test2.__name__, 'test2')
self.assertTrue(bool(test2.__code__.co_flags & inspect.CO_COROUTINE))
def test_async_for(self):
class Done(Exception): pass
class AIter:
def __aiter__(self):
return self
async def __anext__(self):
raise StopAsyncIteration
async def foo():
async for i in AIter():
pass
async for i, j in AIter():
pass
async for i in AIter():
pass
else:
pass
raise Done
with self.assertRaises(Done):
foo().send(None)
def test_async_with(self):
class Done(Exception): pass
class manager:
async def __aenter__(self):
return (1, 2)
async def __aexit__(self, *exc):
return False
async def foo():
async with manager():
pass
async with manager() as x:
pass
async with manager() as (x, y):
pass
async with manager(), manager():
pass
async with manager() as x, manager() as y:
pass
async with manager() as x, manager():
pass
raise Done
with self.assertRaises(Done):
foo().send(None)
if __name__ == '__main__':
unittest.main()
| 47,972 | 1,491 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_sys.py | import unittest, test.support
from test.support.script_helper import assert_python_ok, assert_python_failure
import sys, io, os
import cosmo
import struct
import subprocess
import textwrap
import warnings
import operator
import codecs
import gc
import sysconfig
import platform
import locale
# count the number of test runs, used to create unique
# strings to intern in test_intern()
numruns = 0
try:
import _thread
import threading
except ImportError:
threading = None
class SysModuleTest(unittest.TestCase):
def setUp(self):
self.orig_stdout = sys.stdout
self.orig_stderr = sys.stderr
self.orig_displayhook = sys.displayhook
def tearDown(self):
sys.stdout = self.orig_stdout
sys.stderr = self.orig_stderr
sys.displayhook = self.orig_displayhook
test.support.reap_children()
def test_original_displayhook(self):
import builtins
out = io.StringIO()
sys.stdout = out
dh = sys.__displayhook__
self.assertRaises(TypeError, dh)
if hasattr(builtins, "_"):
del builtins._
dh(None)
self.assertEqual(out.getvalue(), "")
self.assertTrue(not hasattr(builtins, "_"))
dh(42)
self.assertEqual(out.getvalue(), "42\n")
self.assertEqual(builtins._, 42)
del sys.stdout
self.assertRaises(RuntimeError, dh, 42)
def test_lost_displayhook(self):
del sys.displayhook
code = compile("42", "<string>", "single")
self.assertRaises(RuntimeError, eval, code)
def test_custom_displayhook(self):
def baddisplayhook(obj):
raise ValueError
sys.displayhook = baddisplayhook
code = compile("42", "<string>", "single")
self.assertRaises(ValueError, eval, code)
def test_original_excepthook(self):
err = io.StringIO()
sys.stderr = err
eh = sys.__excepthook__
self.assertRaises(TypeError, eh)
try:
raise ValueError(42)
except ValueError as exc:
eh(*sys.exc_info())
self.assertTrue(err.getvalue().endswith("ValueError: 42\n"))
def test_excepthook(self):
with test.support.captured_output("stderr") as stderr:
sys.excepthook(1, '1', 1)
self.assertTrue("TypeError: print_exception(): Exception expected for " \
"value, str found" in stderr.getvalue())
# FIXME: testing the code for a lost or replaced excepthook in
# Python/pythonrun.c::PyErr_PrintEx() is tricky.
def test_exit(self):
# call with two arguments
self.assertRaises(TypeError, sys.exit, 42, 42)
# call without argument
with self.assertRaises(SystemExit) as cm:
sys.exit()
self.assertIsNone(cm.exception.code)
rc, out, err = assert_python_ok('-c', 'import sys; sys.exit()')
self.assertEqual(rc, 0)
self.assertEqual(out, b'')
self.assertEqual(err, b'')
# call with integer argument
with self.assertRaises(SystemExit) as cm:
sys.exit(42)
self.assertEqual(cm.exception.code, 42)
# call with tuple argument with one entry
# entry will be unpacked
with self.assertRaises(SystemExit) as cm:
sys.exit((42,))
self.assertEqual(cm.exception.code, 42)
# call with string argument
with self.assertRaises(SystemExit) as cm:
sys.exit("exit")
self.assertEqual(cm.exception.code, "exit")
# call with tuple argument with two entries
with self.assertRaises(SystemExit) as cm:
sys.exit((17, 23))
self.assertEqual(cm.exception.code, (17, 23))
# test that the exit machinery handles SystemExits properly
rc, out, err = assert_python_failure('-c', 'raise SystemExit(47)')
self.assertEqual(rc, 47)
self.assertEqual(out, b'')
self.assertEqual(err, b'')
def check_exit_message(code, expected, **env_vars):
rc, out, err = assert_python_failure('-c', code, **env_vars)
self.assertEqual(rc, 1)
self.assertEqual(out, b'')
self.assertTrue(err.startswith(expected),
"%s doesn't start with %s" % (ascii(err), ascii(expected)))
# test that stderr buffer is flushed before the exit message is written
# into stderr
check_exit_message(
r'import sys; sys.stderr.write("unflushed,"); sys.exit("message")',
b"unflushed,message")
# test that the exit message is written with backslashreplace error
# handler to stderr
check_exit_message(
r'import sys; sys.exit("surrogates:\uDCFF")',
b"surrogates:\\udcff")
# test that the unicode message is encoded to the stderr encoding
# instead of the default encoding (utf8)
check_exit_message(
r'import sys; sys.exit("h\xe9")',
b"h\xe9", PYTHONIOENCODING='latin-1')
def test_getdefaultencoding(self):
self.assertRaises(TypeError, sys.getdefaultencoding, 42)
# can't check more than the type, as the user might have changed it
self.assertIsInstance(sys.getdefaultencoding(), str)
# testing sys.settrace() is done in test_sys_settrace.py
# testing sys.setprofile() is done in test_sys_setprofile.py
def test_setcheckinterval(self):
with warnings.catch_warnings():
warnings.simplefilter("ignore")
self.assertRaises(TypeError, sys.setcheckinterval)
orig = sys.getcheckinterval()
for n in 0, 100, 120, orig: # orig last to restore starting state
sys.setcheckinterval(n)
self.assertEqual(sys.getcheckinterval(), n)
@unittest.skipUnless(threading, 'Threading required for this test.')
def test_switchinterval(self):
self.assertRaises(TypeError, sys.setswitchinterval)
self.assertRaises(TypeError, sys.setswitchinterval, "a")
self.assertRaises(ValueError, sys.setswitchinterval, -1.0)
self.assertRaises(ValueError, sys.setswitchinterval, 0.0)
orig = sys.getswitchinterval()
# sanity check
self.assertTrue(orig < 0.5, orig)
try:
for n in 0.00001, 0.05, 3.0, orig:
sys.setswitchinterval(n)
self.assertAlmostEqual(sys.getswitchinterval(), n)
finally:
sys.setswitchinterval(orig)
def test_recursionlimit(self):
self.assertRaises(TypeError, sys.getrecursionlimit, 42)
oldlimit = sys.getrecursionlimit()
self.assertRaises(TypeError, sys.setrecursionlimit)
self.assertRaises(ValueError, sys.setrecursionlimit, -42)
sys.setrecursionlimit(10000)
self.assertEqual(sys.getrecursionlimit(), 10000)
sys.setrecursionlimit(oldlimit)
@unittest.skipIf("tiny" in cosmo.MODE, "")
def test_recursionlimit_recovery(self):
if hasattr(sys, 'gettrace') and sys.gettrace():
self.skipTest('fatal error if run with a trace function')
oldlimit = sys.getrecursionlimit()
def f():
f()
try:
for depth in (10, 25, 50, 75, 100, 250, 1000):
try:
sys.setrecursionlimit(depth)
except RecursionError:
# Issue #25274: The recursion limit is too low at the
# current recursion depth
continue
# Issue #5392: test stack overflow after hitting recursion
# limit twice
self.assertRaises((RecursionError, MemoryError), f)
self.assertRaises((RecursionError, MemoryError), f)
finally:
sys.setrecursionlimit(oldlimit)
@unittest.skip
@test.support.cpython_only
def test_setrecursionlimit_recursion_depth(self):
# Issue #25274: Setting a low recursion limit must be blocked if the
# current recursion depth is already higher than the "lower-water
# mark". Otherwise, it may not be possible anymore to
# reset the overflowed flag to 0.
from _testcapi import get_recursion_depth
def set_recursion_limit_at_depth(depth, limit):
recursion_depth = get_recursion_depth()
if recursion_depth >= depth:
with self.assertRaises(RecursionError) as cm:
sys.setrecursionlimit(limit)
self.assertRegex(str(cm.exception),
"cannot set the recursion limit to [0-9]+ "
"at the recursion depth [0-9]+: "
"the limit is too low")
else:
set_recursion_limit_at_depth(depth, limit)
oldlimit = sys.getrecursionlimit()
try:
sys.setrecursionlimit(1000)
for limit in (10, 25, 50, 75, 100, 150, 200):
# formula extracted from _Py_RecursionLimitLowerWaterMark()
if limit > 200:
depth = limit - 50
else:
depth = limit * 3 // 4
set_recursion_limit_at_depth(depth, limit)
finally:
sys.setrecursionlimit(oldlimit)
@unittest.skipIf("tiny" in cosmo.MODE, "")
def test_recursionlimit_fatalerror(self):
# A fatal error occurs if a second recursion limit is hit when recovering
# from a first one.
code = textwrap.dedent("""
import sys
def f():
try:
f()
except RecursionError:
f()
sys.setrecursionlimit(%d)
f()""")
with test.support.SuppressCrashReport():
for i in (50, 1000):
sub = subprocess.Popen([sys.executable, '-c', code % i],
stderr=subprocess.PIPE)
err = sub.communicate()[1]
self.assertTrue(sub.returncode, sub.returncode)
self.assertIn(
b"Fatal Python error: ",
err)
@unittest.skip
def test_getwindowsversion(self):
# Raise SkipTest if sys doesn't have getwindowsversion attribute
test.support.get_attribute(sys, "getwindowsversion")
v = sys.getwindowsversion()
self.assertEqual(len(v), 5)
self.assertIsInstance(v[0], int)
self.assertIsInstance(v[1], int)
self.assertIsInstance(v[2], int)
self.assertIsInstance(v[3], int)
self.assertIsInstance(v[4], str)
self.assertRaises(IndexError, operator.getitem, v, 5)
self.assertIsInstance(v.major, int)
self.assertIsInstance(v.minor, int)
self.assertIsInstance(v.build, int)
self.assertIsInstance(v.platform, int)
self.assertIsInstance(v.service_pack, str)
self.assertIsInstance(v.service_pack_minor, int)
self.assertIsInstance(v.service_pack_major, int)
self.assertIsInstance(v.suite_mask, int)
self.assertIsInstance(v.product_type, int)
self.assertEqual(v[0], v.major)
self.assertEqual(v[1], v.minor)
self.assertEqual(v[2], v.build)
self.assertEqual(v[3], v.platform)
self.assertEqual(v[4], v.service_pack)
# This is how platform.py calls it. Make sure tuple
# still has 5 elements
maj, min, buildno, plat, csd = sys.getwindowsversion()
def test_call_tracing(self):
self.assertRaises(TypeError, sys.call_tracing, type, 2)
@unittest.skipUnless(hasattr(sys, "setdlopenflags"),
'test needs sys.setdlopenflags()')
def test_dlopenflags(self):
self.assertTrue(hasattr(sys, "getdlopenflags"))
self.assertRaises(TypeError, sys.getdlopenflags, 42)
oldflags = sys.getdlopenflags()
self.assertRaises(TypeError, sys.setdlopenflags)
sys.setdlopenflags(oldflags+1)
self.assertEqual(sys.getdlopenflags(), oldflags+1)
sys.setdlopenflags(oldflags)
@test.support.refcount_test
def test_refcount(self):
# n here must be a global in order for this test to pass while
# tracing with a python function. Tracing calls PyFrame_FastToLocals
# which will add a copy of any locals to the frame object, causing
# the reference count to increase by 2 instead of 1.
global n
self.assertRaises(TypeError, sys.getrefcount)
c = sys.getrefcount(None)
n = None
self.assertEqual(sys.getrefcount(None), c+1)
del n
self.assertEqual(sys.getrefcount(None), c)
if hasattr(sys, "gettotalrefcount"):
self.assertIsInstance(sys.gettotalrefcount(), int)
def test_getframe(self):
self.assertRaises(TypeError, sys._getframe, 42, 42)
self.assertRaises(ValueError, sys._getframe, 2000000000)
self.assertTrue(
SysModuleTest.test_getframe.__code__ \
is sys._getframe().f_code
)
# sys._current_frames() is a CPython-only gimmick.
def test_current_frames(self):
have_threads = True
try:
import _thread
except ImportError:
have_threads = False
if have_threads:
self.current_frames_with_threads()
else:
self.current_frames_without_threads()
# Test sys._current_frames() in a WITH_THREADS build.
@test.support.reap_threads
def current_frames_with_threads(self):
import threading
import traceback
# Spawn a thread that blocks at a known place. Then the main
# thread does sys._current_frames(), and verifies that the frames
# returned make sense.
entered_g = threading.Event()
leave_g = threading.Event()
thread_info = [] # the thread's id
def f123():
g456()
def g456():
thread_info.append(threading.get_ident())
entered_g.set()
leave_g.wait()
t = threading.Thread(target=f123)
t.start()
entered_g.wait()
# At this point, t has finished its entered_g.set(), although it's
# impossible to guess whether it's still on that line or has moved on
# to its leave_g.wait().
self.assertEqual(len(thread_info), 1)
thread_id = thread_info[0]
d = sys._current_frames()
main_id = threading.get_ident()
self.assertIn(main_id, d)
self.assertIn(thread_id, d)
# Verify that the captured main-thread frame is _this_ frame.
frame = d.pop(main_id)
self.assertTrue(frame is sys._getframe())
# Verify that the captured thread frame is blocked in g456, called
# from f123. This is a litte tricky, since various bits of
# threading.py are also in the thread's call stack.
frame = d.pop(thread_id)
stack = traceback.extract_stack(frame)
for i, (filename, lineno, funcname, sourceline) in enumerate(stack):
if funcname == "f123":
break
else:
self.fail("didn't find f123() on thread's call stack")
self.assertEqual(sourceline, "g456()")
# And the next record must be for g456().
filename, lineno, funcname, sourceline = stack[i+1]
self.assertEqual(funcname, "g456")
self.assertIn(sourceline, ["leave_g.wait()", "entered_g.set()"])
# Reap the spawned thread.
leave_g.set()
t.join()
# Test sys._current_frames() when thread support doesn't exist.
def current_frames_without_threads(self):
# Not much happens here: there is only one thread, with artificial
# "thread id" 0.
d = sys._current_frames()
self.assertEqual(len(d), 1)
self.assertIn(0, d)
self.assertTrue(d[0] is sys._getframe())
def test_attributes(self):
self.assertIsInstance(sys.api_version, int)
self.assertIsInstance(sys.argv, list)
self.assertIn(sys.byteorder, ("little", "big"))
self.assertIsInstance(sys.builtin_module_names, tuple)
self.assertIsInstance(sys.copyright, str)
self.assertIsInstance(sys.exec_prefix, str)
self.assertIsInstance(sys.base_exec_prefix, str)
self.assertIsInstance(sys.executable, str)
self.assertEqual(len(sys.float_info), 11)
self.assertEqual(sys.float_info.radix, 2)
self.assertEqual(len(sys.int_info), 2)
self.assertTrue(sys.int_info.bits_per_digit % 5 == 0)
self.assertTrue(sys.int_info.sizeof_digit >= 1)
self.assertEqual(type(sys.int_info.bits_per_digit), int)
self.assertEqual(type(sys.int_info.sizeof_digit), int)
self.assertIsInstance(sys.hexversion, int)
self.assertEqual(len(sys.hash_info), 9)
self.assertLess(sys.hash_info.modulus, 2**sys.hash_info.width)
# sys.hash_info.modulus should be a prime; we do a quick
# probable primality test (doesn't exclude the possibility of
# a Carmichael number)
for x in range(1, 100):
self.assertEqual(
pow(x, sys.hash_info.modulus-1, sys.hash_info.modulus),
1,
"sys.hash_info.modulus {} is a non-prime".format(
sys.hash_info.modulus)
)
self.assertIsInstance(sys.hash_info.inf, int)
self.assertIsInstance(sys.hash_info.nan, int)
self.assertIsInstance(sys.hash_info.imag, int)
algo = sysconfig.get_config_var("Py_HASH_ALGORITHM")
if sys.hash_info.algorithm in {"fnv", "siphash24"}:
self.assertIn(sys.hash_info.hash_bits, {32, 64})
self.assertIn(sys.hash_info.seed_bits, {32, 64, 128})
if algo == 1:
self.assertEqual(sys.hash_info.algorithm, "siphash24")
elif algo == 2:
self.assertEqual(sys.hash_info.algorithm, "fnv")
else:
self.assertIn(sys.hash_info.algorithm, {"fnv", "siphash24"})
else:
# PY_HASH_EXTERNAL
self.assertEqual(algo, 0)
self.assertGreaterEqual(sys.hash_info.cutoff, 0)
self.assertLess(sys.hash_info.cutoff, 8)
self.assertIsInstance(sys.maxsize, int)
self.assertIsInstance(sys.maxunicode, int)
self.assertEqual(sys.maxunicode, 0x10FFFF)
self.assertIsInstance(sys.platform, str)
self.assertIsInstance(sys.prefix, str)
self.assertIsInstance(sys.base_prefix, str)
self.assertIsInstance(sys.version, str)
vi = sys.version_info
self.assertIsInstance(vi[:], tuple)
self.assertEqual(len(vi), 5)
self.assertIsInstance(vi[0], int)
self.assertIsInstance(vi[1], int)
self.assertIsInstance(vi[2], int)
self.assertIn(vi[3], ("alpha", "beta", "candidate", "final"))
self.assertIsInstance(vi[4], int)
self.assertIsInstance(vi.major, int)
self.assertIsInstance(vi.minor, int)
self.assertIsInstance(vi.micro, int)
self.assertIn(vi.releaselevel, ("alpha", "beta", "candidate", "final"))
self.assertIsInstance(vi.serial, int)
self.assertEqual(vi[0], vi.major)
self.assertEqual(vi[1], vi.minor)
self.assertEqual(vi[2], vi.micro)
self.assertEqual(vi[3], vi.releaselevel)
self.assertEqual(vi[4], vi.serial)
self.assertTrue(vi > (1,0,0))
self.assertIsInstance(sys.float_repr_style, str)
self.assertIn(sys.float_repr_style, ('short', 'legacy'))
if not sys.platform.startswith('win'):
self.assertIsInstance(sys.abiflags, str)
@unittest.skipUnless(hasattr(sys, 'thread_info'),
'Threading required for this test.')
def test_thread_info(self):
info = sys.thread_info
self.assertEqual(len(info), 3)
self.assertIn(info.name, ('nt', 'pthread', 'solaris', None))
self.assertIn(info.lock, ('semaphore', 'mutex+cond', None))
def test_43581(self):
# Can't use sys.stdout, as this is a StringIO object when
# the test runs under regrtest.
self.assertEqual(sys.__stdout__.encoding, sys.__stderr__.encoding)
def test_intern(self):
global numruns
numruns += 1
self.assertRaises(TypeError, sys.intern)
s = "never interned before" + str(numruns)
self.assertTrue(sys.intern(s) is s)
s2 = s.swapcase().swapcase()
self.assertTrue(sys.intern(s2) is s)
# Subclasses of string can't be interned, because they
# provide too much opportunity for insane things to happen.
# We don't want them in the interned dict and if they aren't
# actually interned, we don't want to create the appearance
# that they are by allowing intern() to succeed.
class S(str):
def __hash__(self):
return 123
self.assertRaises(TypeError, sys.intern, S("abc"))
def test_sys_flags(self):
self.assertTrue(sys.flags)
attrs = ("debug",
"inspect", "interactive", "optimize", "dont_write_bytecode",
"no_user_site", "no_site", "ignore_environment", "verbose",
"bytes_warning", "quiet", "hash_randomization", "isolated")
for attr in attrs:
self.assertTrue(hasattr(sys.flags, attr), attr)
self.assertEqual(type(getattr(sys.flags, attr)), int, attr)
self.assertTrue(repr(sys.flags))
self.assertEqual(len(sys.flags), len(attrs))
def assert_raise_on_new_sys_type(self, sys_attr):
# Users are intentionally prevented from creating new instances of
# sys.flags, sys.version_info, and sys.getwindowsversion.
attr_type = type(sys_attr)
with self.assertRaises(TypeError):
attr_type()
with self.assertRaises(TypeError):
attr_type.__new__(attr_type)
def test_sys_flags_no_instantiation(self):
self.assert_raise_on_new_sys_type(sys.flags)
def test_sys_version_info_no_instantiation(self):
self.assert_raise_on_new_sys_type(sys.version_info)
@unittest.skip # why is this even allowed
def test_sys_getwindowsversion_no_instantiation(self):
# Skip if not being run on Windows.
test.support.get_attribute(sys, "getwindowsversion")
self.assert_raise_on_new_sys_type(sys.getwindowsversion())
@test.support.cpython_only
def test_clear_type_cache(self):
sys._clear_type_cache()
def test_ioencoding(self):
env = dict(os.environ)
# Test character: cent sign, encoded as 0x4A (ASCII J) in CP424,
# not representable in ASCII.
env["PYTHONIOENCODING"] = "cp424"
p = subprocess.Popen([sys.executable, "-c", 'print(chr(0xa2))'],
stdout = subprocess.PIPE, env=env)
out = p.communicate()[0].strip()
expected = ("\xa2" + os.linesep).encode("cp424")
self.assertEqual(out, expected)
env["PYTHONIOENCODING"] = "ascii:replace"
p = subprocess.Popen([sys.executable, "-c", 'print(chr(0xa2))'],
stdout = subprocess.PIPE, env=env)
out = p.communicate()[0].strip()
self.assertEqual(out, b'?')
env["PYTHONIOENCODING"] = "ascii"
p = subprocess.Popen([sys.executable, "-c", 'print(chr(0xa2))'],
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
env=env)
out, err = p.communicate()
self.assertEqual(out, b'')
self.assertIn(b'UnicodeEncodeError:', err)
self.assertIn(rb"'\xa2'", err)
env["PYTHONIOENCODING"] = "ascii:"
p = subprocess.Popen([sys.executable, "-c", 'print(chr(0xa2))'],
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
env=env)
out, err = p.communicate()
self.assertEqual(out, b'')
self.assertIn(b'UnicodeEncodeError:', err)
self.assertIn(rb"'\xa2'", err)
env["PYTHONIOENCODING"] = ":surrogateescape"
p = subprocess.Popen([sys.executable, "-c", 'print(chr(0xdcbd))'],
stdout=subprocess.PIPE, env=env)
out = p.communicate()[0].strip()
self.assertEqual(out, b'\xbd')
@unittest.skipUnless(test.support.FS_NONASCII,
'requires OS support of non-ASCII encodings')
@unittest.skipUnless(sys.getfilesystemencoding() == locale.getpreferredencoding(False),
'requires FS encoding to match locale')
def test_ioencoding_nonascii(self):
env = dict(os.environ)
env["PYTHONIOENCODING"] = ""
p = subprocess.Popen([sys.executable, "-c",
'print(%a)' % test.support.FS_NONASCII],
stdout=subprocess.PIPE, env=env)
out = p.communicate()[0].strip()
self.assertEqual(out, os.fsencode(test.support.FS_NONASCII))
@unittest.skipIf(sys.base_prefix != sys.prefix,
'Test is not venv-compatible')
def test_executable(self):
# sys.executable should be absolute
self.assertEqual(os.path.abspath(sys.executable), sys.executable.replace("//", "/"))
# Issue #7774: Ensure that sys.executable is an empty string if argv[0]
# has been set to a non existent program name and Python is unable to
# retrieve the real program name
# For a normal installation, it should work without 'cwd'
# argument. For test runs in the build directory, see #7774.
python_dir = os.path.dirname(os.path.realpath(sys.executable))
p = subprocess.Popen(
["nonexistent", "-c",
'import sys; print(sys.executable.replace("//", "/").encode("ascii", "backslashreplace"))'],
executable=sys.executable, stdout=subprocess.PIPE, cwd=python_dir)
stdout = p.communicate()[0]
executable = stdout.strip().decode("ASCII")
p.wait()
self.assertIn(executable, ['', repr(sys.executable.replace("//", "/").encode("ascii", "backslashreplace"))])
def check_fsencoding(self, fs_encoding, expected=None):
self.assertIsNotNone(fs_encoding)
codecs.lookup(fs_encoding)
if expected:
self.assertEqual(fs_encoding, expected)
def test_getfilesystemencoding(self):
fs_encoding = sys.getfilesystemencoding()
if sys.platform == 'darwin':
expected = 'utf-8'
else:
expected = None
self.check_fsencoding(fs_encoding, expected)
def c_locale_get_error_handler(self, isolated=False, encoding=None):
# Force the POSIX locale
env = os.environ.copy()
env["LC_ALL"] = "C"
code = '\n'.join((
'import sys',
'def dump(name):',
' std = getattr(sys, name)',
' print("%s: %s" % (name, std.errors))',
'dump("stdin")',
'dump("stdout")',
'dump("stderr")',
))
args = [sys.executable, "-c", code]
if isolated:
args.append("-I")
if encoding is not None:
env['PYTHONIOENCODING'] = encoding
else:
env.pop('PYTHONIOENCODING', None)
p = subprocess.Popen(args,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
env=env,
universal_newlines=True)
stdout, stderr = p.communicate()
return stdout
def test_c_locale_surrogateescape(self):
out = self.c_locale_get_error_handler(isolated=True)
self.assertEqual(out,
'stdin: surrogateescape\n'
'stdout: surrogateescape\n'
'stderr: backslashreplace\n')
# replace the default error handler
out = self.c_locale_get_error_handler(encoding=':ignore')
self.assertEqual(out,
'stdin: ignore\n'
'stdout: ignore\n'
'stderr: backslashreplace\n')
# force the encoding
out = self.c_locale_get_error_handler(encoding='iso8859-1')
self.assertEqual(out,
'stdin: strict\n'
'stdout: strict\n'
'stderr: backslashreplace\n')
out = self.c_locale_get_error_handler(encoding='iso8859-1:')
self.assertEqual(out,
'stdin: strict\n'
'stdout: strict\n'
'stderr: backslashreplace\n')
# have no any effect
out = self.c_locale_get_error_handler(encoding=':')
self.assertEqual(out,
'stdin: surrogateescape\n'
'stdout: surrogateescape\n'
'stderr: backslashreplace\n')
out = self.c_locale_get_error_handler(encoding='')
self.assertEqual(out,
'stdin: surrogateescape\n'
'stdout: surrogateescape\n'
'stderr: backslashreplace\n')
def test_implementation(self):
# This test applies to all implementations equally.
levels = {'alpha': 0xA, 'beta': 0xB, 'candidate': 0xC, 'final': 0xF}
self.assertTrue(hasattr(sys.implementation, 'name'))
self.assertTrue(hasattr(sys.implementation, 'version'))
self.assertTrue(hasattr(sys.implementation, 'hexversion'))
self.assertTrue(hasattr(sys.implementation, 'cache_tag'))
version = sys.implementation.version
self.assertEqual(version[:2], (version.major, version.minor))
hexversion = (version.major << 24 | version.minor << 16 |
version.micro << 8 | levels[version.releaselevel] << 4 |
version.serial << 0)
self.assertEqual(sys.implementation.hexversion, hexversion)
# PEP 421 requires that .name be lower case.
self.assertEqual(sys.implementation.name,
sys.implementation.name.lower())
@test.support.cpython_only
def test_debugmallocstats(self):
# Test sys._debugmallocstats()
from test.support.script_helper import assert_python_ok
args = ['-c', 'import sys; sys._debugmallocstats()']
ret, out, err = assert_python_ok(*args)
self.assertIn(b"free PyDictObjects", err)
# The function has no parameter
self.assertRaises(TypeError, sys._debugmallocstats, True)
@unittest.skipUnless(False and hasattr(sys, "getallocatedblocks"),
"sys.getallocatedblocks unavailable on this build")
def test_getallocatedblocks(self):
if (os.environ.get('PYTHONMALLOC', None)
and not sys.flags.ignore_environment):
self.skipTest("cannot test if PYTHONMALLOC env var is set")
# Some sanity checks
with_pymalloc = sysconfig.get_config_var('WITH_PYMALLOC')
a = sys.getallocatedblocks()
self.assertIs(type(a), int)
if with_pymalloc:
self.assertGreater(a, 0)
else:
# When WITH_PYMALLOC isn't available, we don't know anything
# about the underlying implementation: the function might
# return 0 or something greater.
self.assertGreaterEqual(a, 0)
try:
# While we could imagine a Python session where the number of
# multiple buffer objects would exceed the sharing of references,
# it is unlikely to happen in a normal test run.
self.assertLess(a, sys.gettotalrefcount())
except AttributeError:
# gettotalrefcount() not available
pass
gc.collect()
b = sys.getallocatedblocks()
self.assertLessEqual(b, a)
gc.collect()
c = sys.getallocatedblocks()
self.assertIn(c, range(b - 50, b + 50))
@test.support.requires_type_collecting
def test_is_finalizing(self):
self.assertIs(sys.is_finalizing(), False)
# Don't use the atexit module because _Py_Finalizing is only set
# after calling atexit callbacks
code = """if 1:
import sys
class AtExit:
is_finalizing = sys.is_finalizing
print = print
def __del__(self):
self.print(self.is_finalizing(), flush=True)
# Keep a reference in the __main__ module namespace, so the
# AtExit destructor will be called at Python exit
ref = AtExit()
"""
rc, stdout, stderr = assert_python_ok('-c', code)
self.assertEqual(stdout.rstrip(), b'True')
def test_sys_tracebacklimit(self):
code = """if 1:
import sys
def f1():
1 / 0
def f2():
f1()
sys.tracebacklimit = %r
f2()
"""
def check(tracebacklimit, expected):
p = subprocess.Popen([sys.executable, '-c', code % tracebacklimit],
stderr=subprocess.PIPE)
out = p.communicate()[1]
self.assertEqual(out.splitlines(), expected)
traceback = [
b'Traceback (most recent call last):',
b' File "<string>", line 8, in <module>',
b' File "<string>", line 6, in f2',
b' File "<string>", line 4, in f1',
b'ZeroDivisionError: division by zero'
]
check(10, traceback)
check(3, traceback)
check(2, traceback[:1] + traceback[2:])
check(1, traceback[:1] + traceback[3:])
check(0, [traceback[-1]])
check(-1, [traceback[-1]])
check(1<<1000, traceback)
check(-1<<1000, [traceback[-1]])
check(None, traceback)
@test.support.cpython_only
class SizeofTest(unittest.TestCase):
def setUp(self):
self.P = struct.calcsize('P')
self.longdigit = sys.int_info.sizeof_digit
import _testcapi
self.gc_headsize = _testcapi.SIZEOF_PYGC_HEAD
check_sizeof = test.support.check_sizeof
def test_gc_head_size(self):
# Check that the gc header size is added to objects tracked by the gc.
vsize = test.support.calcvobjsize
gc_header_size = self.gc_headsize
# bool objects are not gc tracked
self.assertEqual(sys.getsizeof(True), vsize('') + self.longdigit)
# but lists are
self.assertEqual(sys.getsizeof([]), vsize('Pn') + gc_header_size)
def test_errors(self):
class BadSizeof:
def __sizeof__(self):
raise ValueError
self.assertRaises(ValueError, sys.getsizeof, BadSizeof())
class InvalidSizeof:
def __sizeof__(self):
return None
self.assertRaises(TypeError, sys.getsizeof, InvalidSizeof())
sentinel = ["sentinel"]
self.assertIs(sys.getsizeof(InvalidSizeof(), sentinel), sentinel)
class FloatSizeof:
def __sizeof__(self):
return 4.5
self.assertRaises(TypeError, sys.getsizeof, FloatSizeof())
self.assertIs(sys.getsizeof(FloatSizeof(), sentinel), sentinel)
class OverflowSizeof(int):
def __sizeof__(self):
return int(self)
self.assertEqual(sys.getsizeof(OverflowSizeof(sys.maxsize)),
sys.maxsize + self.gc_headsize)
with self.assertRaises(OverflowError):
sys.getsizeof(OverflowSizeof(sys.maxsize + 1))
with self.assertRaises(ValueError):
sys.getsizeof(OverflowSizeof(-1))
with self.assertRaises((ValueError, OverflowError)):
sys.getsizeof(OverflowSizeof(-sys.maxsize - 1))
def test_default(self):
size = test.support.calcvobjsize
self.assertEqual(sys.getsizeof(True), size('') + self.longdigit)
self.assertEqual(sys.getsizeof(True, -1), size('') + self.longdigit)
@unittest.skip("alignment of C struct?")
def test_objecttypes(self):
# check all types defined in Objects/
calcsize = struct.calcsize
size = test.support.calcobjsize
vsize = test.support.calcvobjsize
check = self.check_sizeof
# bool
check(True, vsize('') + self.longdigit)
# buffer
# XXX
# builtin_function_or_method
check(len, size('4P')) # XXX check layout
# bytearray
samples = [b'', b'u'*100000]
for sample in samples:
x = bytearray(sample)
check(x, vsize('n2Pi') + x.__alloc__())
# bytearray_iterator
check(iter(bytearray()), size('nP'))
# bytes
check(b'', vsize('n') + 1)
check(b'x' * 10, vsize('n') + 11)
# cell
def get_cell():
x = 42
def inner():
return x
return inner
check(get_cell().__closure__[0], size('P'))
# code
def check_code_size(a, expected_size):
self.assertGreaterEqual(sys.getsizeof(a), expected_size)
check_code_size(get_cell().__code__, size('6i13P'))
check_code_size(get_cell.__code__, size('6i13P'))
def get_cell2(x):
def inner():
return x
return inner
check_code_size(get_cell2.__code__, size('6i13P') + calcsize('n'))
# complex
check(complex(0,1), size('2d'))
# method_descriptor (descriptor object)
check(str.lower, size('3PP'))
# classmethod_descriptor (descriptor object)
# XXX
# member_descriptor (descriptor object)
import datetime
check(datetime.timedelta.days, size('3PP'))
# getset_descriptor (descriptor object)
import collections
check(collections.defaultdict.default_factory, size('3PP'))
# wrapper_descriptor (descriptor object)
check(int.__add__, size('3P2P'))
# method-wrapper (descriptor object)
check({}.__iter__, size('2P'))
# dict
check({}, size('nQ2P') + calcsize('2nP2n') + 8 + (8*2//3)*calcsize('n2P'))
longdict = {1:1, 2:2, 3:3, 4:4, 5:5, 6:6, 7:7, 8:8}
check(longdict, size('nQ2P') + calcsize('2nP2n') + 16 + (16*2//3)*calcsize('n2P'))
# dictionary-keyview
check({}.keys(), size('P'))
# dictionary-valueview
check({}.values(), size('P'))
# dictionary-itemview
check({}.items(), size('P'))
# dictionary iterator
check(iter({}), size('P2nPn'))
# dictionary-keyiterator
check(iter({}.keys()), size('P2nPn'))
# dictionary-valueiterator
check(iter({}.values()), size('P2nPn'))
# dictionary-itemiterator
check(iter({}.items()), size('P2nPn'))
# dictproxy
class C(object): pass
check(C.__dict__, size('P'))
# BaseException
check(BaseException(), size('5Pb'))
# UnicodeEncodeError
check(UnicodeEncodeError("", "", 0, 0, ""), size('5Pb 2P2nP'))
# UnicodeDecodeError
check(UnicodeDecodeError("", b"", 0, 0, ""), size('5Pb 2P2nP'))
# UnicodeTranslateError
check(UnicodeTranslateError("", 0, 1, ""), size('5Pb 2P2nP'))
# ellipses
check(Ellipsis, size(''))
# EncodingMap
import codecs, encodings.iso8859_3
x = codecs.charmap_build(encodings.iso8859_3.decoding_table)
check(x, size('32B2iB'))
# enumerate
check(enumerate([]), size('n3P'))
# reverse
check(reversed(''), size('nP'))
# float
check(float(0), size('d'))
# sys.floatinfo
check(sys.float_info, vsize('') + self.P * len(sys.float_info))
# frame
import inspect
CO_MAXBLOCKS = 20
x = inspect.currentframe()
ncells = len(x.f_code.co_cellvars)
nfrees = len(x.f_code.co_freevars)
extras = x.f_code.co_stacksize + x.f_code.co_nlocals +\
ncells + nfrees - 1
check(x, vsize('12P3ic' + CO_MAXBLOCKS*'3i' + 'P' + extras*'P'))
# function
def func(): pass
check(func, size('12P'))
class c():
@staticmethod
def foo():
pass
@classmethod
def bar(cls):
pass
# staticmethod
check(foo, size('PP'))
# classmethod
check(bar, size('PP'))
# generator
def get_gen(): yield 1
check(get_gen(), size('Pb2PPP'))
# iterator
check(iter('abc'), size('lP'))
# callable-iterator
import re
check(re.finditer('',''), size('2P'))
# list
samples = [[], [1,2,3], ['1', '2', '3']]
for sample in samples:
check(sample, vsize('Pn') + len(sample)*self.P)
# sortwrapper (list)
# XXX
# cmpwrapper (list)
# XXX
# listiterator (list)
check(iter([]), size('lP'))
# listreverseiterator (list)
check(reversed([]), size('nP'))
# int
check(0, vsize(''))
check(1, vsize('') + self.longdigit)
check(-1, vsize('') + self.longdigit)
PyLong_BASE = 2**sys.int_info.bits_per_digit
check(int(PyLong_BASE), vsize('') + 2*self.longdigit)
check(int(PyLong_BASE**2-1), vsize('') + 2*self.longdigit)
check(int(PyLong_BASE**2), vsize('') + 3*self.longdigit)
# module
check(unittest, size('PnPPP'))
# None
check(None, size(''))
# NotImplementedType
check(NotImplemented, size(''))
# object
check(object(), size(''))
# property (descriptor object)
class C(object):
def getx(self): return self.__x
def setx(self, value): self.__x = value
def delx(self): del self.__x
x = property(getx, setx, delx, "")
check(x, size('4Pi'))
# PyCapsule
# XXX
# rangeiterator
check(iter(range(1)), size('4l'))
# reverse
check(reversed(''), size('nP'))
# range
check(range(1), size('4P'))
check(range(66000), size('4P'))
# set
# frozenset
PySet_MINSIZE = 8
samples = [[], range(10), range(50)]
s = size('3nP' + PySet_MINSIZE*'nP' + '2nP')
for sample in samples:
minused = len(sample)
if minused == 0: tmp = 1
# the computation of minused is actually a bit more complicated
# but this suffices for the sizeof test
minused = minused*2
newsize = PySet_MINSIZE
while newsize <= minused:
newsize = newsize << 1
if newsize <= 8:
check(set(sample), s)
check(frozenset(sample), s)
else:
check(set(sample), s + newsize*calcsize('nP'))
check(frozenset(sample), s + newsize*calcsize('nP'))
# setiterator
check(iter(set()), size('P3n'))
# slice
check(slice(0), size('3P'))
# super
check(super(int), size('3P'))
# tuple
check((), vsize(''))
check((1,2,3), vsize('') + 3*self.P)
# type
# static type: PyTypeObject
fmt = 'P2n15Pl4Pn9Pn11PIP'
if hasattr(sys, 'getcounts'):
fmt += '3n2P'
s = vsize(fmt)
check(int, s)
# class
s = vsize(fmt + # PyTypeObject
'3P' # PyAsyncMethods
'36P' # PyNumberMethods
'3P' # PyMappingMethods
'10P' # PySequenceMethods
'2P' # PyBufferProcs
'4P')
class newstyleclass(object): pass
# Separate block for PyDictKeysObject with 8 keys and 5 entries
check(newstyleclass, s + calcsize("2nP2n0P") + 8 + 5*calcsize("n2P"))
# dict with shared keys
check(newstyleclass().__dict__, size('nQ2P') + 5*self.P)
o = newstyleclass()
o.a = o.b = o.c = o.d = o.e = o.f = o.g = o.h = 1
# Separate block for PyDictKeysObject with 16 keys and 10 entries
check(newstyleclass, s + calcsize("2nP2n0P") + 16 + 10*calcsize("n2P"))
# dict with shared keys
check(newstyleclass().__dict__, size('nQ2P') + 10*self.P)
# unicode
# each tuple contains a string and its expected character size
# don't put any static strings here, as they may contain
# wchar_t or UTF-8 representations
samples = ['1'*100, '\xff'*50,
'\u0100'*40, '\uffff'*100,
'\U00010000'*30, '\U0010ffff'*100]
asciifields = "nnbP"
compactfields = asciifields + "nPn"
unicodefields = compactfields + "P"
for s in samples:
maxchar = ord(max(s))
if maxchar < 128:
L = size(asciifields) + len(s) + 1
elif maxchar < 256:
L = size(compactfields) + len(s) + 1
elif maxchar < 65536:
L = size(compactfields) + 2*(len(s) + 1)
else:
L = size(compactfields) + 4*(len(s) + 1)
check(s, L)
# verify that the UTF-8 size is accounted for
s = chr(0x4000) # 4 bytes canonical representation
check(s, size(compactfields) + 4)
# compile() will trigger the generation of the UTF-8
# representation as a side effect
compile(s, "<stdin>", "eval")
check(s, size(compactfields) + 4 + 4)
# TODO: add check that forces the presence of wchar_t representation
# TODO: add check that forces layout of unicodefields
# weakref
import weakref
check(weakref.ref(int), size('2Pn2P'))
# weakproxy
# XXX
# weakcallableproxy
check(weakref.proxy(int), size('2Pn2P'))
def check_slots(self, obj, base, extra):
expected = sys.getsizeof(base) + struct.calcsize(extra)
if gc.is_tracked(obj) and not gc.is_tracked(base):
expected += self.gc_headsize
self.assertEqual(sys.getsizeof(obj), expected)
def test_slots(self):
# check all subclassable types defined in Objects/ that allow
# non-empty __slots__
check = self.check_slots
class BA(bytearray):
__slots__ = 'a', 'b', 'c'
check(BA(), bytearray(), '3P')
class D(dict):
__slots__ = 'a', 'b', 'c'
check(D(x=[]), {'x': []}, '3P')
class L(list):
__slots__ = 'a', 'b', 'c'
check(L(), [], '3P')
class S(set):
__slots__ = 'a', 'b', 'c'
check(S(), set(), '3P')
class FS(frozenset):
__slots__ = 'a', 'b', 'c'
check(FS(), frozenset(), '3P')
from collections import OrderedDict
class OD(OrderedDict):
__slots__ = 'a', 'b', 'c'
check(OD(x=[]), OrderedDict(x=[]), '3P')
def test_pythontypes(self):
# check all types defined in Python/
size = test.support.calcobjsize
vsize = test.support.calcvobjsize
check = self.check_sizeof
# _ast.AST
import _ast
check(_ast.AST(), size('P'))
try:
raise TypeError
except TypeError:
tb = sys.exc_info()[2]
# traceback
if tb is not None:
check(tb, size('2P2i'))
# symtable entry
# XXX
# sys.flags
check(sys.flags, vsize('') + self.P * len(sys.flags))
def test_asyncgen_hooks(self):
old = sys.get_asyncgen_hooks()
self.assertIsNone(old.firstiter)
self.assertIsNone(old.finalizer)
firstiter = lambda *a: None
sys.set_asyncgen_hooks(firstiter=firstiter)
hooks = sys.get_asyncgen_hooks()
self.assertIs(hooks.firstiter, firstiter)
self.assertIs(hooks[0], firstiter)
self.assertIs(hooks.finalizer, None)
self.assertIs(hooks[1], None)
finalizer = lambda *a: None
sys.set_asyncgen_hooks(finalizer=finalizer)
hooks = sys.get_asyncgen_hooks()
self.assertIs(hooks.firstiter, firstiter)
self.assertIs(hooks[0], firstiter)
self.assertIs(hooks.finalizer, finalizer)
self.assertIs(hooks[1], finalizer)
sys.set_asyncgen_hooks(*old)
cur = sys.get_asyncgen_hooks()
self.assertIsNone(cur.firstiter)
self.assertIsNone(cur.finalizer)
def test_main():
test.support.run_unittest(SysModuleTest, SizeofTest)
if __name__ == "__main__":
test_main()
| 49,045 | 1,279 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_bisect.py | import sys
import unittest
from test import support
from collections import UserList
py_bisect = support.import_fresh_module('bisect', blocked=['_bisect'])
c_bisect = support.import_fresh_module('bisect', fresh=['_bisect'])
class Range(object):
"""A trivial range()-like object that has an insert() method."""
def __init__(self, start, stop):
self.start = start
self.stop = stop
self.last_insert = None
def __len__(self):
return self.stop - self.start
def __getitem__(self, idx):
n = self.stop - self.start
if idx < 0:
idx += n
if idx >= n:
raise IndexError(idx)
return self.start + idx
def insert(self, idx, item):
self.last_insert = idx, item
class TestBisect:
def setUp(self):
self.precomputedCases = [
(self.module.bisect_right, [], 1, 0),
(self.module.bisect_right, [1], 0, 0),
(self.module.bisect_right, [1], 1, 1),
(self.module.bisect_right, [1], 2, 1),
(self.module.bisect_right, [1, 1], 0, 0),
(self.module.bisect_right, [1, 1], 1, 2),
(self.module.bisect_right, [1, 1], 2, 2),
(self.module.bisect_right, [1, 1, 1], 0, 0),
(self.module.bisect_right, [1, 1, 1], 1, 3),
(self.module.bisect_right, [1, 1, 1], 2, 3),
(self.module.bisect_right, [1, 1, 1, 1], 0, 0),
(self.module.bisect_right, [1, 1, 1, 1], 1, 4),
(self.module.bisect_right, [1, 1, 1, 1], 2, 4),
(self.module.bisect_right, [1, 2], 0, 0),
(self.module.bisect_right, [1, 2], 1, 1),
(self.module.bisect_right, [1, 2], 1.5, 1),
(self.module.bisect_right, [1, 2], 2, 2),
(self.module.bisect_right, [1, 2], 3, 2),
(self.module.bisect_right, [1, 1, 2, 2], 0, 0),
(self.module.bisect_right, [1, 1, 2, 2], 1, 2),
(self.module.bisect_right, [1, 1, 2, 2], 1.5, 2),
(self.module.bisect_right, [1, 1, 2, 2], 2, 4),
(self.module.bisect_right, [1, 1, 2, 2], 3, 4),
(self.module.bisect_right, [1, 2, 3], 0, 0),
(self.module.bisect_right, [1, 2, 3], 1, 1),
(self.module.bisect_right, [1, 2, 3], 1.5, 1),
(self.module.bisect_right, [1, 2, 3], 2, 2),
(self.module.bisect_right, [1, 2, 3], 2.5, 2),
(self.module.bisect_right, [1, 2, 3], 3, 3),
(self.module.bisect_right, [1, 2, 3], 4, 3),
(self.module.bisect_right, [1, 2, 2, 3, 3, 3, 4, 4, 4, 4], 0, 0),
(self.module.bisect_right, [1, 2, 2, 3, 3, 3, 4, 4, 4, 4], 1, 1),
(self.module.bisect_right, [1, 2, 2, 3, 3, 3, 4, 4, 4, 4], 1.5, 1),
(self.module.bisect_right, [1, 2, 2, 3, 3, 3, 4, 4, 4, 4], 2, 3),
(self.module.bisect_right, [1, 2, 2, 3, 3, 3, 4, 4, 4, 4], 2.5, 3),
(self.module.bisect_right, [1, 2, 2, 3, 3, 3, 4, 4, 4, 4], 3, 6),
(self.module.bisect_right, [1, 2, 2, 3, 3, 3, 4, 4, 4, 4], 3.5, 6),
(self.module.bisect_right, [1, 2, 2, 3, 3, 3, 4, 4, 4, 4], 4, 10),
(self.module.bisect_right, [1, 2, 2, 3, 3, 3, 4, 4, 4, 4], 5, 10),
(self.module.bisect_left, [], 1, 0),
(self.module.bisect_left, [1], 0, 0),
(self.module.bisect_left, [1], 1, 0),
(self.module.bisect_left, [1], 2, 1),
(self.module.bisect_left, [1, 1], 0, 0),
(self.module.bisect_left, [1, 1], 1, 0),
(self.module.bisect_left, [1, 1], 2, 2),
(self.module.bisect_left, [1, 1, 1], 0, 0),
(self.module.bisect_left, [1, 1, 1], 1, 0),
(self.module.bisect_left, [1, 1, 1], 2, 3),
(self.module.bisect_left, [1, 1, 1, 1], 0, 0),
(self.module.bisect_left, [1, 1, 1, 1], 1, 0),
(self.module.bisect_left, [1, 1, 1, 1], 2, 4),
(self.module.bisect_left, [1, 2], 0, 0),
(self.module.bisect_left, [1, 2], 1, 0),
(self.module.bisect_left, [1, 2], 1.5, 1),
(self.module.bisect_left, [1, 2], 2, 1),
(self.module.bisect_left, [1, 2], 3, 2),
(self.module.bisect_left, [1, 1, 2, 2], 0, 0),
(self.module.bisect_left, [1, 1, 2, 2], 1, 0),
(self.module.bisect_left, [1, 1, 2, 2], 1.5, 2),
(self.module.bisect_left, [1, 1, 2, 2], 2, 2),
(self.module.bisect_left, [1, 1, 2, 2], 3, 4),
(self.module.bisect_left, [1, 2, 3], 0, 0),
(self.module.bisect_left, [1, 2, 3], 1, 0),
(self.module.bisect_left, [1, 2, 3], 1.5, 1),
(self.module.bisect_left, [1, 2, 3], 2, 1),
(self.module.bisect_left, [1, 2, 3], 2.5, 2),
(self.module.bisect_left, [1, 2, 3], 3, 2),
(self.module.bisect_left, [1, 2, 3], 4, 3),
(self.module.bisect_left, [1, 2, 2, 3, 3, 3, 4, 4, 4, 4], 0, 0),
(self.module.bisect_left, [1, 2, 2, 3, 3, 3, 4, 4, 4, 4], 1, 0),
(self.module.bisect_left, [1, 2, 2, 3, 3, 3, 4, 4, 4, 4], 1.5, 1),
(self.module.bisect_left, [1, 2, 2, 3, 3, 3, 4, 4, 4, 4], 2, 1),
(self.module.bisect_left, [1, 2, 2, 3, 3, 3, 4, 4, 4, 4], 2.5, 3),
(self.module.bisect_left, [1, 2, 2, 3, 3, 3, 4, 4, 4, 4], 3, 3),
(self.module.bisect_left, [1, 2, 2, 3, 3, 3, 4, 4, 4, 4], 3.5, 6),
(self.module.bisect_left, [1, 2, 2, 3, 3, 3, 4, 4, 4, 4], 4, 6),
(self.module.bisect_left, [1, 2, 2, 3, 3, 3, 4, 4, 4, 4], 5, 10)
]
def test_precomputed(self):
for func, data, elem, expected in self.precomputedCases:
self.assertEqual(func(data, elem), expected)
self.assertEqual(func(UserList(data), elem), expected)
def test_negative_lo(self):
# Issue 3301
mod = self.module
self.assertRaises(ValueError, mod.bisect_left, [1, 2, 3], 5, -1, 3)
self.assertRaises(ValueError, mod.bisect_right, [1, 2, 3], 5, -1, 3)
self.assertRaises(ValueError, mod.insort_left, [1, 2, 3], 5, -1, 3)
self.assertRaises(ValueError, mod.insort_right, [1, 2, 3], 5, -1, 3)
def test_large_range(self):
# Issue 13496
mod = self.module
n = sys.maxsize
data = range(n-1)
self.assertEqual(mod.bisect_left(data, n-3), n-3)
self.assertEqual(mod.bisect_right(data, n-3), n-2)
self.assertEqual(mod.bisect_left(data, n-3, n-10, n), n-3)
self.assertEqual(mod.bisect_right(data, n-3, n-10, n), n-2)
def test_large_pyrange(self):
# Same as above, but without C-imposed limits on range() parameters
mod = self.module
n = sys.maxsize
data = Range(0, n-1)
self.assertEqual(mod.bisect_left(data, n-3), n-3)
self.assertEqual(mod.bisect_right(data, n-3), n-2)
self.assertEqual(mod.bisect_left(data, n-3, n-10, n), n-3)
self.assertEqual(mod.bisect_right(data, n-3, n-10, n), n-2)
x = n - 100
mod.insort_left(data, x, x - 50, x + 50)
self.assertEqual(data.last_insert, (x, x))
x = n - 200
mod.insort_right(data, x, x - 50, x + 50)
self.assertEqual(data.last_insert, (x + 1, x))
def test_random(self, n=25):
from random import randrange
for i in range(n):
data = [randrange(0, n, 2) for j in range(i)]
data.sort()
elem = randrange(-1, n+1)
ip = self.module.bisect_left(data, elem)
if ip < len(data):
self.assertTrue(elem <= data[ip])
if ip > 0:
self.assertTrue(data[ip-1] < elem)
ip = self.module.bisect_right(data, elem)
if ip < len(data):
self.assertTrue(elem < data[ip])
if ip > 0:
self.assertTrue(data[ip-1] <= elem)
def test_optionalSlicing(self):
for func, data, elem, expected in self.precomputedCases:
for lo in range(4):
lo = min(len(data), lo)
for hi in range(3,8):
hi = min(len(data), hi)
ip = func(data, elem, lo, hi)
self.assertTrue(lo <= ip <= hi)
if func is self.module.bisect_left and ip < hi:
self.assertTrue(elem <= data[ip])
if func is self.module.bisect_left and ip > lo:
self.assertTrue(data[ip-1] < elem)
if func is self.module.bisect_right and ip < hi:
self.assertTrue(elem < data[ip])
if func is self.module.bisect_right and ip > lo:
self.assertTrue(data[ip-1] <= elem)
self.assertEqual(ip, max(lo, min(hi, expected)))
def test_backcompatibility(self):
self.assertEqual(self.module.bisect, self.module.bisect_right)
def test_keyword_args(self):
data = [10, 20, 30, 40, 50]
self.assertEqual(self.module.bisect_left(a=data, x=25, lo=1, hi=3), 2)
self.assertEqual(self.module.bisect_right(a=data, x=25, lo=1, hi=3), 2)
self.assertEqual(self.module.bisect(a=data, x=25, lo=1, hi=3), 2)
self.module.insort_left(a=data, x=25, lo=1, hi=3)
self.module.insort_right(a=data, x=25, lo=1, hi=3)
self.module.insort(a=data, x=25, lo=1, hi=3)
self.assertEqual(data, [10, 20, 25, 25, 25, 30, 40, 50])
@unittest.skipIf(c_bisect, "skip pure-python test if C impl is present")
class TestBisectPython(TestBisect, unittest.TestCase):
module = py_bisect
class TestBisectC(TestBisect, unittest.TestCase):
module = c_bisect
#==============================================================================
class TestInsort:
def test_vsBuiltinSort(self, n=500):
from random import choice
for insorted in (list(), UserList()):
for i in range(n):
digit = choice("0123456789")
if digit in "02468":
f = self.module.insort_left
else:
f = self.module.insort_right
f(insorted, digit)
self.assertEqual(sorted(insorted), insorted)
def test_backcompatibility(self):
self.assertEqual(self.module.insort, self.module.insort_right)
def test_listDerived(self):
class List(list):
data = []
def insert(self, index, item):
self.data.insert(index, item)
lst = List()
self.module.insort_left(lst, 10)
self.module.insort_right(lst, 5)
self.assertEqual([5, 10], lst.data)
@unittest.skipIf(c_bisect, "skip pure-python test if C impl is present")
class TestInsortPython(TestInsort, unittest.TestCase):
module = py_bisect
class TestInsortC(TestInsort, unittest.TestCase):
module = c_bisect
#==============================================================================
class LenOnly:
"Dummy sequence class defining __len__ but not __getitem__."
def __len__(self):
return 10
class GetOnly:
"Dummy sequence class defining __getitem__ but not __len__."
def __getitem__(self, ndx):
return 10
class CmpErr:
"Dummy element that always raises an error during comparison"
def __lt__(self, other):
raise ZeroDivisionError
__gt__ = __lt__
__le__ = __lt__
__ge__ = __lt__
__eq__ = __lt__
__ne__ = __lt__
class TestErrorHandling:
def test_non_sequence(self):
for f in (self.module.bisect_left, self.module.bisect_right,
self.module.insort_left, self.module.insort_right):
self.assertRaises(TypeError, f, 10, 10)
def test_len_only(self):
for f in (self.module.bisect_left, self.module.bisect_right,
self.module.insort_left, self.module.insort_right):
self.assertRaises(TypeError, f, LenOnly(), 10)
def test_get_only(self):
for f in (self.module.bisect_left, self.module.bisect_right,
self.module.insort_left, self.module.insort_right):
self.assertRaises(TypeError, f, GetOnly(), 10)
def test_cmp_err(self):
seq = [CmpErr(), CmpErr(), CmpErr()]
for f in (self.module.bisect_left, self.module.bisect_right,
self.module.insort_left, self.module.insort_right):
self.assertRaises(ZeroDivisionError, f, seq, 10)
def test_arg_parsing(self):
for f in (self.module.bisect_left, self.module.bisect_right,
self.module.insort_left, self.module.insort_right):
self.assertRaises(TypeError, f, 10)
@unittest.skipIf(c_bisect, "skip pure-python test if C impl is present")
class TestErrorHandlingPython(TestErrorHandling, unittest.TestCase):
module = py_bisect
class TestErrorHandlingC(TestErrorHandling, unittest.TestCase):
module = c_bisect
#==============================================================================
class TestDocExample:
def test_grades(self):
def grade(score, breakpoints=[60, 70, 80, 90], grades='FDCBA'):
i = self.module.bisect(breakpoints, score)
return grades[i]
result = [grade(score) for score in [33, 99, 77, 70, 89, 90, 100]]
self.assertEqual(result, ['F', 'A', 'C', 'C', 'B', 'A', 'A'])
def test_colors(self):
data = [('red', 5), ('blue', 1), ('yellow', 8), ('black', 0)]
data.sort(key=lambda r: r[1])
keys = [r[1] for r in data]
bisect_left = self.module.bisect_left
self.assertEqual(data[bisect_left(keys, 0)], ('black', 0))
self.assertEqual(data[bisect_left(keys, 1)], ('blue', 1))
self.assertEqual(data[bisect_left(keys, 5)], ('red', 5))
self.assertEqual(data[bisect_left(keys, 8)], ('yellow', 8))
@unittest.skipIf(c_bisect, "skip pure-python test if C impl is present")
class TestDocExamplePython(TestDocExample, unittest.TestCase):
module = py_bisect
class TestDocExampleC(TestDocExample, unittest.TestCase):
module = c_bisect
#------------------------------------------------------------------------------
if __name__ == "__main__":
unittest.main()
| 14,252 | 333 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_base64.py | import unittest
from test import support
import base64
import binascii
import os
from array import array
from test.support import script_helper
class LegacyBase64TestCase(unittest.TestCase):
# Legacy API is not as permissive as the modern API
def check_type_errors(self, f):
self.assertRaises(TypeError, f, "")
self.assertRaises(TypeError, f, [])
multidimensional = memoryview(b"1234").cast('B', (2, 2))
self.assertRaises(TypeError, f, multidimensional)
int_data = memoryview(b"1234").cast('I')
self.assertRaises(TypeError, f, int_data)
def test_encodestring_warns(self):
with self.assertWarns(DeprecationWarning):
base64.encodestring(b"www.python.org")
def test_decodestring_warns(self):
with self.assertWarns(DeprecationWarning):
base64.decodestring(b"d3d3LnB5dGhvbi5vcmc=\n")
def test_encodebytes(self):
eq = self.assertEqual
eq(base64.encodebytes(b"www.python.org"), b"d3d3LnB5dGhvbi5vcmc=\n")
eq(base64.encodebytes(b"a"), b"YQ==\n")
eq(base64.encodebytes(b"ab"), b"YWI=\n")
eq(base64.encodebytes(b"abc"), b"YWJj\n")
eq(base64.encodebytes(b""), b"")
eq(base64.encodebytes(b"abcdefghijklmnopqrstuvwxyz"
b"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
b"0123456789!@#0^&*();:<>,. []{}"),
b"YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXpBQkNE"
b"RUZHSElKS0xNTk9QUVJTVFVWV1hZWjAxMjM0\nNT"
b"Y3ODkhQCMwXiYqKCk7Ojw+LC4gW117fQ==\n")
# Non-bytes
eq(base64.encodebytes(bytearray(b'abc')), b'YWJj\n')
eq(base64.encodebytes(memoryview(b'abc')), b'YWJj\n')
eq(base64.encodebytes(array('B', b'abc')), b'YWJj\n')
self.check_type_errors(base64.encodebytes)
def test_decodebytes(self):
eq = self.assertEqual
eq(base64.decodebytes(b"d3d3LnB5dGhvbi5vcmc=\n"), b"www.python.org")
eq(base64.decodebytes(b"YQ==\n"), b"a")
eq(base64.decodebytes(b"YWI=\n"), b"ab")
eq(base64.decodebytes(b"YWJj\n"), b"abc")
eq(base64.decodebytes(b"YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXpBQkNE"
b"RUZHSElKS0xNTk9QUVJTVFVWV1hZWjAxMjM0\nNT"
b"Y3ODkhQCMwXiYqKCk7Ojw+LC4gW117fQ==\n"),
b"abcdefghijklmnopqrstuvwxyz"
b"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
b"0123456789!@#0^&*();:<>,. []{}")
eq(base64.decodebytes(b''), b'')
# Non-bytes
eq(base64.decodebytes(bytearray(b'YWJj\n')), b'abc')
eq(base64.decodebytes(memoryview(b'YWJj\n')), b'abc')
eq(base64.decodebytes(array('B', b'YWJj\n')), b'abc')
self.check_type_errors(base64.decodebytes)
def test_encode(self):
eq = self.assertEqual
from io import BytesIO, StringIO
infp = BytesIO(b'abcdefghijklmnopqrstuvwxyz'
b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
b'0123456789!@#0^&*();:<>,. []{}')
outfp = BytesIO()
base64.encode(infp, outfp)
eq(outfp.getvalue(),
b'YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXpBQkNE'
b'RUZHSElKS0xNTk9QUVJTVFVWV1hZWjAxMjM0\nNT'
b'Y3ODkhQCMwXiYqKCk7Ojw+LC4gW117fQ==\n')
# Non-binary files
self.assertRaises(TypeError, base64.encode, StringIO('abc'), BytesIO())
self.assertRaises(TypeError, base64.encode, BytesIO(b'abc'), StringIO())
self.assertRaises(TypeError, base64.encode, StringIO('abc'), StringIO())
def test_decode(self):
from io import BytesIO, StringIO
infp = BytesIO(b'd3d3LnB5dGhvbi5vcmc=')
outfp = BytesIO()
base64.decode(infp, outfp)
self.assertEqual(outfp.getvalue(), b'www.python.org')
# Non-binary files
self.assertRaises(TypeError, base64.encode, StringIO('YWJj\n'), BytesIO())
self.assertRaises(TypeError, base64.encode, BytesIO(b'YWJj\n'), StringIO())
self.assertRaises(TypeError, base64.encode, StringIO('YWJj\n'), StringIO())
class BaseXYTestCase(unittest.TestCase):
# Modern API completely ignores exported dimension and format data and
# treats any buffer as a stream of bytes
def check_encode_type_errors(self, f):
self.assertRaises(TypeError, f, "")
self.assertRaises(TypeError, f, [])
def check_decode_type_errors(self, f):
self.assertRaises(TypeError, f, [])
def check_other_types(self, f, bytes_data, expected):
eq = self.assertEqual
b = bytearray(bytes_data)
eq(f(b), expected)
# The bytearray wasn't mutated
eq(b, bytes_data)
eq(f(memoryview(bytes_data)), expected)
eq(f(array('B', bytes_data)), expected)
# XXX why is b64encode hardcoded here?
self.check_nonbyte_element_format(base64.b64encode, bytes_data)
self.check_multidimensional(base64.b64encode, bytes_data)
def check_multidimensional(self, f, data):
padding = b"\x00" if len(data) % 2 else b""
bytes_data = data + padding # Make sure cast works
shape = (len(bytes_data) // 2, 2)
multidimensional = memoryview(bytes_data).cast('B', shape)
self.assertEqual(f(multidimensional), f(bytes_data))
def check_nonbyte_element_format(self, f, data):
padding = b"\x00" * ((4 - len(data)) % 4)
bytes_data = data + padding # Make sure cast works
int_data = memoryview(bytes_data).cast('I')
self.assertEqual(f(int_data), f(bytes_data))
def test_b64encode(self):
eq = self.assertEqual
# Test default alphabet
eq(base64.b64encode(b"www.python.org"), b"d3d3LnB5dGhvbi5vcmc=")
eq(base64.b64encode(b'\x00'), b'AA==')
eq(base64.b64encode(b"a"), b"YQ==")
eq(base64.b64encode(b"ab"), b"YWI=")
eq(base64.b64encode(b"abc"), b"YWJj")
eq(base64.b64encode(b""), b"")
eq(base64.b64encode(b"abcdefghijklmnopqrstuvwxyz"
b"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
b"0123456789!@#0^&*();:<>,. []{}"),
b"YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXpBQkNE"
b"RUZHSElKS0xNTk9QUVJTVFVWV1hZWjAxMjM0NT"
b"Y3ODkhQCMwXiYqKCk7Ojw+LC4gW117fQ==")
# Test with arbitrary alternative characters
eq(base64.b64encode(b'\xd3V\xbeo\xf7\x1d', altchars=b'*$'), b'01a*b$cd')
eq(base64.b64encode(b'\xd3V\xbeo\xf7\x1d', altchars=bytearray(b'*$')),
b'01a*b$cd')
eq(base64.b64encode(b'\xd3V\xbeo\xf7\x1d', altchars=memoryview(b'*$')),
b'01a*b$cd')
eq(base64.b64encode(b'\xd3V\xbeo\xf7\x1d', altchars=array('B', b'*$')),
b'01a*b$cd')
# Non-bytes
self.check_other_types(base64.b64encode, b'abcd', b'YWJjZA==')
self.check_encode_type_errors(base64.b64encode)
self.assertRaises(TypeError, base64.b64encode, b"", altchars="*$")
# Test standard alphabet
eq(base64.standard_b64encode(b"www.python.org"), b"d3d3LnB5dGhvbi5vcmc=")
eq(base64.standard_b64encode(b"a"), b"YQ==")
eq(base64.standard_b64encode(b"ab"), b"YWI=")
eq(base64.standard_b64encode(b"abc"), b"YWJj")
eq(base64.standard_b64encode(b""), b"")
eq(base64.standard_b64encode(b"abcdefghijklmnopqrstuvwxyz"
b"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
b"0123456789!@#0^&*();:<>,. []{}"),
b"YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXpBQkNE"
b"RUZHSElKS0xNTk9QUVJTVFVWV1hZWjAxMjM0NT"
b"Y3ODkhQCMwXiYqKCk7Ojw+LC4gW117fQ==")
# Non-bytes
self.check_other_types(base64.standard_b64encode,
b'abcd', b'YWJjZA==')
self.check_encode_type_errors(base64.standard_b64encode)
# Test with 'URL safe' alternative characters
eq(base64.urlsafe_b64encode(b'\xd3V\xbeo\xf7\x1d'), b'01a-b_cd')
# Non-bytes
self.check_other_types(base64.urlsafe_b64encode,
b'\xd3V\xbeo\xf7\x1d', b'01a-b_cd')
self.check_encode_type_errors(base64.urlsafe_b64encode)
def test_b64decode(self):
eq = self.assertEqual
tests = {b"d3d3LnB5dGhvbi5vcmc=": b"www.python.org",
b'AA==': b'\x00',
b"YQ==": b"a",
b"YWI=": b"ab",
b"YWJj": b"abc",
b"YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXpBQkNE"
b"RUZHSElKS0xNTk9QUVJTVFVWV1hZWjAxMjM0\nNT"
b"Y3ODkhQCMwXiYqKCk7Ojw+LC4gW117fQ==":
b"abcdefghijklmnopqrstuvwxyz"
b"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
b"0123456789!@#0^&*();:<>,. []{}",
b'': b'',
}
for data, res in tests.items():
eq(base64.b64decode(data), res)
eq(base64.b64decode(data.decode('ascii')), res)
# Non-bytes
self.check_other_types(base64.b64decode, b"YWJj", b"abc")
self.check_decode_type_errors(base64.b64decode)
# Test with arbitrary alternative characters
tests_altchars = {(b'01a*b$cd', b'*$'): b'\xd3V\xbeo\xf7\x1d',
}
for (data, altchars), res in tests_altchars.items():
data_str = data.decode('ascii')
altchars_str = altchars.decode('ascii')
eq(base64.b64decode(data, altchars=altchars), res)
eq(base64.b64decode(data_str, altchars=altchars), res)
eq(base64.b64decode(data, altchars=altchars_str), res)
eq(base64.b64decode(data_str, altchars=altchars_str), res)
# Test standard alphabet
for data, res in tests.items():
eq(base64.standard_b64decode(data), res)
eq(base64.standard_b64decode(data.decode('ascii')), res)
# Non-bytes
self.check_other_types(base64.standard_b64decode, b"YWJj", b"abc")
self.check_decode_type_errors(base64.standard_b64decode)
# Test with 'URL safe' alternative characters
tests_urlsafe = {b'01a-b_cd': b'\xd3V\xbeo\xf7\x1d',
b'': b'',
}
for data, res in tests_urlsafe.items():
eq(base64.urlsafe_b64decode(data), res)
eq(base64.urlsafe_b64decode(data.decode('ascii')), res)
# Non-bytes
self.check_other_types(base64.urlsafe_b64decode, b'01a-b_cd',
b'\xd3V\xbeo\xf7\x1d')
self.check_decode_type_errors(base64.urlsafe_b64decode)
def test_b64decode_padding_error(self):
self.assertRaises(binascii.Error, base64.b64decode, b'abc')
self.assertRaises(binascii.Error, base64.b64decode, 'abc')
def test_b64decode_invalid_chars(self):
# issue 1466065: Test some invalid characters.
tests = ((b'%3d==', b'\xdd'),
(b'$3d==', b'\xdd'),
(b'[==', b''),
(b'YW]3=', b'am'),
(b'3{d==', b'\xdd'),
(b'3d}==', b'\xdd'),
(b'@@', b''),
(b'!', b''),
(b'YWJj\nYWI=', b'abcab'))
funcs = (
base64.b64decode,
base64.standard_b64decode,
base64.urlsafe_b64decode,
)
for bstr, res in tests:
for func in funcs:
with self.subTest(bstr=bstr, func=func):
self.assertEqual(func(bstr), res)
self.assertEqual(func(bstr.decode('ascii')), res)
with self.assertRaises(binascii.Error):
base64.b64decode(bstr, validate=True)
with self.assertRaises(binascii.Error):
base64.b64decode(bstr.decode('ascii'), validate=True)
# Normal alphabet characters not discarded when alternative given
res = b'\xFB\xEF\xBE\xFF\xFF\xFF'
self.assertEqual(base64.b64decode(b'++[[//]]', b'[]'), res)
self.assertEqual(base64.urlsafe_b64decode(b'++--//__'), res)
def test_b32encode(self):
eq = self.assertEqual
eq(base64.b32encode(b''), b'')
eq(base64.b32encode(b'\x00'), b'AA======')
eq(base64.b32encode(b'a'), b'ME======')
eq(base64.b32encode(b'ab'), b'MFRA====')
eq(base64.b32encode(b'abc'), b'MFRGG===')
eq(base64.b32encode(b'abcd'), b'MFRGGZA=')
eq(base64.b32encode(b'abcde'), b'MFRGGZDF')
# Non-bytes
self.check_other_types(base64.b32encode, b'abcd', b'MFRGGZA=')
self.check_encode_type_errors(base64.b32encode)
def test_b32decode(self):
eq = self.assertEqual
tests = {b'': b'',
b'AA======': b'\x00',
b'ME======': b'a',
b'MFRA====': b'ab',
b'MFRGG===': b'abc',
b'MFRGGZA=': b'abcd',
b'MFRGGZDF': b'abcde',
}
for data, res in tests.items():
eq(base64.b32decode(data), res)
eq(base64.b32decode(data.decode('ascii')), res)
# Non-bytes
self.check_other_types(base64.b32decode, b'MFRGG===', b"abc")
self.check_decode_type_errors(base64.b32decode)
def test_b32decode_casefold(self):
eq = self.assertEqual
tests = {b'': b'',
b'ME======': b'a',
b'MFRA====': b'ab',
b'MFRGG===': b'abc',
b'MFRGGZA=': b'abcd',
b'MFRGGZDF': b'abcde',
# Lower cases
b'me======': b'a',
b'mfra====': b'ab',
b'mfrgg===': b'abc',
b'mfrggza=': b'abcd',
b'mfrggzdf': b'abcde',
}
for data, res in tests.items():
eq(base64.b32decode(data, True), res)
eq(base64.b32decode(data.decode('ascii'), True), res)
self.assertRaises(binascii.Error, base64.b32decode, b'me======')
self.assertRaises(binascii.Error, base64.b32decode, 'me======')
# Mapping zero and one
eq(base64.b32decode(b'MLO23456'), b'b\xdd\xad\xf3\xbe')
eq(base64.b32decode('MLO23456'), b'b\xdd\xad\xf3\xbe')
map_tests = {(b'M1023456', b'L'): b'b\xdd\xad\xf3\xbe',
(b'M1023456', b'I'): b'b\x1d\xad\xf3\xbe',
}
for (data, map01), res in map_tests.items():
data_str = data.decode('ascii')
map01_str = map01.decode('ascii')
eq(base64.b32decode(data, map01=map01), res)
eq(base64.b32decode(data_str, map01=map01), res)
eq(base64.b32decode(data, map01=map01_str), res)
eq(base64.b32decode(data_str, map01=map01_str), res)
self.assertRaises(binascii.Error, base64.b32decode, data)
self.assertRaises(binascii.Error, base64.b32decode, data_str)
def test_b32decode_error(self):
tests = [b'abc', b'ABCDEF==', b'==ABCDEF']
prefixes = [b'M', b'ME', b'MFRA', b'MFRGG', b'MFRGGZA', b'MFRGGZDF']
for i in range(0, 17):
if i:
tests.append(b'='*i)
for prefix in prefixes:
if len(prefix) + i != 8:
tests.append(prefix + b'='*i)
for data in tests:
with self.subTest(data=data):
with self.assertRaises(binascii.Error):
base64.b32decode(data)
with self.assertRaises(binascii.Error):
base64.b32decode(data.decode('ascii'))
def test_b16encode(self):
eq = self.assertEqual
eq(base64.b16encode(b'\x01\x02\xab\xcd\xef'), b'0102ABCDEF')
eq(base64.b16encode(b'\x00'), b'00')
# Non-bytes
self.check_other_types(base64.b16encode, b'\x01\x02\xab\xcd\xef',
b'0102ABCDEF')
self.check_encode_type_errors(base64.b16encode)
def test_b16decode(self):
eq = self.assertEqual
eq(base64.b16decode(b'0102ABCDEF'), b'\x01\x02\xab\xcd\xef')
eq(base64.b16decode('0102ABCDEF'), b'\x01\x02\xab\xcd\xef')
eq(base64.b16decode(b'00'), b'\x00')
eq(base64.b16decode('00'), b'\x00')
# Lower case is not allowed without a flag
self.assertRaises(binascii.Error, base64.b16decode, b'0102abcdef')
self.assertRaises(binascii.Error, base64.b16decode, '0102abcdef')
# Case fold
eq(base64.b16decode(b'0102abcdef', True), b'\x01\x02\xab\xcd\xef')
eq(base64.b16decode('0102abcdef', True), b'\x01\x02\xab\xcd\xef')
# Non-bytes
self.check_other_types(base64.b16decode, b"0102ABCDEF",
b'\x01\x02\xab\xcd\xef')
self.check_decode_type_errors(base64.b16decode)
eq(base64.b16decode(bytearray(b"0102abcdef"), True),
b'\x01\x02\xab\xcd\xef')
eq(base64.b16decode(memoryview(b"0102abcdef"), True),
b'\x01\x02\xab\xcd\xef')
eq(base64.b16decode(array('B', b"0102abcdef"), True),
b'\x01\x02\xab\xcd\xef')
# Non-alphabet characters
self.assertRaises(binascii.Error, base64.b16decode, '0102AG')
# Incorrect "padding"
self.assertRaises(binascii.Error, base64.b16decode, '010')
def test_a85encode(self):
eq = self.assertEqual
tests = {
b'': b'',
b"www.python.org": b'GB\\6`E-ZP=Df.1GEb>',
bytes(range(255)): b"""!!*-'"9eu7#RLhG$k3[W&.oNg'GVB"(`=52*$$"""
b"""(B+<_pR,UFcb-n-Vr/1iJ-0JP==1c70M3&s#]4?Ykm5X@_(6q'R884cE"""
b"""H9MJ8X:f1+h<)lt#=BSg3>[:ZC?t!MSA7]@cBPD3sCi+'.E,fo>FEMbN"""
b"""G^4U^I!pHnJ:W<)KS>/9Ll%"IN/`jYOHG]iPa.Q$R$jD4S=Q7DTV8*TU"""
b"""nsrdW2ZetXKAY/Yd(L?['d?O\\@K2_]Y2%o^qmn*`5Ta:aN;TJbg"GZd"""
b"""*^:jeCE.%f\\,!5gtgiEi8N\\UjQ5OekiqBum-X60nF?)@o_%qPq"ad`"""
b"""r;HT""",
b"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
b"0123456789!@#0^&*();:<>,. []{}":
b'@:E_WAS,RgBkhF"D/O92EH6,BF`qtRH$VbC6UX@47n?3D92&&T'
b":Jand;cHat='/U/0JP==1c70M3&r-I,;<FN.OZ`-3]oSW/g+A(H[P",
b"no padding..": b'DJpY:@:Wn_DJ(RS',
b"zero compression\0\0\0\0": b'H=_,8+Cf>,E,oN2F(oQ1z',
b"zero compression\0\0\0": b'H=_,8+Cf>,E,oN2F(oQ1!!!!',
b"Boundary:\0\0\0\0": b'6>q!aA79M(3WK-[!!',
b"Space compr: ": b';fH/TAKYK$D/aMV+<VdL',
b'\xff': b'rr',
b'\xff'*2: b's8N',
b'\xff'*3: b's8W*',
b'\xff'*4: b's8W-!',
}
for data, res in tests.items():
eq(base64.a85encode(data), res, data)
eq(base64.a85encode(data, adobe=False), res, data)
eq(base64.a85encode(data, adobe=True), b'<~' + res + b'~>', data)
self.check_other_types(base64.a85encode, b"www.python.org",
b'GB\\6`E-ZP=Df.1GEb>')
self.assertRaises(TypeError, base64.a85encode, "")
eq(base64.a85encode(b"www.python.org", wrapcol=7, adobe=False),
b'GB\\6`E-\nZP=Df.1\nGEb>')
eq(base64.a85encode(b"\0\0\0\0www.python.org", wrapcol=7, adobe=False),
b'zGB\\6`E\n-ZP=Df.\n1GEb>')
eq(base64.a85encode(b"www.python.org", wrapcol=7, adobe=True),
b'<~GB\\6`\nE-ZP=Df\n.1GEb>\n~>')
eq(base64.a85encode(b' '*8, foldspaces=True, adobe=False), b'yy')
eq(base64.a85encode(b' '*7, foldspaces=True, adobe=False), b'y+<Vd')
eq(base64.a85encode(b' '*6, foldspaces=True, adobe=False), b'y+<U')
eq(base64.a85encode(b' '*5, foldspaces=True, adobe=False), b'y+9')
def test_b85encode(self):
eq = self.assertEqual
tests = {
b'': b'',
b'www.python.org': b'cXxL#aCvlSZ*DGca%T',
bytes(range(255)): b"""009C61O)~M2nh-c3=Iws5D^j+6crX17#SKH9337X"""
b"""AR!_nBqb&%C@Cr{EG;fCFflSSG&MFiI5|2yJUu=?KtV!7L`6nNNJ&ad"""
b"""OifNtP*GA-R8>}2SXo+ITwPvYU}0ioWMyV&XlZI|Y;A6DaB*^Tbai%j"""
b"""czJqze0_d@fPsR8goTEOh>41ejE#<ukdcy;l$Dm3n3<ZJoSmMZprN9p"""
b"""q@|{(sHv)}tgWuEu(7hUw6(UkxVgH!yuH4^z`?@9#Kp$P$jQpf%+1cv"""
b"""(9zP<)YaD4*xB0K+}+;a;Njxq<mKk)=;`X~?CtLF@bU8V^!4`l`1$(#"""
b"""{Qdp""",
b"""abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"""
b"""0123456789!@#0^&*();:<>,. []{}""":
b"""VPa!sWoBn+X=-b1ZEkOHadLBXb#`}nd3r%YLqtVJM@UIZOH55pPf$@("""
b"""Q&d$}S6EqEFflSSG&MFiI5{CeBQRbjDkv#CIy^osE+AW7dwl""",
b'no padding..': b'Zf_uPVPs@!Zf7no',
b'zero compression\x00\x00\x00\x00': b'dS!BNAY*TBaB^jHb7^mG00000',
b'zero compression\x00\x00\x00': b'dS!BNAY*TBaB^jHb7^mG0000',
b"""Boundary:\x00\x00\x00\x00""": b"""LT`0$WMOi7IsgCw00""",
b'Space compr: ': b'Q*dEpWgug3ZE$irARr(h',
b'\xff': b'{{',
b'\xff'*2: b'|Nj',
b'\xff'*3: b'|Ns9',
b'\xff'*4: b'|NsC0',
}
for data, res in tests.items():
eq(base64.b85encode(data), res)
self.check_other_types(base64.b85encode, b"www.python.org",
b'cXxL#aCvlSZ*DGca%T')
def test_a85decode(self):
eq = self.assertEqual
tests = {
b'': b'',
b'GB\\6`E-ZP=Df.1GEb>': b'www.python.org',
b"""! ! * -'"\n\t\t9eu\r\n7# RL\vhG$k3[W&.oNg'GVB"(`=52*$$"""
b"""(B+<_pR,UFcb-n-Vr/1iJ-0JP==1c70M3&s#]4?Ykm5X@_(6q'R884cE"""
b"""H9MJ8X:f1+h<)lt#=BSg3>[:ZC?t!MSA7]@cBPD3sCi+'.E,fo>FEMbN"""
b"""G^4U^I!pHnJ:W<)KS>/9Ll%"IN/`jYOHG]iPa.Q$R$jD4S=Q7DTV8*TU"""
b"""nsrdW2ZetXKAY/Yd(L?['d?O\\@K2_]Y2%o^qmn*`5Ta:aN;TJbg"GZd"""
b"""*^:jeCE.%f\\,!5gtgiEi8N\\UjQ5OekiqBum-X60nF?)@o_%qPq"ad`"""
b"""r;HT""": bytes(range(255)),
b"""@:E_WAS,RgBkhF"D/O92EH6,BF`qtRH$VbC6UX@47n?3D92&&T:Jand;c"""
b"""Hat='/U/0JP==1c70M3&r-I,;<FN.OZ`-3]oSW/g+A(H[P""":
b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234'
b'56789!@#0^&*();:<>,. []{}',
b'DJpY:@:Wn_DJ(RS': b'no padding..',
b'H=_,8+Cf>,E,oN2F(oQ1z': b'zero compression\x00\x00\x00\x00',
b'H=_,8+Cf>,E,oN2F(oQ1!!!!': b'zero compression\x00\x00\x00',
b'6>q!aA79M(3WK-[!!': b"Boundary:\x00\x00\x00\x00",
b';fH/TAKYK$D/aMV+<VdL': b'Space compr: ',
b'rr': b'\xff',
b's8N': b'\xff'*2,
b's8W*': b'\xff'*3,
b's8W-!': b'\xff'*4,
}
for data, res in tests.items():
eq(base64.a85decode(data), res, data)
eq(base64.a85decode(data, adobe=False), res, data)
eq(base64.a85decode(data.decode("ascii"), adobe=False), res, data)
eq(base64.a85decode(b'<~' + data + b'~>', adobe=True), res, data)
eq(base64.a85decode(data + b'~>', adobe=True), res, data)
eq(base64.a85decode('<~%s~>' % data.decode("ascii"), adobe=True),
res, data)
eq(base64.a85decode(b'yy', foldspaces=True, adobe=False), b' '*8)
eq(base64.a85decode(b'y+<Vd', foldspaces=True, adobe=False), b' '*7)
eq(base64.a85decode(b'y+<U', foldspaces=True, adobe=False), b' '*6)
eq(base64.a85decode(b'y+9', foldspaces=True, adobe=False), b' '*5)
self.check_other_types(base64.a85decode, b'GB\\6`E-ZP=Df.1GEb>',
b"www.python.org")
def test_b85decode(self):
eq = self.assertEqual
tests = {
b'': b'',
b'cXxL#aCvlSZ*DGca%T': b'www.python.org',
b"""009C61O)~M2nh-c3=Iws5D^j+6crX17#SKH9337X"""
b"""AR!_nBqb&%C@Cr{EG;fCFflSSG&MFiI5|2yJUu=?KtV!7L`6nNNJ&ad"""
b"""OifNtP*GA-R8>}2SXo+ITwPvYU}0ioWMyV&XlZI|Y;A6DaB*^Tbai%j"""
b"""czJqze0_d@fPsR8goTEOh>41ejE#<ukdcy;l$Dm3n3<ZJoSmMZprN9p"""
b"""q@|{(sHv)}tgWuEu(7hUw6(UkxVgH!yuH4^z`?@9#Kp$P$jQpf%+1cv"""
b"""(9zP<)YaD4*xB0K+}+;a;Njxq<mKk)=;`X~?CtLF@bU8V^!4`l`1$(#"""
b"""{Qdp""": bytes(range(255)),
b"""VPa!sWoBn+X=-b1ZEkOHadLBXb#`}nd3r%YLqtVJM@UIZOH55pPf$@("""
b"""Q&d$}S6EqEFflSSG&MFiI5{CeBQRbjDkv#CIy^osE+AW7dwl""":
b"""abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"""
b"""0123456789!@#0^&*();:<>,. []{}""",
b'Zf_uPVPs@!Zf7no': b'no padding..',
b'dS!BNAY*TBaB^jHb7^mG00000': b'zero compression\x00\x00\x00\x00',
b'dS!BNAY*TBaB^jHb7^mG0000': b'zero compression\x00\x00\x00',
b"""LT`0$WMOi7IsgCw00""": b"""Boundary:\x00\x00\x00\x00""",
b'Q*dEpWgug3ZE$irARr(h': b'Space compr: ',
b'{{': b'\xff',
b'|Nj': b'\xff'*2,
b'|Ns9': b'\xff'*3,
b'|NsC0': b'\xff'*4,
}
for data, res in tests.items():
eq(base64.b85decode(data), res)
eq(base64.b85decode(data.decode("ascii")), res)
self.check_other_types(base64.b85decode, b'cXxL#aCvlSZ*DGca%T',
b"www.python.org")
def test_a85_padding(self):
eq = self.assertEqual
eq(base64.a85encode(b"x", pad=True), b'GQ7^D')
eq(base64.a85encode(b"xx", pad=True), b"G^'2g")
eq(base64.a85encode(b"xxx", pad=True), b'G^+H5')
eq(base64.a85encode(b"xxxx", pad=True), b'G^+IX')
eq(base64.a85encode(b"xxxxx", pad=True), b'G^+IXGQ7^D')
eq(base64.a85decode(b'GQ7^D'), b"x\x00\x00\x00")
eq(base64.a85decode(b"G^'2g"), b"xx\x00\x00")
eq(base64.a85decode(b'G^+H5'), b"xxx\x00")
eq(base64.a85decode(b'G^+IX'), b"xxxx")
eq(base64.a85decode(b'G^+IXGQ7^D'), b"xxxxx\x00\x00\x00")
def test_b85_padding(self):
eq = self.assertEqual
eq(base64.b85encode(b"x", pad=True), b'cmMzZ')
eq(base64.b85encode(b"xx", pad=True), b'cz6H+')
eq(base64.b85encode(b"xxx", pad=True), b'czAdK')
eq(base64.b85encode(b"xxxx", pad=True), b'czAet')
eq(base64.b85encode(b"xxxxx", pad=True), b'czAetcmMzZ')
eq(base64.b85decode(b'cmMzZ'), b"x\x00\x00\x00")
eq(base64.b85decode(b'cz6H+'), b"xx\x00\x00")
eq(base64.b85decode(b'czAdK'), b"xxx\x00")
eq(base64.b85decode(b'czAet'), b"xxxx")
eq(base64.b85decode(b'czAetcmMzZ'), b"xxxxx\x00\x00\x00")
def test_a85decode_errors(self):
illegal = (set(range(32)) | set(range(118, 256))) - set(b' \t\n\r\v')
for c in illegal:
with self.assertRaises(ValueError, msg=bytes([c])):
base64.a85decode(b'!!!!' + bytes([c]))
with self.assertRaises(ValueError, msg=bytes([c])):
base64.a85decode(b'!!!!' + bytes([c]), adobe=False)
with self.assertRaises(ValueError, msg=bytes([c])):
base64.a85decode(b'<~!!!!' + bytes([c]) + b'~>', adobe=True)
self.assertRaises(ValueError, base64.a85decode,
b"malformed", adobe=True)
self.assertRaises(ValueError, base64.a85decode,
b"<~still malformed", adobe=True)
# With adobe=False (the default), Adobe framing markers are disallowed
self.assertRaises(ValueError, base64.a85decode,
b"<~~>")
self.assertRaises(ValueError, base64.a85decode,
b"<~~>", adobe=False)
base64.a85decode(b"<~~>", adobe=True) # sanity check
self.assertRaises(ValueError, base64.a85decode,
b"abcx", adobe=False)
self.assertRaises(ValueError, base64.a85decode,
b"abcdey", adobe=False)
self.assertRaises(ValueError, base64.a85decode,
b"a b\nc", adobe=False, ignorechars=b"")
self.assertRaises(ValueError, base64.a85decode, b's', adobe=False)
self.assertRaises(ValueError, base64.a85decode, b's8', adobe=False)
self.assertRaises(ValueError, base64.a85decode, b's8W', adobe=False)
self.assertRaises(ValueError, base64.a85decode, b's8W-', adobe=False)
self.assertRaises(ValueError, base64.a85decode, b's8W-"', adobe=False)
def test_b85decode_errors(self):
illegal = list(range(33)) + \
list(b'"\',./:[\\]') + \
list(range(128, 256))
for c in illegal:
with self.assertRaises(ValueError, msg=bytes([c])):
base64.b85decode(b'0000' + bytes([c]))
self.assertRaises(ValueError, base64.b85decode, b'|')
self.assertRaises(ValueError, base64.b85decode, b'|N')
self.assertRaises(ValueError, base64.b85decode, b'|Ns')
self.assertRaises(ValueError, base64.b85decode, b'|NsC')
self.assertRaises(ValueError, base64.b85decode, b'|NsC1')
def test_decode_nonascii_str(self):
decode_funcs = (base64.b64decode,
base64.standard_b64decode,
base64.urlsafe_b64decode,
base64.b32decode,
base64.b16decode,
base64.b85decode,
base64.a85decode)
for f in decode_funcs:
self.assertRaises(ValueError, f, 'with non-ascii \xcb')
def test_ErrorHeritage(self):
self.assertTrue(issubclass(binascii.Error, ValueError))
if __name__ == '__main__':
unittest.main()
| 29,650 | 657 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_sundry.py | """Do a minimal test of all the modules that aren't otherwise tested."""
import importlib
import sys
from test import support
import unittest
class TestUntestedModules(unittest.TestCase):
def test_untested_modules_can_be_imported(self):
untested = ('encodings', 'formatter', 'nturl2path', 'tabnanny')
with support.check_warnings(quiet=True):
for name in untested:
try:
support.import_module('test.test_{}'.format(name))
except unittest.SkipTest:
importlib.import_module(name)
else:
self.fail('{} has tests even though test_sundry claims '
'otherwise'.format(name))
import distutils.bcppcompiler
import distutils.ccompiler
import distutils.cygwinccompiler
import distutils.filelist
import distutils.text_file
import distutils.unixccompiler
import distutils.command.bdist_dumb
if sys.platform.startswith('win'):
import distutils.command.bdist_msi
import distutils.command.bdist
import distutils.command.bdist_rpm
import distutils.command.bdist_wininst
import distutils.command.build_clib
import distutils.command.build_ext
import distutils.command.build
import distutils.command.clean
import distutils.command.config
import distutils.command.install_data
import distutils.command.install_egg_info
import distutils.command.install_headers
import distutils.command.install_lib
import distutils.command.register
import distutils.command.sdist
import distutils.command.upload
import html.entities
try:
import tty # Not available on Windows
except ImportError:
if support.verbose:
print("skipping tty")
if __name__ == "__main__":
unittest.main()
| 2,101 | 57 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_defaultdict.py | """Unit tests for collections.defaultdict."""
import os
import copy
import pickle
import tempfile
import unittest
from collections import defaultdict
def foobar():
return list
class TestDefaultDict(unittest.TestCase):
def test_basic(self):
d1 = defaultdict()
self.assertEqual(d1.default_factory, None)
d1.default_factory = list
d1[12].append(42)
self.assertEqual(d1, {12: [42]})
d1[12].append(24)
self.assertEqual(d1, {12: [42, 24]})
d1[13]
d1[14]
self.assertEqual(d1, {12: [42, 24], 13: [], 14: []})
self.assertTrue(d1[12] is not d1[13] is not d1[14])
d2 = defaultdict(list, foo=1, bar=2)
self.assertEqual(d2.default_factory, list)
self.assertEqual(d2, {"foo": 1, "bar": 2})
self.assertEqual(d2["foo"], 1)
self.assertEqual(d2["bar"], 2)
self.assertEqual(d2[42], [])
self.assertIn("foo", d2)
self.assertIn("foo", d2.keys())
self.assertIn("bar", d2)
self.assertIn("bar", d2.keys())
self.assertIn(42, d2)
self.assertIn(42, d2.keys())
self.assertNotIn(12, d2)
self.assertNotIn(12, d2.keys())
d2.default_factory = None
self.assertEqual(d2.default_factory, None)
try:
d2[15]
except KeyError as err:
self.assertEqual(err.args, (15,))
else:
self.fail("d2[15] didn't raise KeyError")
self.assertRaises(TypeError, defaultdict, 1)
def test_missing(self):
d1 = defaultdict()
self.assertRaises(KeyError, d1.__missing__, 42)
d1.default_factory = list
self.assertEqual(d1.__missing__(42), [])
def test_repr(self):
d1 = defaultdict()
self.assertEqual(d1.default_factory, None)
self.assertEqual(repr(d1), "defaultdict(None, {})")
self.assertEqual(eval(repr(d1)), d1)
d1[11] = 41
self.assertEqual(repr(d1), "defaultdict(None, {11: 41})")
d2 = defaultdict(int)
self.assertEqual(d2.default_factory, int)
d2[12] = 42
self.assertEqual(repr(d2), "defaultdict(<class 'int'>, {12: 42})")
def foo(): return 43
d3 = defaultdict(foo)
self.assertTrue(d3.default_factory is foo)
d3[13]
self.assertEqual(repr(d3), "defaultdict(%s, {13: 43})" % repr(foo))
def test_print(self):
d1 = defaultdict()
def foo(): return 42
d2 = defaultdict(foo, {1: 2})
# NOTE: We can't use tempfile.[Named]TemporaryFile since this
# code must exercise the tp_print C code, which only gets
# invoked for *real* files.
tfn = tempfile.mktemp()
try:
f = open(tfn, "w+")
try:
print(d1, file=f)
print(d2, file=f)
f.seek(0)
self.assertEqual(f.readline(), repr(d1) + "\n")
self.assertEqual(f.readline(), repr(d2) + "\n")
finally:
f.close()
finally:
os.remove(tfn)
def test_copy(self):
d1 = defaultdict()
d2 = d1.copy()
self.assertEqual(type(d2), defaultdict)
self.assertEqual(d2.default_factory, None)
self.assertEqual(d2, {})
d1.default_factory = list
d3 = d1.copy()
self.assertEqual(type(d3), defaultdict)
self.assertEqual(d3.default_factory, list)
self.assertEqual(d3, {})
d1[42]
d4 = d1.copy()
self.assertEqual(type(d4), defaultdict)
self.assertEqual(d4.default_factory, list)
self.assertEqual(d4, {42: []})
d4[12]
self.assertEqual(d4, {42: [], 12: []})
# Issue 6637: Copy fails for empty default dict
d = defaultdict()
d['a'] = 42
e = d.copy()
self.assertEqual(e['a'], 42)
def test_shallow_copy(self):
d1 = defaultdict(foobar, {1: 1})
d2 = copy.copy(d1)
self.assertEqual(d2.default_factory, foobar)
self.assertEqual(d2, d1)
d1.default_factory = list
d2 = copy.copy(d1)
self.assertEqual(d2.default_factory, list)
self.assertEqual(d2, d1)
def test_deep_copy(self):
d1 = defaultdict(foobar, {1: [1]})
d2 = copy.deepcopy(d1)
self.assertEqual(d2.default_factory, foobar)
self.assertEqual(d2, d1)
self.assertTrue(d1[1] is not d2[1])
d1.default_factory = list
d2 = copy.deepcopy(d1)
self.assertEqual(d2.default_factory, list)
self.assertEqual(d2, d1)
def test_keyerror_without_factory(self):
d1 = defaultdict()
try:
d1[(1,)]
except KeyError as err:
self.assertEqual(err.args[0], (1,))
else:
self.fail("expected KeyError")
def test_recursive_repr(self):
# Issue2045: stack overflow when default_factory is a bound method
class sub(defaultdict):
def __init__(self):
self.default_factory = self._factory
def _factory(self):
return []
d = sub()
self.assertRegex(repr(d),
r"defaultdict\(<bound method .*sub\._factory "
r"of defaultdict\(\.\.\., \{\}\)>, \{\}\)")
# NOTE: printing a subclass of a builtin type does not call its
# tp_print slot. So this part is essentially the same test as above.
tfn = tempfile.mktemp()
try:
f = open(tfn, "w+")
try:
print(d, file=f)
finally:
f.close()
finally:
os.remove(tfn)
def test_callable_arg(self):
self.assertRaises(TypeError, defaultdict, {})
def test_pickling(self):
d = defaultdict(int)
d[1]
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
s = pickle.dumps(d, proto)
o = pickle.loads(s)
self.assertEqual(d, o)
if __name__ == "__main__":
unittest.main()
| 6,033 | 188 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_aifc.py | from test.support import check_no_resource_warning, findfile, TESTFN, unlink
import unittest
from unittest import mock
from test import audiotests
from audioop import byteswap
import io
import sys
import struct
import aifc
class AifcTest(audiotests.AudioWriteTests,
audiotests.AudioTestsWithSourceFile):
module = aifc
close_fd = True
test_unseekable_read = None
class AifcPCM8Test(AifcTest, unittest.TestCase):
sndfilename = 'pluck-pcm8.aiff'
sndfilenframes = 3307
nchannels = 2
sampwidth = 1
framerate = 11025
nframes = 48
comptype = b'NONE'
compname = b'not compressed'
frames = bytes.fromhex("""\
02FF 4B00 3104 8008 CB06 4803 BF01 03FE B8FA B4F3 29EB 1AE6 \
EDE4 C6E2 0EE0 EFE0 57E2 FBE8 13EF D8F7 97FB F5FC 08FB DFFB \
11FA 3EFB BCFC 66FF CF04 4309 C10E 5112 EE17 8216 7F14 8012 \
490E 520D EF0F CE0F E40C 630A 080A 2B0B 510E 8B11 B60E 440A \
""")
class AifcPCM16Test(AifcTest, unittest.TestCase):
sndfilename = 'pluck-pcm16.aiff'
sndfilenframes = 3307
nchannels = 2
sampwidth = 2
framerate = 11025
nframes = 48
comptype = b'NONE'
compname = b'not compressed'
frames = bytes.fromhex("""\
022EFFEA 4B5D00F6 311804EA 80E10840 CBE106B1 48A903F5 BFE601B2 036CFE7B \
B858FA3E B4B1F34F 299AEBCA 1A5DE6DA EDFAE491 C628E275 0E09E0B5 EF2AE029 \
5758E271 FB35E83F 1376EF86 D82BF727 9790FB76 F5FAFC0F 0867FB9C DF30FB43 \
117EFA36 3EE5FB5B BC79FCB1 66D9FF5D CF150412 431D097C C1BA0EC8 512112A1 \
EEE21753 82071665 7FFF1443 8004128F 49A20EAF 52BB0DBA EFB40F60 CE3C0FBF \
E4B30CEC 63430A5C 08C80A20 2BBB0B08 514A0E43 8BCF1139 B6F60EEB 44120A5E \
""")
class AifcPCM24Test(AifcTest, unittest.TestCase):
sndfilename = 'pluck-pcm24.aiff'
sndfilenframes = 3307
nchannels = 2
sampwidth = 3
framerate = 11025
nframes = 48
comptype = b'NONE'
compname = b'not compressed'
frames = bytes.fromhex("""\
022D65FFEB9D 4B5A0F00FA54 3113C304EE2B 80DCD6084303 \
CBDEC006B261 48A99803F2F8 BFE82401B07D 036BFBFE7B5D \
B85756FA3EC9 B4B055F3502B 299830EBCB62 1A5CA7E6D99A \
EDFA3EE491BD C625EBE27884 0E05A9E0B6CF EF2929E02922 \
5758D8E27067 FB3557E83E16 1377BFEF8402 D82C5BF7272A \
978F16FB7745 F5F865FC1013 086635FB9C4E DF30FCFB40EE \
117FE0FA3438 3EE6B8FB5AC3 BC77A3FCB2F4 66D6DAFF5F32 \
CF13B9041275 431D69097A8C C1BB600EC74E 5120B912A2BA \
EEDF641754C0 8207001664B7 7FFFFF14453F 8000001294E6 \
499C1B0EB3B2 52B73E0DBCA0 EFB2B20F5FD8 CE3CDB0FBE12 \
E4B49C0CEA2D 6344A80A5A7C 08C8FE0A1FFE 2BB9860B0A0E \
51486F0E44E1 8BCC64113B05 B6F4EC0EEB36 4413170A5B48 \
""")
class AifcPCM32Test(AifcTest, unittest.TestCase):
sndfilename = 'pluck-pcm32.aiff'
sndfilenframes = 3307
nchannels = 2
sampwidth = 4
framerate = 11025
nframes = 48
comptype = b'NONE'
compname = b'not compressed'
frames = bytes.fromhex("""\
022D65BCFFEB9D92 4B5A0F8000FA549C 3113C34004EE2BC0 80DCD680084303E0 \
CBDEC0C006B26140 48A9980003F2F8FC BFE8248001B07D92 036BFB60FE7B5D34 \
B8575600FA3EC920 B4B05500F3502BC0 29983000EBCB6240 1A5CA7A0E6D99A60 \
EDFA3E80E491BD40 C625EB80E27884A0 0E05A9A0E0B6CFE0 EF292940E0292280 \
5758D800E2706700 FB3557D8E83E1640 1377BF00EF840280 D82C5B80F7272A80 \
978F1600FB774560 F5F86510FC101364 086635A0FB9C4E20 DF30FC40FB40EE28 \
117FE0A0FA3438B0 3EE6B840FB5AC3F0 BC77A380FCB2F454 66D6DA80FF5F32B4 \
CF13B980041275B0 431D6980097A8C00 C1BB60000EC74E00 5120B98012A2BAA0 \
EEDF64C01754C060 820700001664B780 7FFFFFFF14453F40 800000001294E6E0 \
499C1B000EB3B270 52B73E000DBCA020 EFB2B2E00F5FD880 CE3CDB400FBE1270 \
E4B49CC00CEA2D90 6344A8800A5A7CA0 08C8FE800A1FFEE0 2BB986C00B0A0E00 \
51486F800E44E190 8BCC6480113B0580 B6F4EC000EEB3630 441317800A5B48A0 \
""")
class AifcULAWTest(AifcTest, unittest.TestCase):
sndfilename = 'pluck-ulaw.aifc'
sndfilenframes = 3307
nchannels = 2
sampwidth = 2
framerate = 11025
nframes = 48
comptype = b'ulaw'
compname = b''
frames = bytes.fromhex("""\
022CFFE8 497C0104 307C04DC 8284083C CB84069C 497C03DC BE8401AC 036CFE74 \
B684FA24 B684F344 2A7CEC04 19FCE704 EE04E504 C584E204 0E3CE104 EF04DF84 \
557CE204 FB24E804 12FCEF04 D784F744 9684FB64 F5C4FC24 083CFBA4 DF84FB24 \
11FCFA24 3E7CFB64 BA84FCB4 657CFF5C CF84041C 417C093C C1840EBC 517C12FC \
EF0416FC 828415FC 7D7C13FC 828412FC 497C0EBC 517C0DBC F0040F3C CD840FFC \
E5040CBC 617C0A3C 08BC0A3C 2C7C0B3C 517C0E3C 8A8410FC B6840EBC 457C0A3C \
""")
if sys.byteorder != 'big':
frames = byteswap(frames, 2)
class AifcALAWTest(AifcTest, unittest.TestCase):
sndfilename = 'pluck-alaw.aifc'
sndfilenframes = 3307
nchannels = 2
sampwidth = 2
framerate = 11025
nframes = 48
comptype = b'alaw'
compname = b''
frames = bytes.fromhex("""\
0230FFE8 4A0000F8 310004E0 82000840 CB0006A0 4A0003F0 BE0001A8 0370FE78 \
BA00FA20 B600F340 2900EB80 1A80E680 ED80E480 C700E280 0E40E080 EF80E080 \
5600E280 FB20E880 1380EF80 D900F740 9600FB60 F5C0FC10 0840FBA0 DF00FB20 \
1180FA20 3F00FB60 BE00FCB0 6600FF58 CF000420 42000940 C1000EC0 52001280 \
EE801780 82001680 7E001480 82001280 4A000EC0 52000DC0 EF800F40 CF000FC0 \
E4800CC0 62000A40 08C00A40 2B000B40 52000E40 8A001180 B6000EC0 46000A40 \
""")
if sys.byteorder != 'big':
frames = byteswap(frames, 2)
class AifcMiscTest(audiotests.AudioTests, unittest.TestCase):
def test_skipunknown(self):
#Issue 2245
#This file contains chunk types aifc doesn't recognize.
self.f = aifc.open('/zip/.python/test/Sine-1000Hz-300ms.aif')
def test_close_opened_files_on_error(self):
non_aifc_file = findfile('pluck-pcm8.wav', subdir='audiodata')
with check_no_resource_warning(self):
with self.assertRaises(aifc.Error):
# Try opening a non-AIFC file, with the expectation that
# `aifc.open` will fail (without raising a ResourceWarning)
self.f = aifc.open(non_aifc_file, 'rb')
# Aifc_write.initfp() won't raise in normal case. But some errors
# (e.g. MemoryError, KeyboardInterrupt, etc..) can happen.
with mock.patch.object(aifc.Aifc_write, 'initfp',
side_effect=RuntimeError):
with self.assertRaises(RuntimeError):
self.fout = aifc.open(TESTFN, 'wb')
def test_params_added(self):
f = self.f = aifc.open(TESTFN, 'wb')
f.aiff()
f.setparams((1, 1, 1, 1, b'NONE', b''))
f.close()
f = self.f = aifc.open(TESTFN, 'rb')
params = f.getparams()
self.assertEqual(params.nchannels, f.getnchannels())
self.assertEqual(params.sampwidth, f.getsampwidth())
self.assertEqual(params.framerate, f.getframerate())
self.assertEqual(params.nframes, f.getnframes())
self.assertEqual(params.comptype, f.getcomptype())
self.assertEqual(params.compname, f.getcompname())
def test_write_header_comptype_sampwidth(self):
for comptype in (b'ULAW', b'ulaw', b'ALAW', b'alaw', b'G722'):
fout = aifc.open(io.BytesIO(), 'wb')
fout.setnchannels(1)
fout.setframerate(1)
fout.setcomptype(comptype, b'')
fout.close()
self.assertEqual(fout.getsampwidth(), 2)
fout.initfp(None)
def test_write_markers_values(self):
fout = aifc.open(io.BytesIO(), 'wb')
self.assertEqual(fout.getmarkers(), None)
fout.setmark(1, 0, b'foo1')
fout.setmark(1, 1, b'foo2')
self.assertEqual(fout.getmark(1), (1, 1, b'foo2'))
self.assertEqual(fout.getmarkers(), [(1, 1, b'foo2')])
fout.initfp(None)
def test_read_markers(self):
fout = self.fout = aifc.open(TESTFN, 'wb')
fout.aiff()
fout.setparams((1, 1, 1, 1, b'NONE', b''))
fout.setmark(1, 0, b'odd')
fout.setmark(2, 0, b'even')
fout.writeframes(b'\x00')
fout.close()
f = self.f = aifc.open(TESTFN, 'rb')
self.assertEqual(f.getmarkers(), [(1, 0, b'odd'), (2, 0, b'even')])
self.assertEqual(f.getmark(1), (1, 0, b'odd'))
self.assertEqual(f.getmark(2), (2, 0, b'even'))
self.assertRaises(aifc.Error, f.getmark, 3)
class AIFCLowLevelTest(unittest.TestCase):
def test_read_written(self):
def read_written(self, what):
f = io.BytesIO()
getattr(aifc, '_write_' + what)(f, x)
f.seek(0)
return getattr(aifc, '_read_' + what)(f)
for x in (-1, 0, 0.1, 1):
self.assertEqual(read_written(x, 'float'), x)
for x in (float('NaN'), float('Inf')):
self.assertEqual(read_written(x, 'float'), aifc._HUGE_VAL)
for x in (b'', b'foo', b'a' * 255):
self.assertEqual(read_written(x, 'string'), x)
for x in (-0x7FFFFFFF, -1, 0, 1, 0x7FFFFFFF):
self.assertEqual(read_written(x, 'long'), x)
for x in (0, 1, 0xFFFFFFFF):
self.assertEqual(read_written(x, 'ulong'), x)
for x in (-0x7FFF, -1, 0, 1, 0x7FFF):
self.assertEqual(read_written(x, 'short'), x)
for x in (0, 1, 0xFFFF):
self.assertEqual(read_written(x, 'ushort'), x)
def test_read_raises(self):
f = io.BytesIO(b'\x00')
self.assertRaises(EOFError, aifc._read_ulong, f)
self.assertRaises(EOFError, aifc._read_long, f)
self.assertRaises(EOFError, aifc._read_ushort, f)
self.assertRaises(EOFError, aifc._read_short, f)
def test_write_long_string_raises(self):
f = io.BytesIO()
with self.assertRaises(ValueError):
aifc._write_string(f, b'too long' * 255)
def test_wrong_open_mode(self):
with self.assertRaises(aifc.Error):
aifc.open(TESTFN, 'wrong_mode')
def test_read_wrong_form(self):
b1 = io.BytesIO(b'WRNG' + struct.pack('>L', 0))
b2 = io.BytesIO(b'FORM' + struct.pack('>L', 4) + b'WRNG')
self.assertRaises(aifc.Error, aifc.open, b1)
self.assertRaises(aifc.Error, aifc.open, b2)
def test_read_no_comm_chunk(self):
b = io.BytesIO(b'FORM' + struct.pack('>L', 4) + b'AIFF')
self.assertRaises(aifc.Error, aifc.open, b)
def test_read_no_ssnd_chunk(self):
b = b'FORM' + struct.pack('>L', 4) + b'AIFC'
b += b'COMM' + struct.pack('>LhlhhLL', 38, 0, 0, 0, 0, 0, 0)
b += b'NONE' + struct.pack('B', 14) + b'not compressed' + b'\x00'
with self.assertRaisesRegex(aifc.Error, 'COMM chunk and/or SSND chunk'
' missing'):
aifc.open(io.BytesIO(b))
def test_read_wrong_compression_type(self):
b = b'FORM' + struct.pack('>L', 4) + b'AIFC'
b += b'COMM' + struct.pack('>LhlhhLL', 23, 0, 0, 0, 0, 0, 0)
b += b'WRNG' + struct.pack('B', 0)
self.assertRaises(aifc.Error, aifc.open, io.BytesIO(b))
def test_read_wrong_marks(self):
b = b'FORM' + struct.pack('>L', 4) + b'AIFF'
b += b'COMM' + struct.pack('>LhlhhLL', 18, 0, 0, 0, 0, 0, 0)
b += b'SSND' + struct.pack('>L', 8) + b'\x00' * 8
b += b'MARK' + struct.pack('>LhB', 3, 1, 1)
with self.assertWarns(UserWarning) as cm:
f = aifc.open(io.BytesIO(b))
self.assertEqual(str(cm.warning), 'Warning: MARK chunk contains '
'only 0 markers instead of 1')
self.assertEqual(f.getmarkers(), None)
def test_read_comm_kludge_compname_even(self):
b = b'FORM' + struct.pack('>L', 4) + b'AIFC'
b += b'COMM' + struct.pack('>LhlhhLL', 18, 0, 0, 0, 0, 0, 0)
b += b'NONE' + struct.pack('B', 4) + b'even' + b'\x00'
b += b'SSND' + struct.pack('>L', 8) + b'\x00' * 8
with self.assertWarns(UserWarning) as cm:
f = aifc.open(io.BytesIO(b))
self.assertEqual(str(cm.warning), 'Warning: bad COMM chunk size')
self.assertEqual(f.getcompname(), b'even')
def test_read_comm_kludge_compname_odd(self):
b = b'FORM' + struct.pack('>L', 4) + b'AIFC'
b += b'COMM' + struct.pack('>LhlhhLL', 18, 0, 0, 0, 0, 0, 0)
b += b'NONE' + struct.pack('B', 3) + b'odd'
b += b'SSND' + struct.pack('>L', 8) + b'\x00' * 8
with self.assertWarns(UserWarning) as cm:
f = aifc.open(io.BytesIO(b))
self.assertEqual(str(cm.warning), 'Warning: bad COMM chunk size')
self.assertEqual(f.getcompname(), b'odd')
def test_write_params_raises(self):
fout = aifc.open(io.BytesIO(), 'wb')
wrong_params = (0, 0, 0, 0, b'WRNG', '')
self.assertRaises(aifc.Error, fout.setparams, wrong_params)
self.assertRaises(aifc.Error, fout.getparams)
self.assertRaises(aifc.Error, fout.setnchannels, 0)
self.assertRaises(aifc.Error, fout.getnchannels)
self.assertRaises(aifc.Error, fout.setsampwidth, 0)
self.assertRaises(aifc.Error, fout.getsampwidth)
self.assertRaises(aifc.Error, fout.setframerate, 0)
self.assertRaises(aifc.Error, fout.getframerate)
self.assertRaises(aifc.Error, fout.setcomptype, b'WRNG', '')
fout.aiff()
fout.setnchannels(1)
fout.setsampwidth(1)
fout.setframerate(1)
fout.setnframes(1)
fout.writeframes(b'\x00')
self.assertRaises(aifc.Error, fout.setparams, (1, 1, 1, 1, 1, 1))
self.assertRaises(aifc.Error, fout.setnchannels, 1)
self.assertRaises(aifc.Error, fout.setsampwidth, 1)
self.assertRaises(aifc.Error, fout.setframerate, 1)
self.assertRaises(aifc.Error, fout.setnframes, 1)
self.assertRaises(aifc.Error, fout.setcomptype, b'NONE', '')
self.assertRaises(aifc.Error, fout.aiff)
self.assertRaises(aifc.Error, fout.aifc)
def test_write_params_singles(self):
fout = aifc.open(io.BytesIO(), 'wb')
fout.aifc()
fout.setnchannels(1)
fout.setsampwidth(2)
fout.setframerate(3)
fout.setnframes(4)
fout.setcomptype(b'NONE', b'name')
self.assertEqual(fout.getnchannels(), 1)
self.assertEqual(fout.getsampwidth(), 2)
self.assertEqual(fout.getframerate(), 3)
self.assertEqual(fout.getnframes(), 0)
self.assertEqual(fout.tell(), 0)
self.assertEqual(fout.getcomptype(), b'NONE')
self.assertEqual(fout.getcompname(), b'name')
fout.writeframes(b'\x00' * 4 * fout.getsampwidth() * fout.getnchannels())
self.assertEqual(fout.getnframes(), 4)
self.assertEqual(fout.tell(), 4)
def test_write_params_bunch(self):
fout = aifc.open(io.BytesIO(), 'wb')
fout.aifc()
p = (1, 2, 3, 4, b'NONE', b'name')
fout.setparams(p)
self.assertEqual(fout.getparams(), p)
fout.initfp(None)
def test_write_header_raises(self):
fout = aifc.open(io.BytesIO(), 'wb')
self.assertRaises(aifc.Error, fout.close)
fout = aifc.open(io.BytesIO(), 'wb')
fout.setnchannels(1)
self.assertRaises(aifc.Error, fout.close)
fout = aifc.open(io.BytesIO(), 'wb')
fout.setnchannels(1)
fout.setsampwidth(1)
self.assertRaises(aifc.Error, fout.close)
def test_write_header_comptype_raises(self):
for comptype in (b'ULAW', b'ulaw', b'ALAW', b'alaw', b'G722'):
fout = aifc.open(io.BytesIO(), 'wb')
fout.setsampwidth(1)
fout.setcomptype(comptype, b'')
self.assertRaises(aifc.Error, fout.close)
fout.initfp(None)
def test_write_markers_raises(self):
fout = aifc.open(io.BytesIO(), 'wb')
self.assertRaises(aifc.Error, fout.setmark, 0, 0, b'')
self.assertRaises(aifc.Error, fout.setmark, 1, -1, b'')
self.assertRaises(aifc.Error, fout.setmark, 1, 0, None)
self.assertRaises(aifc.Error, fout.getmark, 1)
fout.initfp(None)
def test_write_aiff_by_extension(self):
sampwidth = 2
filename = TESTFN + '.aiff'
fout = self.fout = aifc.open(filename, 'wb')
self.addCleanup(unlink, filename)
fout.setparams((1, sampwidth, 1, 1, b'ULAW', b''))
frames = b'\x00' * fout.getnchannels() * sampwidth
fout.writeframes(frames)
fout.close()
f = self.f = aifc.open(filename, 'rb')
self.assertEqual(f.getcomptype(), b'NONE')
f.close()
if __name__ == "__main__":
unittest.main()
| 16,770 | 408 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_codecmaps_kr.py | #
# test_codecmaps_kr.py
# Codec mapping tests for ROK encodings
#
from test import multibytecodec_support
import unittest
class TestCP949Map(multibytecodec_support.TestBase_Mapping,
unittest.TestCase):
encoding = 'cp949'
mapfileurl = '/zip/.python/test/CP949.TXT'
class TestEUCKRMap(multibytecodec_support.TestBase_Mapping,
unittest.TestCase):
encoding = 'euc_kr'
mapfileurl = '/zip/.python/test/EUC-KR.TXT'
# A4D4 HANGUL FILLER indicates the begin of 8-bytes make-up sequence.
pass_enctest = [(b'\xa4\xd4', '\u3164')]
pass_dectest = [(b'\xa4\xd4', '\u3164')]
class TestJOHABMap(multibytecodec_support.TestBase_Mapping,
unittest.TestCase):
encoding = 'johab'
mapfileurl = '/zip/.python/test/JOHAB.TXT'
# KS X 1001 standard assigned 0x5c as WON SIGN.
# but, in early 90s that is the only era used johab widely,
# the most softwares implements it as REVERSE SOLIDUS.
# So, we ignore the standard here.
pass_enctest = [(b'\\', '\u20a9')]
pass_dectest = [(b'\\', '\u20a9')]
if __name__ == "__main__":
unittest.main()
| 1,143 | 36 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_sys_settrace.py | # Testing the line trace facility.
from test import support
import unittest
import sys
import difflib
import gc
from functools import wraps
class tracecontext:
"""Context manager that traces its enter and exit."""
def __init__(self, output, value):
self.output = output
self.value = value
def __enter__(self):
self.output.append(self.value)
def __exit__(self, *exc_info):
self.output.append(-self.value)
class asynctracecontext:
"""Asynchronous context manager that traces its aenter and aexit."""
def __init__(self, output, value):
self.output = output
self.value = value
async def __aenter__(self):
self.output.append(self.value)
async def __aexit__(self, *exc_info):
self.output.append(-self.value)
async def asynciter(iterable):
"""Convert an iterable to an asynchronous iterator."""
for x in iterable:
yield x
def asyncio_run(main):
import asyncio
import asyncio.events
import asyncio.coroutines
assert asyncio.events._get_running_loop() is None
assert asyncio.coroutines.iscoroutine(main)
loop = asyncio.events.new_event_loop()
try:
asyncio.events.set_event_loop(loop)
return loop.run_until_complete(main)
finally:
try:
loop.run_until_complete(loop.shutdown_asyncgens())
finally:
asyncio.events.set_event_loop(None)
loop.close()
# A very basic example. If this fails, we're in deep trouble.
def basic():
return 1
basic.events = [(0, 'call'),
(1, 'line'),
(1, 'return')]
# Many of the tests below are tricky because they involve pass statements.
# If there is implicit control flow around a pass statement (in an except
# clause or else clause) under what conditions do you set a line number
# following that clause?
# The entire "while 0:" statement is optimized away. No code
# exists for it, so the line numbers skip directly from "del x"
# to "x = 1".
def arigo_example():
x = 1
del x
while 0:
pass
x = 1
arigo_example.events = [(0, 'call'),
(1, 'line'),
(2, 'line'),
(5, 'line'),
(5, 'return')]
# check that lines consisting of just one instruction get traced:
def one_instr_line():
x = 1
del x
x = 1
one_instr_line.events = [(0, 'call'),
(1, 'line'),
(2, 'line'),
(3, 'line'),
(3, 'return')]
def no_pop_tops(): # 0
x = 1 # 1
for a in range(2): # 2
if a: # 3
x = 1 # 4
else: # 5
x = 1 # 6
no_pop_tops.events = [(0, 'call'),
(1, 'line'),
(2, 'line'),
(3, 'line'),
(6, 'line'),
(2, 'line'),
(3, 'line'),
(4, 'line'),
(2, 'line'),
(2, 'return')]
def no_pop_blocks():
y = 1
while not y:
bla
x = 1
no_pop_blocks.events = [(0, 'call'),
(1, 'line'),
(2, 'line'),
(4, 'line'),
(4, 'return')]
def called(): # line -3
x = 1
def call(): # line 0
called()
call.events = [(0, 'call'),
(1, 'line'),
(-3, 'call'),
(-2, 'line'),
(-2, 'return'),
(1, 'return')]
def raises():
raise Exception
def test_raise():
try:
raises()
except Exception as exc:
x = 1
test_raise.events = [(0, 'call'),
(1, 'line'),
(2, 'line'),
(-3, 'call'),
(-2, 'line'),
(-2, 'exception'),
(-2, 'return'),
(2, 'exception'),
(3, 'line'),
(4, 'line'),
(4, 'return')]
def _settrace_and_return(tracefunc):
sys.settrace(tracefunc)
sys._getframe().f_back.f_trace = tracefunc
def settrace_and_return(tracefunc):
_settrace_and_return(tracefunc)
settrace_and_return.events = [(1, 'return')]
def _settrace_and_raise(tracefunc):
sys.settrace(tracefunc)
sys._getframe().f_back.f_trace = tracefunc
raise RuntimeError
def settrace_and_raise(tracefunc):
try:
_settrace_and_raise(tracefunc)
except RuntimeError as exc:
pass
settrace_and_raise.events = [(2, 'exception'),
(3, 'line'),
(4, 'line'),
(4, 'return')]
# implicit return example
# This test is interesting because of the else: pass
# part of the code. The code generate for the true
# part of the if contains a jump past the else branch.
# The compiler then generates an implicit "return None"
# Internally, the compiler visits the pass statement
# and stores its line number for use on the next instruction.
# The next instruction is the implicit return None.
def ireturn_example():
a = 5
b = 5
if a == b:
b = a+1
else:
pass
ireturn_example.events = [(0, 'call'),
(1, 'line'),
(2, 'line'),
(3, 'line'),
(4, 'line'),
(6, 'line'),
(6, 'return')]
# Tight loop with while(1) example (SF #765624)
def tightloop_example():
items = range(0, 3)
try:
i = 0
while 1:
b = items[i]; i+=1
except IndexError:
pass
tightloop_example.events = [(0, 'call'),
(1, 'line'),
(2, 'line'),
(3, 'line'),
(4, 'line'),
(5, 'line'),
(5, 'line'),
(5, 'line'),
(5, 'line'),
(5, 'exception'),
(6, 'line'),
(7, 'line'),
(7, 'return')]
def tighterloop_example():
items = range(1, 4)
try:
i = 0
while 1: i = items[i]
except IndexError:
pass
tighterloop_example.events = [(0, 'call'),
(1, 'line'),
(2, 'line'),
(3, 'line'),
(4, 'line'),
(4, 'line'),
(4, 'line'),
(4, 'line'),
(4, 'exception'),
(5, 'line'),
(6, 'line'),
(6, 'return')]
def generator_function():
try:
yield True
"continued"
finally:
"finally"
def generator_example():
# any() will leave the generator before its end
x = any(generator_function())
# the following lines were not traced
for x in range(10):
y = x
generator_example.events = ([(0, 'call'),
(2, 'line'),
(-6, 'call'),
(-5, 'line'),
(-4, 'line'),
(-4, 'return'),
(-4, 'call'),
(-4, 'exception'),
(-1, 'line'),
(-1, 'return')] +
[(5, 'line'), (6, 'line')] * 10 +
[(5, 'line'), (5, 'return')])
class Tracer:
def __init__(self):
self.events = []
def trace(self, frame, event, arg):
self.events.append((frame.f_lineno, event))
return self.trace
def traceWithGenexp(self, frame, event, arg):
(o for o in [1])
self.events.append((frame.f_lineno, event))
return self.trace
class TraceTestCase(unittest.TestCase):
# Disable gc collection when tracing, otherwise the
# deallocators may be traced as well.
def setUp(self):
self.using_gc = gc.isenabled()
gc.disable()
self.addCleanup(sys.settrace, sys.gettrace())
def tearDown(self):
if self.using_gc:
gc.enable()
def compare_events(self, line_offset, events, expected_events):
events = [(l - line_offset, e) for (l, e) in events]
if events != expected_events:
self.fail(
"events did not match expectation:\n" +
"\n".join(difflib.ndiff([str(x) for x in expected_events],
[str(x) for x in events])))
def run_and_compare(self, func, events):
tracer = Tracer()
sys.settrace(tracer.trace)
func()
sys.settrace(None)
self.compare_events(func.__code__.co_firstlineno,
tracer.events, events)
def run_test(self, func):
self.run_and_compare(func, func.events)
def run_test2(self, func):
tracer = Tracer()
func(tracer.trace)
sys.settrace(None)
self.compare_events(func.__code__.co_firstlineno,
tracer.events, func.events)
def test_set_and_retrieve_none(self):
sys.settrace(None)
assert sys.gettrace() is None
def test_set_and_retrieve_func(self):
def fn(*args):
pass
sys.settrace(fn)
try:
assert sys.gettrace() is fn
finally:
sys.settrace(None)
def test_01_basic(self):
self.run_test(basic)
def test_02_arigo(self):
self.run_test(arigo_example)
def test_03_one_instr(self):
self.run_test(one_instr_line)
def test_04_no_pop_blocks(self):
self.run_test(no_pop_blocks)
def test_05_no_pop_tops(self):
self.run_test(no_pop_tops)
def test_06_call(self):
self.run_test(call)
def test_07_raise(self):
self.run_test(test_raise)
def test_08_settrace_and_return(self):
self.run_test2(settrace_and_return)
def test_09_settrace_and_raise(self):
self.run_test2(settrace_and_raise)
def test_10_ireturn(self):
self.run_test(ireturn_example)
def test_11_tightloop(self):
self.run_test(tightloop_example)
def test_12_tighterloop(self):
self.run_test(tighterloop_example)
def test_13_genexp(self):
self.run_test(generator_example)
# issue1265: if the trace function contains a generator,
# and if the traced function contains another generator
# that is not completely exhausted, the trace stopped.
# Worse: the 'finally' clause was not invoked.
tracer = Tracer()
sys.settrace(tracer.traceWithGenexp)
generator_example()
sys.settrace(None)
self.compare_events(generator_example.__code__.co_firstlineno,
tracer.events, generator_example.events)
def test_14_onliner_if(self):
def onliners():
if True: x=False
else: x=True
return 0
self.run_and_compare(
onliners,
[(0, 'call'),
(1, 'line'),
(3, 'line'),
(3, 'return')])
def test_15_loops(self):
# issue1750076: "while" expression is skipped by debugger
def for_example():
for x in range(2):
pass
self.run_and_compare(
for_example,
[(0, 'call'),
(1, 'line'),
(2, 'line'),
(1, 'line'),
(2, 'line'),
(1, 'line'),
(1, 'return')])
def while_example():
# While expression should be traced on every loop
x = 2
while x > 0:
x -= 1
self.run_and_compare(
while_example,
[(0, 'call'),
(2, 'line'),
(3, 'line'),
(4, 'line'),
(3, 'line'),
(4, 'line'),
(3, 'line'),
(3, 'return')])
def test_16_blank_lines(self):
namespace = {}
exec("def f():\n" + "\n" * 256 + " pass", namespace)
self.run_and_compare(
namespace["f"],
[(0, 'call'),
(257, 'line'),
(257, 'return')])
def test_17_none_f_trace(self):
# Issue 20041: fix TypeError when f_trace is set to None.
def func():
sys._getframe().f_trace = None
lineno = 2
self.run_and_compare(func,
[(0, 'call'),
(1, 'line')])
class RaisingTraceFuncTestCase(unittest.TestCase):
def setUp(self):
self.addCleanup(sys.settrace, sys.gettrace())
def trace(self, frame, event, arg):
"""A trace function that raises an exception in response to a
specific trace event."""
if event == self.raiseOnEvent:
raise ValueError # just something that isn't RuntimeError
else:
return self.trace
def f(self):
"""The function to trace; raises an exception if that's the case
we're testing, so that the 'exception' trace event fires."""
if self.raiseOnEvent == 'exception':
x = 0
y = 1/x
else:
return 1
def run_test_for_event(self, event):
"""Tests that an exception raised in response to the given event is
handled OK."""
self.raiseOnEvent = event
try:
for i in range(sys.getrecursionlimit() + 1):
sys.settrace(self.trace)
try:
self.f()
except ValueError:
pass
else:
self.fail("exception not raised!")
except RuntimeError:
self.fail("recursion counter not reset")
# Test the handling of exceptions raised by each kind of trace event.
def test_call(self):
self.run_test_for_event('call')
def test_line(self):
self.run_test_for_event('line')
def test_return(self):
self.run_test_for_event('return')
def test_exception(self):
self.run_test_for_event('exception')
def test_trash_stack(self):
def f():
for i in range(5):
print(i) # line tracing will raise an exception at this line
def g(frame, why, extra):
if (why == 'line' and
frame.f_lineno == f.__code__.co_firstlineno + 2):
raise RuntimeError("i am crashing")
return g
sys.settrace(g)
try:
f()
except RuntimeError:
# the test is really that this doesn't segfault:
import gc
gc.collect()
else:
self.fail("exception not propagated")
def test_exception_arguments(self):
def f():
x = 0
# this should raise an error
x.no_such_attr
def g(frame, event, arg):
if (event == 'exception'):
type, exception, trace = arg
self.assertIsInstance(exception, Exception)
return g
existing = sys.gettrace()
try:
sys.settrace(g)
try:
f()
except AttributeError:
# this is expected
pass
finally:
sys.settrace(existing)
# 'Jump' tests: assigning to frame.f_lineno within a trace function
# moves the execution position - it's how debuggers implement a Jump
# command (aka. "Set next statement").
class JumpTracer:
"""Defines a trace function that jumps from one place to another."""
def __init__(self, function, jumpFrom, jumpTo, event='line',
decorated=False):
self.code = function.__code__
self.jumpFrom = jumpFrom
self.jumpTo = jumpTo
self.event = event
self.firstLine = None if decorated else self.code.co_firstlineno
self.done = False
def trace(self, frame, event, arg):
if self.done:
return
# frame.f_code.co_firstlineno is the first line of the decorator when
# 'function' is decorated and the decorator may be written using
# multiple physical lines when it is too long. Use the first line
# trace event in 'function' to find the first line of 'function'.
if (self.firstLine is None and frame.f_code == self.code and
event == 'line'):
self.firstLine = frame.f_lineno - 1
if (event == self.event and self.firstLine and
frame.f_lineno == self.firstLine + self.jumpFrom):
f = frame
while f is not None and f.f_code != self.code:
f = f.f_back
if f is not None:
# Cope with non-integer self.jumpTo (because of
# no_jump_to_non_integers below).
try:
frame.f_lineno = self.firstLine + self.jumpTo
except TypeError:
frame.f_lineno = self.jumpTo
self.done = True
return self.trace
# This verifies the line-numbers-must-be-integers rule.
def no_jump_to_non_integers(output):
try:
output.append(2)
except ValueError as e:
output.append('integer' in str(e))
# This verifies that you can't set f_lineno via _getframe or similar
# trickery.
def no_jump_without_trace_function():
try:
previous_frame = sys._getframe().f_back
previous_frame.f_lineno = previous_frame.f_lineno
except ValueError as e:
# This is the exception we wanted; make sure the error message
# talks about trace functions.
if 'trace' not in str(e):
raise
else:
# Something's wrong - the expected exception wasn't raised.
raise AssertionError("Trace-function-less jump failed to fail")
class JumpTestCase(unittest.TestCase):
def setUp(self):
self.addCleanup(sys.settrace, sys.gettrace())
sys.settrace(None)
def compare_jump_output(self, expected, received):
if received != expected:
self.fail( "Outputs don't match:\n" +
"Expected: " + repr(expected) + "\n" +
"Received: " + repr(received))
def run_test(self, func, jumpFrom, jumpTo, expected, error=None,
event='line', decorated=False):
tracer = JumpTracer(func, jumpFrom, jumpTo, event, decorated)
sys.settrace(tracer.trace)
output = []
if error is None:
func(output)
else:
with self.assertRaisesRegex(*error):
func(output)
sys.settrace(None)
self.compare_jump_output(expected, output)
def run_async_test(self, func, jumpFrom, jumpTo, expected, error=None,
event='line', decorated=False):
tracer = JumpTracer(func, jumpFrom, jumpTo, event, decorated)
sys.settrace(tracer.trace)
output = []
if error is None:
asyncio_run(func(output))
else:
with self.assertRaisesRegex(*error):
asyncio_run(func(output))
sys.settrace(None)
self.compare_jump_output(expected, output)
def jump_test(jumpFrom, jumpTo, expected, error=None, event='line'):
"""Decorator that creates a test that makes a jump
from one place to another in the following code.
"""
def decorator(func):
@wraps(func)
def test(self):
self.run_test(func, jumpFrom, jumpTo, expected,
error=error, event=event, decorated=True)
return test
return decorator
def async_jump_test(jumpFrom, jumpTo, expected, error=None, event='line'):
"""Decorator that creates a test that makes a jump
from one place to another in the following asynchronous code.
"""
def decorator(func):
@wraps(func)
def test(self):
self.run_async_test(func, jumpFrom, jumpTo, expected,
error=error, event=event, decorated=True)
return test
return decorator
## The first set of 'jump' tests are for things that are allowed:
@jump_test(1, 3, [3])
def test_jump_simple_forwards(output):
output.append(1)
output.append(2)
output.append(3)
@jump_test(2, 1, [1, 1, 2])
def test_jump_simple_backwards(output):
output.append(1)
output.append(2)
@jump_test(3, 5, [2, 5])
def test_jump_out_of_block_forwards(output):
for i in 1, 2:
output.append(2)
for j in [3]: # Also tests jumping over a block
output.append(4)
output.append(5)
@jump_test(6, 1, [1, 3, 5, 1, 3, 5, 6, 7])
def test_jump_out_of_block_backwards(output):
output.append(1)
for i in [1]:
output.append(3)
for j in [2]: # Also tests jumping over a block
output.append(5)
output.append(6)
output.append(7)
@async_jump_test(4, 5, [3, 5])
async def test_jump_out_of_async_for_block_forwards(output):
for i in [1]:
async for i in asynciter([1, 2]):
output.append(3)
output.append(4)
output.append(5)
@async_jump_test(5, 2, [2, 4, 2, 4, 5, 6])
async def test_jump_out_of_async_for_block_backwards(output):
for i in [1]:
output.append(2)
async for i in asynciter([1]):
output.append(4)
output.append(5)
output.append(6)
@jump_test(1, 2, [3])
def test_jump_to_codeless_line(output):
output.append(1)
# Jumping to this line should skip to the next one.
output.append(3)
@jump_test(2, 2, [1, 2, 3])
def test_jump_to_same_line(output):
output.append(1)
output.append(2)
output.append(3)
# Tests jumping within a finally block, and over one.
@jump_test(4, 9, [2, 9])
def test_jump_in_nested_finally(output):
try:
output.append(2)
finally:
output.append(4)
try:
output.append(6)
finally:
output.append(8)
output.append(9)
@jump_test(6, 7, [2, 7], (ZeroDivisionError, ''))
def test_jump_in_nested_finally_2(output):
try:
output.append(2)
1/0
return
finally:
output.append(6)
output.append(7)
output.append(8)
@jump_test(6, 11, [2, 11], (ZeroDivisionError, ''))
def test_jump_in_nested_finally_3(output):
try:
output.append(2)
1/0
return
finally:
output.append(6)
try:
output.append(8)
finally:
output.append(10)
output.append(11)
output.append(12)
@jump_test(3, 4, [1, 4])
def test_jump_infinite_while_loop(output):
output.append(1)
while True:
output.append(3)
output.append(4)
@jump_test(2, 3, [1, 3])
def test_jump_forwards_out_of_with_block(output):
with tracecontext(output, 1):
output.append(2)
output.append(3)
@async_jump_test(2, 3, [1, 3])
async def test_jump_forwards_out_of_async_with_block(output):
async with asynctracecontext(output, 1):
output.append(2)
output.append(3)
@jump_test(3, 1, [1, 2, 1, 2, 3, -2])
def test_jump_backwards_out_of_with_block(output):
output.append(1)
with tracecontext(output, 2):
output.append(3)
@async_jump_test(3, 1, [1, 2, 1, 2, 3, -2])
async def test_jump_backwards_out_of_async_with_block(output):
output.append(1)
async with asynctracecontext(output, 2):
output.append(3)
@jump_test(2, 5, [5])
def test_jump_forwards_out_of_try_finally_block(output):
try:
output.append(2)
finally:
output.append(4)
output.append(5)
@jump_test(3, 1, [1, 1, 3, 5])
def test_jump_backwards_out_of_try_finally_block(output):
output.append(1)
try:
output.append(3)
finally:
output.append(5)
@jump_test(2, 6, [6])
def test_jump_forwards_out_of_try_except_block(output):
try:
output.append(2)
except:
output.append(4)
raise
output.append(6)
@jump_test(3, 1, [1, 1, 3])
def test_jump_backwards_out_of_try_except_block(output):
output.append(1)
try:
output.append(3)
except:
output.append(5)
raise
@jump_test(5, 7, [4, 7, 8])
def test_jump_between_except_blocks(output):
try:
1/0
except ZeroDivisionError:
output.append(4)
output.append(5)
except FloatingPointError:
output.append(7)
output.append(8)
@jump_test(5, 6, [4, 6, 7])
def test_jump_within_except_block(output):
try:
1/0
except:
output.append(4)
output.append(5)
output.append(6)
output.append(7)
@jump_test(2, 4, [1, 4, 5, -4])
def test_jump_across_with(output):
output.append(1)
with tracecontext(output, 2):
output.append(3)
with tracecontext(output, 4):
output.append(5)
@async_jump_test(2, 4, [1, 4, 5, -4])
async def test_jump_across_async_with(output):
output.append(1)
async with asynctracecontext(output, 2):
output.append(3)
async with asynctracecontext(output, 4):
output.append(5)
@jump_test(4, 5, [1, 3, 5, 6])
def test_jump_out_of_with_block_within_for_block(output):
output.append(1)
for i in [1]:
with tracecontext(output, 3):
output.append(4)
output.append(5)
output.append(6)
@async_jump_test(4, 5, [1, 3, 5, 6])
async def test_jump_out_of_async_with_block_within_for_block(output):
output.append(1)
for i in [1]:
async with asynctracecontext(output, 3):
output.append(4)
output.append(5)
output.append(6)
@jump_test(4, 5, [1, 2, 3, 5, -2, 6])
def test_jump_out_of_with_block_within_with_block(output):
output.append(1)
with tracecontext(output, 2):
with tracecontext(output, 3):
output.append(4)
output.append(5)
output.append(6)
@async_jump_test(4, 5, [1, 2, 3, 5, -2, 6])
async def test_jump_out_of_async_with_block_within_with_block(output):
output.append(1)
with tracecontext(output, 2):
async with asynctracecontext(output, 3):
output.append(4)
output.append(5)
output.append(6)
@jump_test(5, 6, [2, 4, 6, 7])
def test_jump_out_of_with_block_within_finally_block(output):
try:
output.append(2)
finally:
with tracecontext(output, 4):
output.append(5)
output.append(6)
output.append(7)
@async_jump_test(5, 6, [2, 4, 6, 7])
async def test_jump_out_of_async_with_block_within_finally_block(output):
try:
output.append(2)
finally:
async with asynctracecontext(output, 4):
output.append(5)
output.append(6)
output.append(7)
@jump_test(8, 11, [1, 3, 5, 11, 12])
def test_jump_out_of_complex_nested_blocks(output):
output.append(1)
for i in [1]:
output.append(3)
for j in [1, 2]:
output.append(5)
try:
for k in [1, 2]:
output.append(8)
finally:
output.append(10)
output.append(11)
output.append(12)
@jump_test(3, 5, [1, 2, 5])
def test_jump_out_of_with_assignment(output):
output.append(1)
with tracecontext(output, 2) \
as x:
output.append(4)
output.append(5)
@async_jump_test(3, 5, [1, 2, 5])
async def test_jump_out_of_async_with_assignment(output):
output.append(1)
async with asynctracecontext(output, 2) \
as x:
output.append(4)
output.append(5)
@jump_test(3, 6, [1, 6, 8, 9])
def test_jump_over_return_in_try_finally_block(output):
output.append(1)
try:
output.append(3)
if not output: # always false
return
output.append(6)
finally:
output.append(8)
output.append(9)
@jump_test(5, 8, [1, 3, 8, 10, 11, 13])
def test_jump_over_break_in_try_finally_block(output):
output.append(1)
while True:
output.append(3)
try:
output.append(5)
if not output: # always false
break
output.append(8)
finally:
output.append(10)
output.append(11)
break
output.append(13)
@jump_test(1, 7, [7, 8])
def test_jump_over_for_block_before_else(output):
output.append(1)
if not output: # always false
for i in [3]:
output.append(4)
else:
output.append(6)
output.append(7)
output.append(8)
@async_jump_test(1, 7, [7, 8])
async def test_jump_over_async_for_block_before_else(output):
output.append(1)
if not output: # always false
async for i in asynciter([3]):
output.append(4)
else:
output.append(6)
output.append(7)
output.append(8)
# The second set of 'jump' tests are for things that are not allowed:
@jump_test(2, 3, [1], (ValueError, 'after'))
def test_no_jump_too_far_forwards(output):
output.append(1)
output.append(2)
@jump_test(2, -2, [1], (ValueError, 'before'))
def test_no_jump_too_far_backwards(output):
output.append(1)
output.append(2)
# Test each kind of 'except' line.
@jump_test(2, 3, [4], (ValueError, 'except'))
def test_no_jump_to_except_1(output):
try:
output.append(2)
except:
output.append(4)
raise
@jump_test(2, 3, [4], (ValueError, 'except'))
def test_no_jump_to_except_2(output):
try:
output.append(2)
except ValueError:
output.append(4)
raise
@jump_test(2, 3, [4], (ValueError, 'except'))
def test_no_jump_to_except_3(output):
try:
output.append(2)
except ValueError as e:
output.append(4)
raise e
@jump_test(2, 3, [4], (ValueError, 'except'))
def test_no_jump_to_except_4(output):
try:
output.append(2)
except (ValueError, RuntimeError) as e:
output.append(4)
raise e
@jump_test(1, 3, [], (ValueError, 'into'))
def test_no_jump_forwards_into_for_block(output):
output.append(1)
for i in 1, 2:
output.append(3)
@async_jump_test(1, 3, [], (ValueError, 'into'))
async def test_no_jump_forwards_into_async_for_block(output):
output.append(1)
async for i in asynciter([1, 2]):
output.append(3)
@jump_test(3, 2, [2, 2], (ValueError, 'into'))
def test_no_jump_backwards_into_for_block(output):
for i in 1, 2:
output.append(2)
output.append(3)
@async_jump_test(3, 2, [2, 2], (ValueError, 'into'))
async def test_no_jump_backwards_into_async_for_block(output):
async for i in asynciter([1, 2]):
output.append(2)
output.append(3)
@jump_test(2, 4, [], (ValueError, 'into'))
def test_no_jump_forwards_into_while_block(output):
i = 1
output.append(2)
while i <= 2:
output.append(4)
i += 1
@jump_test(5, 3, [3, 3], (ValueError, 'into'))
def test_no_jump_backwards_into_while_block(output):
i = 1
while i <= 2:
output.append(3)
i += 1
output.append(5)
@jump_test(1, 3, [], (ValueError, 'into'))
def test_no_jump_forwards_into_with_block(output):
output.append(1)
with tracecontext(output, 2):
output.append(3)
@async_jump_test(1, 3, [], (ValueError, 'into'))
async def test_no_jump_forwards_into_async_with_block(output):
output.append(1)
async with asynctracecontext(output, 2):
output.append(3)
@jump_test(3, 2, [1, 2, -1], (ValueError, 'into'))
def test_no_jump_backwards_into_with_block(output):
with tracecontext(output, 1):
output.append(2)
output.append(3)
@async_jump_test(3, 2, [1, 2, -1], (ValueError, 'into'))
async def test_no_jump_backwards_into_async_with_block(output):
async with asynctracecontext(output, 1):
output.append(2)
output.append(3)
@jump_test(1, 3, [], (ValueError, 'into'))
def test_no_jump_forwards_into_try_finally_block(output):
output.append(1)
try:
output.append(3)
finally:
output.append(5)
@jump_test(5, 2, [2, 4], (ValueError, 'into'))
def test_no_jump_backwards_into_try_finally_block(output):
try:
output.append(2)
finally:
output.append(4)
output.append(5)
@jump_test(1, 3, [], (ValueError, 'into'))
def test_no_jump_forwards_into_try_except_block(output):
output.append(1)
try:
output.append(3)
except:
output.append(5)
raise
@jump_test(6, 2, [2], (ValueError, 'into'))
def test_no_jump_backwards_into_try_except_block(output):
try:
output.append(2)
except:
output.append(4)
raise
output.append(6)
# 'except' with a variable creates an implicit finally block
@jump_test(5, 7, [4], (ValueError, 'into'))
def test_no_jump_between_except_blocks_2(output):
try:
1/0
except ZeroDivisionError:
output.append(4)
output.append(5)
except FloatingPointError as e:
output.append(7)
output.append(8)
@jump_test(3, 6, [2, 5, 6], (ValueError, 'finally'))
def test_no_jump_into_finally_block(output):
try:
output.append(2)
output.append(3)
finally: # still executed if the jump is failed
output.append(5)
output.append(6)
output.append(7)
@jump_test(1, 5, [], (ValueError, 'finally'))
def test_no_jump_into_finally_block_2(output):
output.append(1)
try:
output.append(3)
finally:
output.append(5)
@jump_test(5, 1, [1, 3], (ValueError, 'finally'))
def test_no_jump_out_of_finally_block(output):
output.append(1)
try:
output.append(3)
finally:
output.append(5)
@jump_test(3, 5, [1, 2, -2], (ValueError, 'into'))
def test_no_jump_between_with_blocks(output):
output.append(1)
with tracecontext(output, 2):
output.append(3)
with tracecontext(output, 4):
output.append(5)
@async_jump_test(3, 5, [1, 2, -2], (ValueError, 'into'))
async def test_no_jump_between_async_with_blocks(output):
output.append(1)
async with asynctracecontext(output, 2):
output.append(3)
async with asynctracecontext(output, 4):
output.append(5)
@jump_test(7, 4, [1, 6], (ValueError, 'into'))
def test_no_jump_into_for_block_before_else(output):
output.append(1)
if not output: # always false
for i in [3]:
output.append(4)
else:
output.append(6)
output.append(7)
output.append(8)
@async_jump_test(7, 4, [1, 6], (ValueError, 'into'))
async def test_no_jump_into_async_for_block_before_else(output):
output.append(1)
if not output: # always false
async for i in asynciter([3]):
output.append(4)
else:
output.append(6)
output.append(7)
output.append(8)
def test_no_jump_to_non_integers(self):
self.run_test(no_jump_to_non_integers, 2, "Spam", [True])
def test_no_jump_without_trace_function(self):
# Must set sys.settrace(None) in setUp(), else condition is not
# triggered.
no_jump_without_trace_function()
def test_large_function(self):
d = {}
exec("""def f(output): # line 0
x = 0 # line 1
y = 1 # line 2
''' # line 3
%s # lines 4-1004
''' # line 1005
x += 1 # line 1006
output.append(x) # line 1007
return""" % ('\n' * 1000,), d)
f = d['f']
self.run_test(f, 2, 1007, [0])
def test_jump_to_firstlineno(self):
# This tests that PDB can jump back to the first line in a
# file. See issue #1689458. It can only be triggered in a
# function call if the function is defined on a single line.
code = compile("""
# Comments don't count.
output.append(2) # firstlineno is here.
output.append(3)
output.append(4)
""", "<fake module>", "exec")
class fake_function:
__code__ = code
tracer = JumpTracer(fake_function, 2, 0)
sys.settrace(tracer.trace)
namespace = {"output": []}
exec(code, namespace)
sys.settrace(None)
self.compare_jump_output([2, 3, 2, 3, 4], namespace["output"])
@jump_test(2, 3, [1], event='call', error=(ValueError, "can't jump from"
" the 'call' trace event of a new frame"))
def test_no_jump_from_call(output):
output.append(1)
def nested():
output.append(3)
nested()
output.append(5)
@jump_test(2, 1, [1], event='return', error=(ValueError,
"can only jump from a 'line' trace event"))
def test_no_jump_from_return_event(output):
output.append(1)
return
@jump_test(2, 1, [1], event='exception', error=(ValueError,
"can only jump from a 'line' trace event"))
def test_no_jump_from_exception_event(output):
output.append(1)
1 / 0
@jump_test(3, 2, [2], event='return', error=(ValueError,
"can't jump from a yield statement"))
def test_no_jump_from_yield(output):
def gen():
output.append(2)
yield 3
next(gen())
output.append(5)
if __name__ == "__main__":
unittest.main()
| 39,735 | 1,298 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test___all__.py | import unittest
from test import support
import os
import sys
class NoAll(RuntimeError):
pass
class FailedImport(RuntimeError):
pass
class AllTest(unittest.TestCase):
def check_all(self, modname):
names = {}
with support.check_warnings(
(".* (module|package)", DeprecationWarning),
("", ResourceWarning),
quiet=True):
try:
exec("import %s" % modname, names)
except:
# Silent fail here seems the best route since some modules
# may not be available or not initialize properly in all
# environments.
raise FailedImport(modname)
if not hasattr(sys.modules[modname], "__all__"):
raise NoAll(modname)
names = {}
with self.subTest(module=modname):
try:
exec("from %s import *" % modname, names)
except Exception as e:
# Include the module name in the exception string
self.fail("__all__ failure in {}: {}: {}".format(
modname, e.__class__.__name__, e))
if "__builtins__" in names:
del names["__builtins__"]
if '__annotations__' in names:
del names['__annotations__']
keys = set(names)
all_list = sys.modules[modname].__all__
all_set = set(all_list)
self.assertCountEqual(all_set, all_list, "in module {}".format(modname))
self.assertEqual(keys, all_set, "in module {}".format(modname))
def walk_modules(self, basedir, modpath):
for fn in sorted(os.listdir(basedir)):
path = os.path.join(basedir, fn)
if os.path.isdir(path):
pkg_init = os.path.join(path, '__init__.py')
if os.path.exists(pkg_init):
yield pkg_init, modpath + fn
for p, m in self.walk_modules(path, modpath + fn + "."):
yield p, m
continue
if not fn.endswith('.py') or fn == '__init__.py':
continue
yield path, modpath + fn[:-3]
def test_all(self):
# Blacklisted modules and packages
blacklist = set([
# Will raise a SyntaxError when compiling the exec statement
'__future__',
])
if not sys.platform.startswith('java'):
# In case _socket fails to build, make this test fail more gracefully
# than an AttributeError somewhere deep in CGIHTTPServer.
import _socket
ignored = []
failed_imports = []
lib_dir = os.path.dirname(os.path.dirname(__file__))
for path, modname in self.walk_modules(lib_dir, ""):
m = modname
blacklisted = False
while m:
if m in blacklist:
blacklisted = True
break
m = m.rpartition('.')[0]
if blacklisted:
continue
if support.verbose:
print(modname)
try:
# This heuristic speeds up the process by removing, de facto,
# most test modules (and avoiding the auto-executing ones).
with open(path, "rb") as f:
if b"__all__" not in f.read():
raise NoAll(modname)
self.check_all(modname)
except NoAll:
ignored.append(modname)
except FailedImport:
failed_imports.append(modname)
if support.verbose:
print('Following modules have no __all__ and have been ignored:',
ignored)
print('Following modules failed to be imported:', failed_imports)
if __name__ == "__main__":
unittest.main()
| 3,900 | 110 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/final_a.py | """
Fodder for module finalization tests in test_module.
"""
import shutil
import test.final_b
x = 'a'
class C:
def __del__(self):
# Inspect module globals and builtins
print("x =", x)
print("final_b.x =", test.final_b.x)
print("shutil.rmtree =", getattr(shutil.rmtree, '__name__', None))
print("len =", getattr(len, '__name__', None))
c = C()
_underscored = C()
| 411 | 20 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_pwd.py | import sys
import unittest
from test import support
pwd = support.import_module('pwd')
def _getpwall():
# Android does not have getpwall.
if hasattr(pwd, 'getpwall'):
return pwd.getpwall()
elif hasattr(pwd, 'getpwuid'):
return [pwd.getpwuid(0)]
else:
return []
class PwdTest(unittest.TestCase):
def test_values(self):
entries = _getpwall()
for e in entries:
self.assertEqual(len(e), 7)
self.assertEqual(e[0], e.pw_name)
self.assertIsInstance(e.pw_name, str)
self.assertEqual(e[1], e.pw_passwd)
self.assertIsInstance(e.pw_passwd, str)
self.assertEqual(e[2], e.pw_uid)
self.assertIsInstance(e.pw_uid, int)
self.assertEqual(e[3], e.pw_gid)
self.assertIsInstance(e.pw_gid, int)
self.assertEqual(e[4], e.pw_gecos)
self.assertIsInstance(e.pw_gecos, str)
self.assertEqual(e[5], e.pw_dir)
self.assertIsInstance(e.pw_dir, str)
self.assertEqual(e[6], e.pw_shell)
self.assertIsInstance(e.pw_shell, str)
# The following won't work, because of duplicate entries
# for one uid
# self.assertEqual(pwd.getpwuid(e.pw_uid), e)
# instead of this collect all entries for one uid
# and check afterwards (done in test_values_extended)
def test_values_extended(self):
entries = _getpwall()
entriesbyname = {}
entriesbyuid = {}
if len(entries) > 1000: # Huge passwd file (NIS?) -- skip this test
self.skipTest('passwd file is huge; extended test skipped')
for e in entries:
entriesbyname.setdefault(e.pw_name, []).append(e)
entriesbyuid.setdefault(e.pw_uid, []).append(e)
# check whether the entry returned by getpwuid()
# for each uid is among those from getpwall() for this uid
for e in entries:
if not e[0] or e[0] == '+':
continue # skip NIS entries etc.
self.assertIn(pwd.getpwnam(e.pw_name), entriesbyname[e.pw_name])
self.assertIn(pwd.getpwuid(e.pw_uid), entriesbyuid[e.pw_uid])
def test_errors(self):
self.assertRaises(TypeError, pwd.getpwuid)
self.assertRaises(TypeError, pwd.getpwuid, 3.14)
self.assertRaises(TypeError, pwd.getpwnam)
self.assertRaises(TypeError, pwd.getpwnam, 42)
if hasattr(pwd, 'getpwall'):
self.assertRaises(TypeError, pwd.getpwall, 42)
# try to get some errors
bynames = {}
byuids = {}
for (n, p, u, g, gecos, d, s) in _getpwall():
bynames[n] = u
byuids[u] = n
allnames = list(bynames.keys())
namei = 0
fakename = allnames[namei]
while fakename in bynames:
chars = list(fakename)
for i in range(len(chars)):
if chars[i] == 'z':
chars[i] = 'A'
break
elif chars[i] == 'Z':
continue
else:
chars[i] = chr(ord(chars[i]) + 1)
break
else:
namei = namei + 1
try:
fakename = allnames[namei]
except IndexError:
# should never happen... if so, just forget it
break
fakename = ''.join(chars)
self.assertRaises(KeyError, pwd.getpwnam, fakename)
# In some cases, byuids isn't a complete list of all users in the
# system, so if we try to pick a value not in byuids (via a perturbing
# loop, say), pwd.getpwuid() might still be able to find data for that
# uid. Using sys.maxint may provoke the same problems, but hopefully
# it will be a more repeatable failure.
# Android accepts a very large span of uids including sys.maxsize and
# -1; it raises KeyError with 1 or 2 for example.
fakeuid = sys.maxsize
self.assertNotIn(fakeuid, byuids)
if not support.is_android:
self.assertRaises(KeyError, pwd.getpwuid, fakeuid)
# -1 shouldn't be a valid uid because it has a special meaning in many
# uid-related functions
if not support.is_android:
self.assertRaises(KeyError, pwd.getpwuid, -1)
# should be out of uid_t range
self.assertRaises(KeyError, pwd.getpwuid, 2**128)
self.assertRaises(KeyError, pwd.getpwuid, -2**128)
if __name__ == "__main__":
unittest.main()
| 4,642 | 126 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/ffdh3072.pem | DH Parameters: (3072 bit)
prime:
00:ff:ff:ff:ff:ff:ff:ff:ff:ad:f8:54:58:a2:bb:
4a:9a:af:dc:56:20:27:3d:3c:f1:d8:b9:c5:83:ce:
2d:36:95:a9:e1:36:41:14:64:33:fb:cc:93:9d:ce:
24:9b:3e:f9:7d:2f:e3:63:63:0c:75:d8:f6:81:b2:
02:ae:c4:61:7a:d3:df:1e:d5:d5:fd:65:61:24:33:
f5:1f:5f:06:6e:d0:85:63:65:55:3d:ed:1a:f3:b5:
57:13:5e:7f:57:c9:35:98:4f:0c:70:e0:e6:8b:77:
e2:a6:89:da:f3:ef:e8:72:1d:f1:58:a1:36:ad:e7:
35:30:ac:ca:4f:48:3a:79:7a:bc:0a:b1:82:b3:24:
fb:61:d1:08:a9:4b:b2:c8:e3:fb:b9:6a:da:b7:60:
d7:f4:68:1d:4f:42:a3:de:39:4d:f4:ae:56:ed:e7:
63:72:bb:19:0b:07:a7:c8:ee:0a:6d:70:9e:02:fc:
e1:cd:f7:e2:ec:c0:34:04:cd:28:34:2f:61:91:72:
fe:9c:e9:85:83:ff:8e:4f:12:32:ee:f2:81:83:c3:
fe:3b:1b:4c:6f:ad:73:3b:b5:fc:bc:2e:c2:20:05:
c5:8e:f1:83:7d:16:83:b2:c6:f3:4a:26:c1:b2:ef:
fa:88:6b:42:38:61:1f:cf:dc:de:35:5b:3b:65:19:
03:5b:bc:34:f4:de:f9:9c:02:38:61:b4:6f:c9:d6:
e6:c9:07:7a:d9:1d:26:91:f7:f7:ee:59:8c:b0:fa:
c1:86:d9:1c:ae:fe:13:09:85:13:92:70:b4:13:0c:
93:bc:43:79:44:f4:fd:44:52:e2:d7:4d:d3:64:f2:
e2:1e:71:f5:4b:ff:5c:ae:82:ab:9c:9d:f6:9e:e8:
6d:2b:c5:22:36:3a:0d:ab:c5:21:97:9b:0d:ea:da:
1d:bf:9a:42:d5:c4:48:4e:0a:bc:d0:6b:fa:53:dd:
ef:3c:1b:20:ee:3f:d5:9d:7c:25:e4:1d:2b:66:c6:
2e:37:ff:ff:ff:ff:ff:ff:ff:ff
generator: 2 (0x2)
recommended-private-length: 276 bits
-----BEGIN DH PARAMETERS-----
MIIBjAKCAYEA//////////+t+FRYortKmq/cViAnPTzx2LnFg84tNpWp4TZBFGQz
+8yTnc4kmz75fS/jY2MMddj2gbICrsRhetPfHtXV/WVhJDP1H18GbtCFY2VVPe0a
87VXE15/V8k1mE8McODmi3fipona8+/och3xWKE2rec1MKzKT0g6eXq8CrGCsyT7
YdEIqUuyyOP7uWrat2DX9GgdT0Kj3jlN9K5W7edjcrsZCwenyO4KbXCeAvzhzffi
7MA0BM0oNC9hkXL+nOmFg/+OTxIy7vKBg8P+OxtMb61zO7X8vC7CIAXFjvGDfRaD
ssbzSibBsu/6iGtCOGEfz9zeNVs7ZRkDW7w09N75nAI4YbRvydbmyQd62R0mkff3
7lmMsPrBhtkcrv4TCYUTknC0EwyTvEN5RPT9RFLi103TZPLiHnH1S/9croKrnJ32
nuhtK8UiNjoNq8Uhl5sN6todv5pC1cRITgq80Gv6U93vPBsg7j/VnXwl5B0rZsYu
N///////////AgECAgIBFA==
-----END DH PARAMETERS-----
| 2,212 | 42 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_winconsoleio.py | '''Tests for WindowsConsoleIO
'''
import io
import os
import sys
import tempfile
import unittest
from test import support
if sys.platform != 'win32':
raise unittest.SkipTest("test only relevant on win32")
from _testconsole import write_input
ConIO = io._WindowsConsoleIO
class WindowsConsoleIOTests(unittest.TestCase):
def test_abc(self):
self.assertTrue(issubclass(ConIO, io.RawIOBase))
self.assertFalse(issubclass(ConIO, io.BufferedIOBase))
self.assertFalse(issubclass(ConIO, io.TextIOBase))
def test_open_fd(self):
self.assertRaisesRegex(ValueError,
"negative file descriptor", ConIO, -1)
fd, _ = tempfile.mkstemp()
try:
# Windows 10: "Cannot open non-console file"
# Earlier: "Cannot open console output buffer for reading"
self.assertRaisesRegex(ValueError,
"Cannot open (console|non-console file)", ConIO, fd)
finally:
os.close(fd)
try:
f = ConIO(0)
except ValueError:
# cannot open console because it's not a real console
pass
else:
self.assertTrue(f.readable())
self.assertFalse(f.writable())
self.assertEqual(0, f.fileno())
f.close() # multiple close should not crash
f.close()
try:
f = ConIO(1, 'w')
except ValueError:
# cannot open console because it's not a real console
pass
else:
self.assertFalse(f.readable())
self.assertTrue(f.writable())
self.assertEqual(1, f.fileno())
f.close()
f.close()
try:
f = ConIO(2, 'w')
except ValueError:
# cannot open console because it's not a real console
pass
else:
self.assertFalse(f.readable())
self.assertTrue(f.writable())
self.assertEqual(2, f.fileno())
f.close()
f.close()
def test_open_name(self):
self.assertRaises(ValueError, ConIO, sys.executable)
f = ConIO("CON")
self.assertTrue(f.readable())
self.assertFalse(f.writable())
self.assertIsNotNone(f.fileno())
f.close() # multiple close should not crash
f.close()
f = ConIO('CONIN$')
self.assertTrue(f.readable())
self.assertFalse(f.writable())
self.assertIsNotNone(f.fileno())
f.close()
f.close()
f = ConIO('CONOUT$', 'w')
self.assertFalse(f.readable())
self.assertTrue(f.writable())
self.assertIsNotNone(f.fileno())
f.close()
f.close()
f = open('C:/con', 'rb', buffering=0)
self.assertIsInstance(f, ConIO)
f.close()
@unittest.skipIf(sys.getwindowsversion()[:2] <= (6, 1),
"test does not work on Windows 7 and earlier")
def test_conin_conout_names(self):
f = open(r'\\.\conin$', 'rb', buffering=0)
self.assertIsInstance(f, ConIO)
f.close()
f = open('//?/conout$', 'wb', buffering=0)
self.assertIsInstance(f, ConIO)
f.close()
def test_conout_path(self):
temp_path = tempfile.mkdtemp()
self.addCleanup(support.rmtree, temp_path)
conout_path = os.path.join(temp_path, 'CONOUT$')
with open(conout_path, 'wb', buffering=0) as f:
if sys.getwindowsversion()[:2] > (6, 1):
self.assertIsInstance(f, ConIO)
else:
self.assertNotIsInstance(f, ConIO)
def test_write_empty_data(self):
with ConIO('CONOUT$', 'w') as f:
self.assertEqual(f.write(b''), 0)
def assertStdinRoundTrip(self, text):
stdin = open('CONIN$', 'r')
old_stdin = sys.stdin
try:
sys.stdin = stdin
write_input(
stdin.buffer.raw,
(text + '\r\n').encode('utf-16-le', 'surrogatepass')
)
actual = input()
finally:
sys.stdin = old_stdin
self.assertEqual(actual, text)
def test_input(self):
# ASCII
self.assertStdinRoundTrip('abc123')
# Non-ASCII
self.assertStdinRoundTrip('ϼÑТλФÐ')
# Combining characters
self.assertStdinRoundTrip('AÍB ï¬Ì³AAÌ')
# Non-BMP
self.assertStdinRoundTrip('\U00100000\U0010ffff\U0010fffd')
def test_partial_reads(self):
# Test that reading less than 1 full character works when stdin
# contains multibyte UTF-8 sequences
source = 'ϼÑТλФÐ\r\n'.encode('utf-16-le')
expected = 'ϼÑТλФÐ\r\n'.encode('utf-8')
for read_count in range(1, 16):
with open('CONIN$', 'rb', buffering=0) as stdin:
write_input(stdin, source)
actual = b''
while not actual.endswith(b'\n'):
b = stdin.read(read_count)
actual += b
self.assertEqual(actual, expected, 'stdin.read({})'.format(read_count))
def test_partial_surrogate_reads(self):
# Test that reading less than 1 full character works when stdin
# contains surrogate pairs that cannot be decoded to UTF-8 without
# reading an extra character.
source = '\U00101FFF\U00101001\r\n'.encode('utf-16-le')
expected = '\U00101FFF\U00101001\r\n'.encode('utf-8')
for read_count in range(1, 16):
with open('CONIN$', 'rb', buffering=0) as stdin:
write_input(stdin, source)
actual = b''
while not actual.endswith(b'\n'):
b = stdin.read(read_count)
actual += b
self.assertEqual(actual, expected, 'stdin.read({})'.format(read_count))
def test_ctrl_z(self):
with open('CONIN$', 'rb', buffering=0) as stdin:
source = '\xC4\x1A\r\n'.encode('utf-16-le')
expected = '\xC4'.encode('utf-8')
write_input(stdin, source)
a, b = stdin.read(1), stdin.readall()
self.assertEqual(expected[0:1], a)
self.assertEqual(expected[1:], b)
if __name__ == "__main__":
unittest.main()
| 6,293 | 196 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_dict.py | import cosmo
import collections
import collections.abc
import gc
import pickle
import random
import string
import sys
import unittest
import weakref
from test import support
class DictTest(unittest.TestCase):
def test_invalid_keyword_arguments(self):
class Custom(dict):
pass
for invalid in {1 : 2}, Custom({1 : 2}):
with self.assertRaises(TypeError):
dict(**invalid)
with self.assertRaises(TypeError):
{}.update(**invalid)
def test_constructor(self):
# calling built-in types without argument must return empty
self.assertEqual(dict(), {})
self.assertIsNot(dict(), {})
def test_literal_constructor(self):
# check literal constructor for different sized dicts
# (to exercise the BUILD_MAP oparg).
for n in (0, 1, 6, 256, 400):
items = [(''.join(random.sample(string.ascii_letters, 8)), i)
for i in range(n)]
random.shuffle(items)
formatted_items = ('{!r}: {:d}'.format(k, v) for k, v in items)
dictliteral = '{' + ', '.join(formatted_items) + '}'
self.assertEqual(eval(dictliteral), dict(items))
def test_bool(self):
self.assertIs(not {}, True)
self.assertTrue({1: 2})
self.assertIs(bool({}), False)
self.assertIs(bool({1: 2}), True)
def test_keys(self):
d = {}
self.assertEqual(set(d.keys()), set())
d = {'a': 1, 'b': 2}
k = d.keys()
self.assertEqual(set(k), {'a', 'b'})
self.assertIn('a', k)
self.assertIn('b', k)
self.assertIn('a', d)
self.assertIn('b', d)
self.assertRaises(TypeError, d.keys, None)
self.assertEqual(repr(dict(a=1).keys()), "dict_keys(['a'])")
def test_values(self):
d = {}
self.assertEqual(set(d.values()), set())
d = {1:2}
self.assertEqual(set(d.values()), {2})
self.assertRaises(TypeError, d.values, None)
self.assertEqual(repr(dict(a=1).values()), "dict_values([1])")
def test_items(self):
d = {}
self.assertEqual(set(d.items()), set())
d = {1:2}
self.assertEqual(set(d.items()), {(1, 2)})
self.assertRaises(TypeError, d.items, None)
self.assertEqual(repr(dict(a=1).items()), "dict_items([('a', 1)])")
def test_contains(self):
d = {}
self.assertNotIn('a', d)
self.assertFalse('a' in d)
self.assertTrue('a' not in d)
d = {'a': 1, 'b': 2}
self.assertIn('a', d)
self.assertIn('b', d)
self.assertNotIn('c', d)
self.assertRaises(TypeError, d.__contains__)
def test_len(self):
d = {}
self.assertEqual(len(d), 0)
d = {'a': 1, 'b': 2}
self.assertEqual(len(d), 2)
def test_getitem(self):
d = {'a': 1, 'b': 2}
self.assertEqual(d['a'], 1)
self.assertEqual(d['b'], 2)
d['c'] = 3
d['a'] = 4
self.assertEqual(d['c'], 3)
self.assertEqual(d['a'], 4)
del d['b']
self.assertEqual(d, {'a': 4, 'c': 3})
self.assertRaises(TypeError, d.__getitem__)
class BadEq(object):
def __eq__(self, other):
raise Exc()
def __hash__(self):
return 24
d = {}
d[BadEq()] = 42
self.assertRaises(KeyError, d.__getitem__, 23)
class Exc(Exception): pass
class BadHash(object):
fail = False
def __hash__(self):
if self.fail:
raise Exc()
else:
return 42
x = BadHash()
d[x] = 42
x.fail = True
self.assertRaises(Exc, d.__getitem__, x)
def test_clear(self):
d = {1:1, 2:2, 3:3}
d.clear()
self.assertEqual(d, {})
self.assertRaises(TypeError, d.clear, None)
def test_update(self):
d = {}
d.update({1:100})
d.update({2:20})
d.update({1:1, 2:2, 3:3})
self.assertEqual(d, {1:1, 2:2, 3:3})
d.update()
self.assertEqual(d, {1:1, 2:2, 3:3})
self.assertRaises((TypeError, AttributeError), d.update, None)
class SimpleUserDict:
def __init__(self):
self.d = {1:1, 2:2, 3:3}
def keys(self):
return self.d.keys()
def __getitem__(self, i):
return self.d[i]
d.clear()
d.update(SimpleUserDict())
self.assertEqual(d, {1:1, 2:2, 3:3})
class Exc(Exception): pass
d.clear()
class FailingUserDict:
def keys(self):
raise Exc
self.assertRaises(Exc, d.update, FailingUserDict())
class FailingUserDict:
def keys(self):
class BogonIter:
def __init__(self):
self.i = 1
def __iter__(self):
return self
def __next__(self):
if self.i:
self.i = 0
return 'a'
raise Exc
return BogonIter()
def __getitem__(self, key):
return key
self.assertRaises(Exc, d.update, FailingUserDict())
class FailingUserDict:
def keys(self):
class BogonIter:
def __init__(self):
self.i = ord('a')
def __iter__(self):
return self
def __next__(self):
if self.i <= ord('z'):
rtn = chr(self.i)
self.i += 1
return rtn
raise StopIteration
return BogonIter()
def __getitem__(self, key):
raise Exc
self.assertRaises(Exc, d.update, FailingUserDict())
class badseq(object):
def __iter__(self):
return self
def __next__(self):
raise Exc()
self.assertRaises(Exc, {}.update, badseq())
self.assertRaises(ValueError, {}.update, [(1, 2, 3)])
def test_fromkeys(self):
self.assertEqual(dict.fromkeys('abc'), {'a':None, 'b':None, 'c':None})
d = {}
self.assertIsNot(d.fromkeys('abc'), d)
self.assertEqual(d.fromkeys('abc'), {'a':None, 'b':None, 'c':None})
self.assertEqual(d.fromkeys((4,5),0), {4:0, 5:0})
self.assertEqual(d.fromkeys([]), {})
def g():
yield 1
self.assertEqual(d.fromkeys(g()), {1:None})
self.assertRaises(TypeError, {}.fromkeys, 3)
class dictlike(dict): pass
self.assertEqual(dictlike.fromkeys('a'), {'a':None})
self.assertEqual(dictlike().fromkeys('a'), {'a':None})
self.assertIsInstance(dictlike.fromkeys('a'), dictlike)
self.assertIsInstance(dictlike().fromkeys('a'), dictlike)
class mydict(dict):
def __new__(cls):
return collections.UserDict()
ud = mydict.fromkeys('ab')
self.assertEqual(ud, {'a':None, 'b':None})
self.assertIsInstance(ud, collections.UserDict)
self.assertRaises(TypeError, dict.fromkeys)
class Exc(Exception): pass
class baddict1(dict):
def __init__(self):
raise Exc()
self.assertRaises(Exc, baddict1.fromkeys, [1])
class BadSeq(object):
def __iter__(self):
return self
def __next__(self):
raise Exc()
self.assertRaises(Exc, dict.fromkeys, BadSeq())
class baddict2(dict):
def __setitem__(self, key, value):
raise Exc()
self.assertRaises(Exc, baddict2.fromkeys, [1])
# test fast path for dictionary inputs
d = dict(zip(range(6), range(6)))
self.assertEqual(dict.fromkeys(d, 0), dict(zip(range(6), [0]*6)))
class baddict3(dict):
def __new__(cls):
return d
d = {i : i for i in range(10)}
res = d.copy()
res.update(a=None, b=None, c=None)
self.assertEqual(baddict3.fromkeys({"a", "b", "c"}), res)
def test_copy(self):
d = {1: 1, 2: 2, 3: 3}
self.assertIsNot(d.copy(), d)
self.assertEqual(d.copy(), d)
self.assertEqual(d.copy(), {1: 1, 2: 2, 3: 3})
copy = d.copy()
d[4] = 4
self.assertNotEqual(copy, d)
self.assertEqual({}.copy(), {})
self.assertRaises(TypeError, d.copy, None)
def test_copy_fuzz(self):
for dict_size in [10, 100, 1000, 10000, 100000]:
dict_size = random.randrange(
dict_size // 2, dict_size + dict_size // 2)
with self.subTest(dict_size=dict_size):
d = {}
for i in range(dict_size):
d[i] = i
d2 = d.copy()
self.assertIsNot(d2, d)
self.assertEqual(d, d2)
d2['key'] = 'value'
self.assertNotEqual(d, d2)
self.assertEqual(len(d2), len(d) + 1)
def test_copy_maintains_tracking(self):
class A:
pass
key = A()
for d in ({}, {'a': 1}, {key: 'val'}):
d2 = d.copy()
self.assertEqual(gc.is_tracked(d), gc.is_tracked(d2))
def test_copy_noncompact(self):
# Dicts don't compact themselves on del/pop operations.
# Copy will use a slow merging strategy that produces
# a compacted copy when roughly 33% of dict is a non-used
# keys-space (to optimize memory footprint).
# In this test we want to hit the slow/compacting
# branch of dict.copy() and make sure it works OK.
d = {k: k for k in range(1000)}
for k in range(950):
del d[k]
d2 = d.copy()
self.assertEqual(d2, d)
def test_get(self):
d = {}
self.assertIs(d.get('c'), None)
self.assertEqual(d.get('c', 3), 3)
d = {'a': 1, 'b': 2}
self.assertIs(d.get('c'), None)
self.assertEqual(d.get('c', 3), 3)
self.assertEqual(d.get('a'), 1)
self.assertEqual(d.get('a', 3), 1)
self.assertRaises(TypeError, d.get)
self.assertRaises(TypeError, d.get, None, None, None)
def test_setdefault(self):
# dict.setdefault()
d = {}
self.assertIs(d.setdefault('key0'), None)
d.setdefault('key0', [])
self.assertIs(d.setdefault('key0'), None)
d.setdefault('key', []).append(3)
self.assertEqual(d['key'][0], 3)
d.setdefault('key', []).append(4)
self.assertEqual(len(d['key']), 2)
self.assertRaises(TypeError, d.setdefault)
class Exc(Exception): pass
class BadHash(object):
fail = False
def __hash__(self):
if self.fail:
raise Exc()
else:
return 42
x = BadHash()
d[x] = 42
x.fail = True
self.assertRaises(Exc, d.setdefault, x, [])
def test_setdefault_atomic(self):
# Issue #13521: setdefault() calls __hash__ and __eq__ only once.
class Hashed(object):
def __init__(self):
self.hash_count = 0
self.eq_count = 0
def __hash__(self):
self.hash_count += 1
return 42
def __eq__(self, other):
self.eq_count += 1
return id(self) == id(other)
hashed1 = Hashed()
y = {hashed1: 5}
hashed2 = Hashed()
y.setdefault(hashed2, [])
self.assertEqual(hashed1.hash_count, 1)
self.assertEqual(hashed2.hash_count, 1)
self.assertEqual(hashed1.eq_count + hashed2.eq_count, 1)
def test_setitem_atomic_at_resize(self):
class Hashed(object):
def __init__(self):
self.hash_count = 0
self.eq_count = 0
def __hash__(self):
self.hash_count += 1
return 42
def __eq__(self, other):
self.eq_count += 1
return id(self) == id(other)
hashed1 = Hashed()
# 5 items
y = {hashed1: 5, 0: 0, 1: 1, 2: 2, 3: 3}
hashed2 = Hashed()
# 6th item forces a resize
y[hashed2] = []
self.assertEqual(hashed1.hash_count, 1)
self.assertEqual(hashed2.hash_count, 1)
self.assertEqual(hashed1.eq_count + hashed2.eq_count, 1)
def test_popitem(self):
# dict.popitem()
for copymode in -1, +1:
# -1: b has same structure as a
# +1: b is a.copy()
for log2size in range(12):
size = 2**log2size
a = {}
b = {}
for i in range(size):
a[repr(i)] = i
if copymode < 0:
b[repr(i)] = i
if copymode > 0:
b = a.copy()
for i in range(size):
ka, va = ta = a.popitem()
self.assertEqual(va, int(ka))
kb, vb = tb = b.popitem()
self.assertEqual(vb, int(kb))
self.assertFalse(copymode < 0 and ta != tb)
self.assertFalse(a)
self.assertFalse(b)
d = {}
self.assertRaises(KeyError, d.popitem)
def test_pop(self):
# Tests for pop with specified key
d = {}
k, v = 'abc', 'def'
d[k] = v
self.assertRaises(KeyError, d.pop, 'ghi')
self.assertEqual(d.pop(k), v)
self.assertEqual(len(d), 0)
self.assertRaises(KeyError, d.pop, k)
self.assertEqual(d.pop(k, v), v)
d[k] = v
self.assertEqual(d.pop(k, 1), v)
self.assertRaises(TypeError, d.pop)
class Exc(Exception): pass
class BadHash(object):
fail = False
def __hash__(self):
if self.fail:
raise Exc()
else:
return 42
x = BadHash()
d[x] = 42
x.fail = True
self.assertRaises(Exc, d.pop, x)
def test_mutating_iteration(self):
# changing dict size during iteration
d = {}
d[1] = 1
with self.assertRaises(RuntimeError):
for i in d:
d[i+1] = 1
def test_mutating_lookup(self):
# changing dict during a lookup (issue #14417)
class NastyKey:
mutate_dict = None
def __init__(self, value):
self.value = value
def __hash__(self):
# hash collision!
return 1
def __eq__(self, other):
if NastyKey.mutate_dict:
mydict, key = NastyKey.mutate_dict
NastyKey.mutate_dict = None
del mydict[key]
return self.value == other.value
key1 = NastyKey(1)
key2 = NastyKey(2)
d = {key1: 1}
NastyKey.mutate_dict = (d, key1)
d[key2] = 2
self.assertEqual(d, {key2: 2})
def test_repr(self):
d = {}
self.assertEqual(repr(d), '{}')
d[1] = 2
self.assertEqual(repr(d), '{1: 2}')
d = {}
d[1] = d
self.assertEqual(repr(d), '{1: {...}}')
class Exc(Exception): pass
class BadRepr(object):
def __repr__(self):
raise Exc()
d = {1: BadRepr()}
self.assertRaises(Exc, repr, d)
@unittest.skipUnless(cosmo.MODE == "dbg", "disabled recursion checking")
def test_repr_deep(self):
d = {}
for i in range(sys.getrecursionlimit() + 100):
d = {1: d}
self.assertRaises(RecursionError, repr, d)
def test_eq(self):
self.assertEqual({}, {})
self.assertEqual({1: 2}, {1: 2})
class Exc(Exception): pass
class BadCmp(object):
def __eq__(self, other):
raise Exc()
def __hash__(self):
return 1
d1 = {BadCmp(): 1}
d2 = {1: 1}
with self.assertRaises(Exc):
d1 == d2
def test_keys_contained(self):
self.helper_keys_contained(lambda x: x.keys())
self.helper_keys_contained(lambda x: x.items())
def helper_keys_contained(self, fn):
# Test rich comparisons against dict key views, which should behave the
# same as sets.
empty = fn(dict())
empty2 = fn(dict())
smaller = fn({1:1, 2:2})
larger = fn({1:1, 2:2, 3:3})
larger2 = fn({1:1, 2:2, 3:3})
larger3 = fn({4:1, 2:2, 3:3})
self.assertTrue(smaller < larger)
self.assertTrue(smaller <= larger)
self.assertTrue(larger > smaller)
self.assertTrue(larger >= smaller)
self.assertFalse(smaller >= larger)
self.assertFalse(smaller > larger)
self.assertFalse(larger <= smaller)
self.assertFalse(larger < smaller)
self.assertFalse(smaller < larger3)
self.assertFalse(smaller <= larger3)
self.assertFalse(larger3 > smaller)
self.assertFalse(larger3 >= smaller)
# Inequality strictness
self.assertTrue(larger2 >= larger)
self.assertTrue(larger2 <= larger)
self.assertFalse(larger2 > larger)
self.assertFalse(larger2 < larger)
self.assertTrue(larger == larger2)
self.assertTrue(smaller != larger)
# There is an optimization on the zero-element case.
self.assertTrue(empty == empty2)
self.assertFalse(empty != empty2)
self.assertFalse(empty == smaller)
self.assertTrue(empty != smaller)
# With the same size, an elementwise compare happens
self.assertTrue(larger != larger3)
self.assertFalse(larger == larger3)
def test_errors_in_view_containment_check(self):
class C:
def __eq__(self, other):
raise RuntimeError
d1 = {1: C()}
d2 = {1: C()}
with self.assertRaises(RuntimeError):
d1.items() == d2.items()
with self.assertRaises(RuntimeError):
d1.items() != d2.items()
with self.assertRaises(RuntimeError):
d1.items() <= d2.items()
with self.assertRaises(RuntimeError):
d1.items() >= d2.items()
d3 = {1: C(), 2: C()}
with self.assertRaises(RuntimeError):
d2.items() < d3.items()
with self.assertRaises(RuntimeError):
d3.items() > d2.items()
def test_dictview_set_operations_on_keys(self):
k1 = {1:1, 2:2}.keys()
k2 = {1:1, 2:2, 3:3}.keys()
k3 = {4:4}.keys()
self.assertEqual(k1 - k2, set())
self.assertEqual(k1 - k3, {1,2})
self.assertEqual(k2 - k1, {3})
self.assertEqual(k3 - k1, {4})
self.assertEqual(k1 & k2, {1,2})
self.assertEqual(k1 & k3, set())
self.assertEqual(k1 | k2, {1,2,3})
self.assertEqual(k1 ^ k2, {3})
self.assertEqual(k1 ^ k3, {1,2,4})
def test_dictview_set_operations_on_items(self):
k1 = {1:1, 2:2}.items()
k2 = {1:1, 2:2, 3:3}.items()
k3 = {4:4}.items()
self.assertEqual(k1 - k2, set())
self.assertEqual(k1 - k3, {(1,1), (2,2)})
self.assertEqual(k2 - k1, {(3,3)})
self.assertEqual(k3 - k1, {(4,4)})
self.assertEqual(k1 & k2, {(1,1), (2,2)})
self.assertEqual(k1 & k3, set())
self.assertEqual(k1 | k2, {(1,1), (2,2), (3,3)})
self.assertEqual(k1 ^ k2, {(3,3)})
self.assertEqual(k1 ^ k3, {(1,1), (2,2), (4,4)})
def test_dictview_mixed_set_operations(self):
# Just a few for .keys()
self.assertTrue({1:1}.keys() == {1})
self.assertTrue({1} == {1:1}.keys())
self.assertEqual({1:1}.keys() | {2}, {1, 2})
self.assertEqual({2} | {1:1}.keys(), {1, 2})
# And a few for .items()
self.assertTrue({1:1}.items() == {(1,1)})
self.assertTrue({(1,1)} == {1:1}.items())
self.assertEqual({1:1}.items() | {2}, {(1,1), 2})
self.assertEqual({2} | {1:1}.items(), {(1,1), 2})
def test_missing(self):
# Make sure dict doesn't have a __missing__ method
self.assertFalse(hasattr(dict, "__missing__"))
self.assertFalse(hasattr({}, "__missing__"))
# Test several cases:
# (D) subclass defines __missing__ method returning a value
# (E) subclass defines __missing__ method raising RuntimeError
# (F) subclass sets __missing__ instance variable (no effect)
# (G) subclass doesn't define __missing__ at all
class D(dict):
def __missing__(self, key):
return 42
d = D({1: 2, 3: 4})
self.assertEqual(d[1], 2)
self.assertEqual(d[3], 4)
self.assertNotIn(2, d)
self.assertNotIn(2, d.keys())
self.assertEqual(d[2], 42)
class E(dict):
def __missing__(self, key):
raise RuntimeError(key)
e = E()
with self.assertRaises(RuntimeError) as c:
e[42]
self.assertEqual(c.exception.args, (42,))
class F(dict):
def __init__(self):
# An instance variable __missing__ should have no effect
self.__missing__ = lambda key: None
f = F()
with self.assertRaises(KeyError) as c:
f[42]
self.assertEqual(c.exception.args, (42,))
class G(dict):
pass
g = G()
with self.assertRaises(KeyError) as c:
g[42]
self.assertEqual(c.exception.args, (42,))
def test_tuple_keyerror(self):
# SF #1576657
d = {}
with self.assertRaises(KeyError) as c:
d[(1,)]
self.assertEqual(c.exception.args, ((1,),))
def test_bad_key(self):
# Dictionary lookups should fail if __eq__() raises an exception.
class CustomException(Exception):
pass
class BadDictKey:
def __hash__(self):
return hash(self.__class__)
def __eq__(self, other):
if isinstance(other, self.__class__):
raise CustomException
return other
d = {}
x1 = BadDictKey()
x2 = BadDictKey()
d[x1] = 1
for stmt in ['d[x2] = 2',
'z = d[x2]',
'x2 in d',
'd.get(x2)',
'd.setdefault(x2, 42)',
'd.pop(x2)',
'd.update({x2: 2})']:
with self.assertRaises(CustomException):
exec(stmt, locals())
def test_resize1(self):
# Dict resizing bug, found by Jack Jansen in 2.2 CVS development.
# This version got an assert failure in debug build, infinite loop in
# release build. Unfortunately, provoking this kind of stuff requires
# a mix of inserts and deletes hitting exactly the right hash codes in
# exactly the right order, and I can't think of a randomized approach
# that would be *likely* to hit a failing case in reasonable time.
d = {}
for i in range(5):
d[i] = i
for i in range(5):
del d[i]
for i in range(5, 9): # i==8 was the problem
d[i] = i
def test_resize2(self):
# Another dict resizing bug (SF bug #1456209).
# This caused Segmentation faults or Illegal instructions.
class X(object):
def __hash__(self):
return 5
def __eq__(self, other):
if resizing:
d.clear()
return False
d = {}
resizing = False
d[X()] = 1
d[X()] = 2
d[X()] = 3
d[X()] = 4
d[X()] = 5
# now trigger a resize
resizing = True
d[9] = 6
def test_empty_presized_dict_in_freelist(self):
# Bug #3537: if an empty but presized dict with a size larger
# than 7 was in the freelist, it triggered an assertion failure
with self.assertRaises(ZeroDivisionError):
d = {'a': 1 // 0, 'b': None, 'c': None, 'd': None, 'e': None,
'f': None, 'g': None, 'h': None}
d = {}
def test_container_iterator(self):
# Bug #3680: tp_traverse was not implemented for dictiter and
# dictview objects.
class C(object):
pass
views = (dict.items, dict.values, dict.keys)
for v in views:
obj = C()
ref = weakref.ref(obj)
container = {obj: 1}
obj.v = v(container)
obj.x = iter(obj.v)
del obj, container
gc.collect()
self.assertIs(ref(), None, "Cycle was not collected")
def _not_tracked(self, t):
# Nested containers can take several collections to untrack
gc.collect()
gc.collect()
self.assertFalse(gc.is_tracked(t), t)
def _tracked(self, t):
self.assertTrue(gc.is_tracked(t), t)
gc.collect()
gc.collect()
self.assertTrue(gc.is_tracked(t), t)
@support.cpython_only
def test_track_literals(self):
# Test GC-optimization of dict literals
x, y, z, w = 1.5, "a", (1, None), []
self._not_tracked({})
self._not_tracked({x:(), y:x, z:1})
self._not_tracked({1: "a", "b": 2})
self._not_tracked({1: 2, (None, True, False, ()): int})
self._not_tracked({1: object()})
# Dicts with mutable elements are always tracked, even if those
# elements are not tracked right now.
self._tracked({1: []})
self._tracked({1: ([],)})
self._tracked({1: {}})
self._tracked({1: set()})
@support.cpython_only
def test_track_dynamic(self):
# Test GC-optimization of dynamically-created dicts
class MyObject(object):
pass
x, y, z, w, o = 1.5, "a", (1, object()), [], MyObject()
d = dict()
self._not_tracked(d)
d[1] = "a"
self._not_tracked(d)
d[y] = 2
self._not_tracked(d)
d[z] = 3
self._not_tracked(d)
self._not_tracked(d.copy())
d[4] = w
self._tracked(d)
self._tracked(d.copy())
d[4] = None
self._not_tracked(d)
self._not_tracked(d.copy())
# dd isn't tracked right now, but it may mutate and therefore d
# which contains it must be tracked.
d = dict()
dd = dict()
d[1] = dd
self._not_tracked(dd)
self._tracked(d)
dd[1] = d
self._tracked(dd)
d = dict.fromkeys([x, y, z])
self._not_tracked(d)
dd = dict()
dd.update(d)
self._not_tracked(dd)
d = dict.fromkeys([x, y, z, o])
self._tracked(d)
dd = dict()
dd.update(d)
self._tracked(dd)
d = dict(x=x, y=y, z=z)
self._not_tracked(d)
d = dict(x=x, y=y, z=z, w=w)
self._tracked(d)
d = dict()
d.update(x=x, y=y, z=z)
self._not_tracked(d)
d.update(w=w)
self._tracked(d)
d = dict([(x, y), (z, 1)])
self._not_tracked(d)
d = dict([(x, y), (z, w)])
self._tracked(d)
d = dict()
d.update([(x, y), (z, 1)])
self._not_tracked(d)
d.update([(x, y), (z, w)])
self._tracked(d)
@support.cpython_only
def test_track_subtypes(self):
# Dict subtypes are always tracked
class MyDict(dict):
pass
self._tracked(MyDict())
def make_shared_key_dict(self, n):
class C:
pass
dicts = []
for i in range(n):
a = C()
a.x, a.y, a.z = 1, 2, 3
dicts.append(a.__dict__)
return dicts
@support.cpython_only
def test_splittable_setdefault(self):
"""split table must be combined when setdefault()
breaks insertion order"""
a, b = self.make_shared_key_dict(2)
a['a'] = 1
size_a = sys.getsizeof(a)
a['b'] = 2
b.setdefault('b', 2)
size_b = sys.getsizeof(b)
b['a'] = 1
self.assertGreater(size_b, size_a)
self.assertEqual(list(a), ['x', 'y', 'z', 'a', 'b'])
self.assertEqual(list(b), ['x', 'y', 'z', 'b', 'a'])
@support.cpython_only
def test_splittable_del(self):
"""split table must be combined when del d[k]"""
a, b = self.make_shared_key_dict(2)
orig_size = sys.getsizeof(a)
del a['y'] # split table is combined
with self.assertRaises(KeyError):
del a['y']
self.assertGreater(sys.getsizeof(a), orig_size)
self.assertEqual(list(a), ['x', 'z'])
self.assertEqual(list(b), ['x', 'y', 'z'])
# Two dicts have different insertion order.
a['y'] = 42
self.assertEqual(list(a), ['x', 'z', 'y'])
self.assertEqual(list(b), ['x', 'y', 'z'])
@support.cpython_only
def test_splittable_pop(self):
"""split table must be combined when d.pop(k)"""
a, b = self.make_shared_key_dict(2)
orig_size = sys.getsizeof(a)
a.pop('y') # split table is combined
with self.assertRaises(KeyError):
a.pop('y')
self.assertGreater(sys.getsizeof(a), orig_size)
self.assertEqual(list(a), ['x', 'z'])
self.assertEqual(list(b), ['x', 'y', 'z'])
# Two dicts have different insertion order.
a['y'] = 42
self.assertEqual(list(a), ['x', 'z', 'y'])
self.assertEqual(list(b), ['x', 'y', 'z'])
@support.cpython_only
def test_splittable_pop_pending(self):
"""pop a pending key in a splitted table should not crash"""
a, b = self.make_shared_key_dict(2)
a['a'] = 4
with self.assertRaises(KeyError):
b.pop('a')
@support.cpython_only
def test_splittable_popitem(self):
"""split table must be combined when d.popitem()"""
a, b = self.make_shared_key_dict(2)
orig_size = sys.getsizeof(a)
item = a.popitem() # split table is combined
self.assertEqual(item, ('z', 3))
with self.assertRaises(KeyError):
del a['z']
self.assertGreater(sys.getsizeof(a), orig_size)
self.assertEqual(list(a), ['x', 'y'])
self.assertEqual(list(b), ['x', 'y', 'z'])
@support.cpython_only
def test_splittable_setattr_after_pop(self):
"""setattr() must not convert combined table into split table."""
# Issue 28147
import _testcapi
class C:
pass
a = C()
a.a = 1
self.assertTrue(_testcapi.dict_hassplittable(a.__dict__))
# dict.pop() convert it to combined table
a.__dict__.pop('a')
self.assertFalse(_testcapi.dict_hassplittable(a.__dict__))
# But C should not convert a.__dict__ to split table again.
a.a = 1
self.assertFalse(_testcapi.dict_hassplittable(a.__dict__))
# Same for popitem()
a = C()
a.a = 2
self.assertTrue(_testcapi.dict_hassplittable(a.__dict__))
a.__dict__.popitem()
self.assertFalse(_testcapi.dict_hassplittable(a.__dict__))
a.a = 3
self.assertFalse(_testcapi.dict_hassplittable(a.__dict__))
def test_iterator_pickling(self):
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
data = {1:"a", 2:"b", 3:"c"}
it = iter(data)
d = pickle.dumps(it, proto)
it = pickle.loads(d)
self.assertEqual(sorted(it), sorted(data))
it = pickle.loads(d)
try:
drop = next(it)
except StopIteration:
continue
d = pickle.dumps(it, proto)
it = pickle.loads(d)
del data[drop]
self.assertEqual(sorted(it), sorted(data))
def test_itemiterator_pickling(self):
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
data = {1:"a", 2:"b", 3:"c"}
# dictviews aren't picklable, only their iterators
itorg = iter(data.items())
d = pickle.dumps(itorg, proto)
it = pickle.loads(d)
# note that the type of the unpickled iterator
# is not necessarily the same as the original. It is
# merely an object supporting the iterator protocol, yielding
# the same objects as the original one.
# self.assertEqual(type(itorg), type(it))
self.assertIsInstance(it, collections.abc.Iterator)
self.assertEqual(dict(it), data)
it = pickle.loads(d)
drop = next(it)
d = pickle.dumps(it, proto)
it = pickle.loads(d)
del data[drop[0]]
self.assertEqual(dict(it), data)
def test_valuesiterator_pickling(self):
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
data = {1:"a", 2:"b", 3:"c"}
# data.values() isn't picklable, only its iterator
it = iter(data.values())
d = pickle.dumps(it, proto)
it = pickle.loads(d)
self.assertEqual(sorted(list(it)), sorted(list(data.values())))
it = pickle.loads(d)
drop = next(it)
d = pickle.dumps(it, proto)
it = pickle.loads(d)
values = list(it) + [drop]
self.assertEqual(sorted(values), sorted(list(data.values())))
def test_instance_dict_getattr_str_subclass(self):
class Foo:
def __init__(self, msg):
self.msg = msg
f = Foo('123')
class _str(str):
pass
self.assertEqual(f.msg, getattr(f, _str('msg')))
self.assertEqual(f.msg, f.__dict__[_str('msg')])
def test_object_set_item_single_instance_non_str_key(self):
class Foo: pass
f = Foo()
f.__dict__[1] = 1
f.a = 'a'
self.assertEqual(f.__dict__, {1:1, 'a':'a'})
def check_reentrant_insertion(self, mutate):
# This object will trigger mutation of the dict when replaced
# by another value. Note this relies on refcounting: the test
# won't achieve its purpose on fully-GCed Python implementations.
class Mutating:
def __del__(self):
mutate(d)
d = {k: Mutating() for k in 'abcdefghijklmnopqr'}
for k in list(d):
d[k] = k
def test_reentrant_insertion(self):
# Reentrant insertion shouldn't crash (see issue #22653)
def mutate(d):
d['b'] = 5
self.check_reentrant_insertion(mutate)
def mutate(d):
d.update(self.__dict__)
d.clear()
self.check_reentrant_insertion(mutate)
def mutate(d):
while d:
d.popitem()
self.check_reentrant_insertion(mutate)
def test_merge_and_mutate(self):
class X:
def __hash__(self):
return 0
def __eq__(self, o):
other.clear()
return False
l = [(i,0) for i in range(1, 1337)]
other = dict(l)
other[X()] = 0
d = {X(): 0, 1: 1}
self.assertRaises(RuntimeError, d.update, other)
def test_free_after_iterating(self):
support.check_free_after_iterating(self, iter, dict)
support.check_free_after_iterating(self, lambda d: iter(d.keys()), dict)
support.check_free_after_iterating(self, lambda d: iter(d.values()), dict)
support.check_free_after_iterating(self, lambda d: iter(d.items()), dict)
def test_equal_operator_modifying_operand(self):
# test fix for seg fault reported in issue 27945 part 3.
class X():
def __del__(self):
dict_b.clear()
def __eq__(self, other):
dict_a.clear()
return True
def __hash__(self):
return 13
dict_a = {X(): 0}
dict_b = {X(): X()}
self.assertTrue(dict_a == dict_b)
def test_fromkeys_operator_modifying_dict_operand(self):
# test fix for seg fault reported in issue 27945 part 4a.
class X(int):
def __hash__(self):
return 13
def __eq__(self, other):
if len(d) > 1:
d.clear()
return False
d = {} # this is required to exist so that d can be constructed!
d = {X(1): 1, X(2): 2}
try:
dict.fromkeys(d) # shouldn't crash
except RuntimeError: # implementation defined
pass
def test_fromkeys_operator_modifying_set_operand(self):
# test fix for seg fault reported in issue 27945 part 4b.
class X(int):
def __hash__(self):
return 13
def __eq__(self, other):
if len(d) > 1:
d.clear()
return False
d = {} # this is required to exist so that d can be constructed!
d = {X(1), X(2)}
try:
dict.fromkeys(d) # shouldn't crash
except RuntimeError: # implementation defined
pass
def test_dictitems_contains_use_after_free(self):
class X:
def __eq__(self, other):
d.clear()
return NotImplemented
d = {0: set()}
(0, X()) in d.items()
def test_init_use_after_free(self):
class X:
def __hash__(self):
pair[:] = []
return 13
pair = [X(), 123]
dict([pair])
def test_oob_indexing_dictiter_iternextitem(self):
class X(int):
def __del__(self):
d.clear()
d = {i: X(i) for i in range(8)}
def iter_and_mutate():
for result in d.items():
if result[0] == 2:
d[2] = None # free d[2] --> X(2).__del__ was called
self.assertRaises(RuntimeError, iter_and_mutate)
@support.cpython_only
def test_dict_copy_order(self):
# bpo-34320
od = collections.OrderedDict([('a', 1), ('b', 2)])
od.move_to_end('a')
expected = list(od.items())
copy = dict(od)
self.assertEqual(list(copy.items()), expected)
# dict subclass doesn't override __iter__
class CustomDict(dict):
pass
pairs = [('a', 1), ('b', 2), ('c', 3)]
d = CustomDict(pairs)
self.assertEqual(pairs, list(dict(d).items()))
class CustomReversedDict(dict):
def keys(self):
return reversed(list(dict.keys(self)))
__iter__ = keys
def items(self):
return reversed(dict.items(self))
d = CustomReversedDict(pairs)
self.assertEqual(pairs[::-1], list(dict(d).items()))
class CAPITest(unittest.TestCase):
# Test _PyDict_GetItem_KnownHash()
@support.cpython_only
def test_getitem_knownhash(self):
from _testcapi import dict_getitem_knownhash
d = {'x': 1, 'y': 2, 'z': 3}
self.assertEqual(dict_getitem_knownhash(d, 'x', hash('x')), 1)
self.assertEqual(dict_getitem_knownhash(d, 'y', hash('y')), 2)
self.assertEqual(dict_getitem_knownhash(d, 'z', hash('z')), 3)
# # TODO: Did this break? What did this do?
# (likely related to disabling BadInternalCall in #264)
# # not a dict
# # find the APE compilation mode, run this test in dbg only #
if cosmo.MODE == "dbg":
self.assertRaises(SystemError, dict_getitem_knownhash, [], 1, hash(1))
# key does not exist
self.assertRaises(KeyError, dict_getitem_knownhash, {}, 1, hash(1))
class Exc(Exception): pass
class BadEq:
def __eq__(self, other):
raise Exc
def __hash__(self):
return 7
k1, k2 = BadEq(), BadEq()
d = {k1: 1}
self.assertEqual(dict_getitem_knownhash(d, k1, hash(k1)), 1)
self.assertRaises(Exc, dict_getitem_knownhash, d, k2, hash(k2))
from test import mapping_tests
class GeneralMappingTests(mapping_tests.BasicTestMappingProtocol):
type2test = dict
class Dict(dict):
pass
class SubclassMappingTests(mapping_tests.BasicTestMappingProtocol):
type2test = Dict
if __name__ == "__main__":
unittest.main()
| 41,056 | 1,308 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/autotest.py | # This should be equivalent to running regrtest.py from the cmdline.
# It can be especially handy if you're in an interactive shell, e.g.,
# from test import autotest.
from test.libregrtest import main
main()
| 209 | 6 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_source_encoding.py | # -*- coding: koi8-r -*-
import unittest
from test.support import TESTFN, unlink, unload, rmtree, script_helper, captured_stdout
import importlib
import os
import sys
import subprocess
import tempfile
from encodings import cp1252
class MiscSourceEncodingTest(unittest.TestCase):
def test_pep263(self):
self.assertEqual(
"ðÉÔÏÎ".encode("utf-8"),
b'\xd0\x9f\xd0\xb8\xd1\x82\xd0\xbe\xd0\xbd'
)
self.assertEqual(
"\ð".encode("utf-8"),
b'\\\xd0\x9f'
)
def test_compilestring(self):
# see #1882
c = compile(b"\n# coding: utf-8\nu = '\xc3\xb3'\n", "dummy", "exec")
d = {}
exec(c, d)
self.assertEqual(d['u'], '\xf3')
def test_issue2301(self):
try:
compile(b"# coding: cp932\nprint '\x94\x4e'", "dummy", "exec")
except SyntaxError as v:
self.assertEqual(v.text, "print '\u5e74'\n")
else:
self.fail()
def test_issue4626(self):
c = compile("# coding=latin-1\n\u00c6 = '\u00c6'", "dummy", "exec")
d = {}
exec(c, d)
self.assertEqual(d['\xc6'], '\xc6')
def test_issue3297(self):
c = compile("a, b = '\U0001010F', '\\U0001010F'", "dummy", "exec")
d = {}
exec(c, d)
self.assertEqual(d['a'], d['b'])
self.assertEqual(len(d['a']), len(d['b']))
self.assertEqual(ascii(d['a']), ascii(d['b']))
def test_issue7820(self):
# Ensure that check_bom() restores all bytes in the right order if
# check_bom() fails in pydebug mode: a buffer starts with the first
# byte of a valid BOM, but next bytes are different
# one byte in common with the UTF-16-LE BOM
self.assertRaises(SyntaxError, eval, b'\xff\x20')
# two bytes in common with the UTF-8 BOM
self.assertRaises(SyntaxError, eval, b'\xef\xbb\x20')
def test_20731(self):
sub = subprocess.Popen([sys.executable,
os.path.join(os.path.dirname(__file__),
'coding20731.py')],
stderr=subprocess.PIPE)
err = sub.communicate()[1]
self.assertEqual(sub.returncode, 0)
self.assertNotIn(b'SyntaxError', err)
def test_error_message(self):
compile(b'# -*- coding: iso-8859-15 -*-\n', 'dummy', 'exec')
compile(b'\xef\xbb\xbf\n', 'dummy', 'exec')
compile(b'\xef\xbb\xbf# -*- coding: utf-8 -*-\n', 'dummy', 'exec')
with self.assertRaisesRegex(SyntaxError, 'fake'):
compile(b'# -*- coding: fake -*-\n', 'dummy', 'exec')
with self.assertRaisesRegex(SyntaxError, 'iso-8859-15'):
compile(b'\xef\xbb\xbf# -*- coding: iso-8859-15 -*-\n',
'dummy', 'exec')
with self.assertRaisesRegex(SyntaxError, 'BOM'):
compile(b'\xef\xbb\xbf# -*- coding: iso-8859-15 -*-\n',
'dummy', 'exec')
with self.assertRaisesRegex(SyntaxError, 'fake'):
compile(b'\xef\xbb\xbf# -*- coding: fake -*-\n', 'dummy', 'exec')
with self.assertRaisesRegex(SyntaxError, 'BOM'):
compile(b'\xef\xbb\xbf# -*- coding: fake -*-\n', 'dummy', 'exec')
def test_bad_coding(self):
module_name = 'bad_coding'
self.verify_bad_module(module_name)
def test_bad_coding2(self):
module_name = 'bad_coding2'
self.verify_bad_module(module_name)
def verify_bad_module(self, module_name):
self.assertRaises(SyntaxError, __import__, 'test.' + module_name)
path = os.path.dirname(__file__)
filename = os.path.join(path, module_name + '.py')
with open(filename, "rb") as fp:
bytes = fp.read()
self.assertRaises(SyntaxError, compile, bytes, filename, 'exec')
def test_exec_valid_coding(self):
d = {}
exec(b'# coding: cp949\na = "\xaa\xa7"\n', d)
self.assertEqual(d['a'], '\u3047')
def test_file_parse(self):
# issue1134: all encodings outside latin-1 and utf-8 fail on
# multiline strings and long lines (>512 columns)
unload(TESTFN)
filename = TESTFN + ".py"
f = open(filename, "w", encoding="cp1252")
sys.path.insert(0, os.curdir)
try:
with f:
f.write("# -*- coding: cp1252 -*-\n")
f.write("'''A short string\n")
f.write("'''\n")
f.write("'A very long string %s'\n" % ("X" * 1000))
importlib.invalidate_caches()
__import__(TESTFN)
finally:
del sys.path[0]
unlink(filename)
unlink(filename + "c")
unlink(filename + "o")
unload(TESTFN)
rmtree('__pycache__')
def test_error_from_string(self):
# See http://bugs.python.org/issue6289
input = "# coding: ascii\n\N{SNOWMAN}".encode('utf-8')
with self.assertRaises(SyntaxError) as c:
compile(input, "<string>", "exec")
expected = "'ascii' codec can't decode byte 0xe2 in position 16: " \
"ordinal not in range(128)"
self.assertTrue(c.exception.args[0].startswith(expected),
msg=c.exception.args[0])
class AbstractSourceEncodingTest:
def test_default_coding(self):
src = (b'print(ascii("\xc3\xa4"))\n')
self.check_script_output(src, br"'\xe4'")
def test_first_coding_line(self):
src = (b'#coding:iso8859-15\n'
b'print(ascii("\xc3\xa4"))\n')
self.check_script_output(src, br"'\xc3\u20ac'")
def test_second_coding_line(self):
src = (b'#\n'
b'#coding:iso8859-15\n'
b'print(ascii("\xc3\xa4"))\n')
self.check_script_output(src, br"'\xc3\u20ac'")
def test_third_coding_line(self):
# Only first two lines are tested for a magic comment.
src = (b'#\n'
b'#\n'
b'#coding:iso8859-15\n'
b'print(ascii("\xc3\xa4"))\n')
self.check_script_output(src, br"'\xe4'")
def test_double_coding_line(self):
# If the first line matches the second line is ignored.
src = (b'#coding:iso8859-15\n'
b'#coding:latin1\n'
b'print(ascii("\xc3\xa4"))\n')
self.check_script_output(src, br"'\xc3\u20ac'")
def test_double_coding_same_line(self):
src = (b'#coding:iso8859-15 coding:latin1\n'
b'print(ascii("\xc3\xa4"))\n')
self.check_script_output(src, br"'\xc3\u20ac'")
def test_first_non_utf8_coding_line(self):
src = (b'#coding:iso-8859-15 \xa4\n'
b'print(ascii("\xc3\xa4"))\n')
self.check_script_output(src, br"'\xc3\u20ac'")
def test_second_non_utf8_coding_line(self):
src = (b'\n'
b'#coding:iso-8859-15 \xa4\n'
b'print(ascii("\xc3\xa4"))\n')
self.check_script_output(src, br"'\xc3\u20ac'")
def test_utf8_bom(self):
src = (b'\xef\xbb\xbfprint(ascii("\xc3\xa4"))\n')
self.check_script_output(src, br"'\xe4'")
def test_utf8_bom_and_utf8_coding_line(self):
src = (b'\xef\xbb\xbf#coding:utf-8\n'
b'print(ascii("\xc3\xa4"))\n')
self.check_script_output(src, br"'\xe4'")
class BytesSourceEncodingTest(AbstractSourceEncodingTest, unittest.TestCase):
def check_script_output(self, src, expected):
with captured_stdout() as stdout:
exec(src)
out = stdout.getvalue().encode('latin1')
self.assertEqual(out.rstrip(), expected)
class FileSourceEncodingTest(AbstractSourceEncodingTest, unittest.TestCase):
def check_script_output(self, src, expected):
with tempfile.TemporaryDirectory() as tmpd:
fn = os.path.join(tmpd, 'test.py')
with open(fn, 'wb') as fp:
fp.write(src)
res = script_helper.assert_python_ok(fn)
self.assertEqual(res.out.rstrip(), expected)
if __name__ == "__main__":
unittest.main()
| 8,098 | 227 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/CP950.TXT | #
# Name: cp950 to Unicode table
# Unicode version: 2.0
# Table version: 2.01
# Table format: Format A
# Date: 1/7/2000
#
# Contact: [email protected]
#
# General notes: none
#
# Format: Three tab-separated columns
# Column #1 is the cp950 code (in hex)
# Column #2 is the Unicode (in hex as 0xXXXX)
# Column #3 is the Unicode name (follows a comment sign, '#')
#
# The entries are in cp950 order
#
00 0000
01 0001
02 0002
03 0003
04 0004
05 0005
06 0006
07 0007
08 0008
09 0009
0A 000A
0B 000B
0C 000C
0D 000D
0E 000E
0F 000F
10 0010
11 0011
12 0012
13 0013
14 0014
15 0015
16 0016
17 0017
18 0018
19 0019
1A 001A
1B 001B
1C 001C
1D 001D
1E 001E
1F 001F
20 0020
21 0021
22 0022
23 0023
24 0024
25 0025
26 0026
27 0027
28 0028
29 0029
2A 002A
2B 002B
2C 002C
2D 002D
2E 002E
2F 002F
30 0030
31 0031
32 0032
33 0033
34 0034
35 0035
36 0036
37 0037
38 0038
39 0039
3A 003A
3B 003B
3C 003C
3D 003D
3E 003E
3F 003F
40 0040
41 0041
42 0042
43 0043
44 0044
45 0045
46 0046
47 0047
48 0048
49 0049
4A 004A
4B 004B
4C 004C
4D 004D
4E 004E
4F 004F
50 0050
51 0051
52 0052
53 0053
54 0054
55 0055
56 0056
57 0057
58 0058
59 0059
5A 005A
5B 005B
5C 005C
5D 005D
5E 005E
5F 005F
60 0060
61 0061
62 0062
63 0063
64 0064
65 0065
66 0066
67 0067
68 0068
69 0069
6A 006A
6B 006B
6C 006C
6D 006D
6E 006E
6F 006F
70 0070
71 0071
72 0072
73 0073
74 0074
75 0075
76 0076
77 0077
78 0078
79 0079
7A 007A
7B 007B
7C 007C
7D 007D
7E 007E
7F 007F
80
81
82
83
84
85
86
87
88
89
8A
8B
8C
8D
8E
8F
90
91
92
93
94
95
96
97
98
99
9A
9B
9C
9D
9E
9F
A0
A1
A2
A3
A4
A5
A6
A7
A8
A9
AA
AB
AC
AD
AE
AF
B0
B1
B2
B3
B4
B5
B6
B7
B8
B9
BA
BB
BC
BD
BE
BF
C0
C1
C2
C3
C4
C5
C6
C7
C8
C9
CA
CB
CC
CD
CE
CF
D0
D1
D2
D3
D4
D5
D6
D7
D8
D9
DA
DB
DC
DD
DE
DF
E0
E1
E2
E3
E4
E5
E6
E7
E8
E9
EA
EB
EC
ED
EE
EF
F0
F1
F2
F3
F4
F5
F6
F7
F8
F9
FA
FB
FC
FD
FE
FF
A140 3000
A141 FF0C
A142 3001
A143 3002
A144 FF0E
A145 2027
A146 FF1B
A147 FF1A
A148 FF1F
A149 FF01
A14A FE30
A14B 2026
A14C 2025
A14D FE50
A14E FE51
A14F FE52
A150 00B7
A151 FE54
A152 FE55
A153 FE56
A154 FE57
A155 FF5C
A156 2013
A157 FE31
A158 2014
A159 FE33
A15A 2574
A15B FE34
A15C FE4F
A15D FF08
A15E FF09
A15F FE35
A160 FE36
A161 FF5B
A162 FF5D
A163 FE37
A164 FE38
A165 3014
A166 3015
A167 FE39
A168 FE3A
A169 3010
A16A 3011
A16B FE3B
A16C FE3C
A16D 300A
A16E 300B
A16F FE3D
A170 FE3E
A171 3008
A172 3009
A173 FE3F
A174 FE40
A175 300C
A176 300D
A177 FE41
A178 FE42
A179 300E
A17A 300F
A17B FE43
A17C FE44
A17D FE59
A17E FE5A
A1A1 FE5B
A1A2 FE5C
A1A3 FE5D
A1A4 FE5E
A1A5 2018
A1A6 2019
A1A7 201C
A1A8 201D
A1A9 301D
A1AA 301E
A1AB 2035
A1AC 2032
A1AD FF03
A1AE FF06
A1AF FF0A
A1B0 203B
A1B1 00A7
A1B2 3003
A1B3 25CB
A1B4 25CF
A1B5 25B3
A1B6 25B2
A1B7 25CE
A1B8 2606
A1B9 2605
A1BA 25C7
A1BB 25C6
A1BC 25A1
A1BD 25A0
A1BE 25BD
A1BF 25BC
A1C0 32A3
A1C1 2105
A1C2 00AF
A1C3 FFE3
A1C4 FF3F
A1C5 02CD
A1C6 FE49
A1C7 FE4A
A1C8 FE4D
A1C9 FE4E
A1CA FE4B
A1CB FE4C
A1CC FE5F
A1CD FE60
A1CE FE61
A1CF FF0B
A1D0 FF0D
A1D1 00D7
A1D2 00F7
A1D3 00B1
A1D4 221A
A1D5 FF1C
A1D6 FF1E
A1D7 FF1D
A1D8 2266
A1D9 2267
A1DA 2260
A1DB 221E
A1DC 2252
A1DD 2261
A1DE FE62
A1DF FE63
A1E0 FE64
A1E1 FE65
A1E2 FE66
A1E3 FF5E
A1E4 2229
A1E5 222A
A1E6 22A5
A1E7 2220
A1E8 221F
A1E9 22BF
A1EA 33D2
A1EB 33D1
A1EC 222B
A1ED 222E
A1EE 2235
A1EF 2234
A1F0 2640
A1F1 2642
A1F2 2295
A1F3 2299
A1F4 2191
A1F5 2193
A1F6 2190
A1F7 2192
A1F8 2196
A1F9 2197
A1FA 2199
A1FB 2198
A1FC 2225
A1FD 2223
A1FE FF0F
A240 FF3C
A241 2215
A242 FE68
A243 FF04
A244 FFE5
A245 3012
A246 FFE0
A247 FFE1
A248 FF05
A249 FF20
A24A 2103
A24B 2109
A24C FE69
A24D FE6A
A24E FE6B
A24F 33D5
A250 339C
A251 339D
A252 339E
A253 33CE
A254 33A1
A255 338E
A256 338F
A257 33C4
A258 00B0
A259 5159
A25A 515B
A25B 515E
A25C 515D
A25D 5161
A25E 5163
A25F 55E7
A260 74E9
A261 7CCE
A262 2581
A263 2582
A264 2583
A265 2584
A266 2585
A267 2586
A268 2587
A269 2588
A26A 258F
A26B 258E
A26C 258D
A26D 258C
A26E 258B
A26F 258A
A270 2589
A271 253C
A272 2534
A273 252C
A274 2524
A275 251C
A276 2594
A277 2500
A278 2502
A279 2595
A27A 250C
A27B 2510
A27C 2514
A27D 2518
A27E 256D
A2A1 256E
A2A2 2570
A2A3 256F
A2A4 2550
A2A5 255E
A2A6 256A
A2A7 2561
A2A8 25E2
A2A9 25E3
A2AA 25E5
A2AB 25E4
A2AC 2571
A2AD 2572
A2AE 2573
A2AF FF10
A2B0 FF11
A2B1 FF12
A2B2 FF13
A2B3 FF14
A2B4 FF15
A2B5 FF16
A2B6 FF17
A2B7 FF18
A2B8 FF19
A2B9 2160
A2BA 2161
A2BB 2162
A2BC 2163
A2BD 2164
A2BE 2165
A2BF 2166
A2C0 2167
A2C1 2168
A2C2 2169
A2C3 3021
A2C4 3022
A2C5 3023
A2C6 3024
A2C7 3025
A2C8 3026
A2C9 3027
A2CA 3028
A2CB 3029
A2CC 5341
A2CD 5344
A2CE 5345
A2CF FF21
A2D0 FF22
A2D1 FF23
A2D2 FF24
A2D3 FF25
A2D4 FF26
A2D5 FF27
A2D6 FF28
A2D7 FF29
A2D8 FF2A
A2D9 FF2B
A2DA FF2C
A2DB FF2D
A2DC FF2E
A2DD FF2F
A2DE FF30
A2DF FF31
A2E0 FF32
A2E1 FF33
A2E2 FF34
A2E3 FF35
A2E4 FF36
A2E5 FF37
A2E6 FF38
A2E7 FF39
A2E8 FF3A
A2E9 FF41
A2EA FF42
A2EB FF43
A2EC FF44
A2ED FF45
A2EE FF46
A2EF FF47
A2F0 FF48
A2F1 FF49
A2F2 FF4A
A2F3 FF4B
A2F4 FF4C
A2F5 FF4D
A2F6 FF4E
A2F7 FF4F
A2F8 FF50
A2F9 FF51
A2FA FF52
A2FB FF53
A2FC FF54
A2FD FF55
A2FE FF56
A340 FF57
A341 FF58
A342 FF59
A343 FF5A
A344 0391
A345 0392
A346 0393
A347 0394
A348 0395
A349 0396
A34A 0397
A34B 0398
A34C 0399
A34D 039A
A34E 039B
A34F 039C
A350 039D
A351 039E
A352 039F
A353 03A0
A354 03A1
A355 03A3
A356 03A4
A357 03A5
A358 03A6
A359 03A7
A35A 03A8
A35B 03A9
A35C 03B1
A35D 03B2
A35E 03B3
A35F 03B4
A360 03B5
A361 03B6
A362 03B7
A363 03B8
A364 03B9
A365 03BA
A366 03BB
A367 03BC
A368 03BD
A369 03BE
A36A 03BF
A36B 03C0
A36C 03C1
A36D 03C3
A36E 03C4
A36F 03C5
A370 03C6
A371 03C7
A372 03C8
A373 03C9
A374 3105
A375 3106
A376 3107
A377 3108
A378 3109
A379 310A
A37A 310B
A37B 310C
A37C 310D
A37D 310E
A37E 310F
A3A1 3110
A3A2 3111
A3A3 3112
A3A4 3113
A3A5 3114
A3A6 3115
A3A7 3116
A3A8 3117
A3A9 3118
A3AA 3119
A3AB 311A
A3AC 311B
A3AD 311C
A3AE 311D
A3AF 311E
A3B0 311F
A3B1 3120
A3B2 3121
A3B3 3122
A3B4 3123
A3B5 3124
A3B6 3125
A3B7 3126
A3B8 3127
A3B9 3128
A3BA 3129
A3BB 02D9
A3BC 02C9
A3BD 02CA
A3BE 02C7
A3BF 02CB
A3E1 20AC
A440 4E00
A441 4E59
A442 4E01
A443 4E03
A444 4E43
A445 4E5D
A446 4E86
A447 4E8C
A448 4EBA
A449 513F
A44A 5165
A44B 516B
A44C 51E0
A44D 5200
A44E 5201
A44F 529B
A450 5315
A451 5341
A452 535C
A453 53C8
A454 4E09
A455 4E0B
A456 4E08
A457 4E0A
A458 4E2B
A459 4E38
A45A 51E1
A45B 4E45
A45C 4E48
A45D 4E5F
A45E 4E5E
A45F 4E8E
A460 4EA1
A461 5140
A462 5203
A463 52FA
A464 5343
A465 53C9
A466 53E3
A467 571F
A468 58EB
A469 5915
A46A 5927
A46B 5973
A46C 5B50
A46D 5B51
A46E 5B53
A46F 5BF8
A470 5C0F
A471 5C22
A472 5C38
A473 5C71
A474 5DDD
A475 5DE5
A476 5DF1
A477 5DF2
A478 5DF3
A479 5DFE
A47A 5E72
A47B 5EFE
A47C 5F0B
A47D 5F13
A47E 624D
A4A1 4E11
A4A2 4E10
A4A3 4E0D
A4A4 4E2D
A4A5 4E30
A4A6 4E39
A4A7 4E4B
A4A8 5C39
A4A9 4E88
A4AA 4E91
A4AB 4E95
A4AC 4E92
A4AD 4E94
A4AE 4EA2
A4AF 4EC1
A4B0 4EC0
A4B1 4EC3
A4B2 4EC6
A4B3 4EC7
A4B4 4ECD
A4B5 4ECA
A4B6 4ECB
A4B7 4EC4
A4B8 5143
A4B9 5141
A4BA 5167
A4BB 516D
A4BC 516E
A4BD 516C
A4BE 5197
A4BF 51F6
A4C0 5206
A4C1 5207
A4C2 5208
A4C3 52FB
A4C4 52FE
A4C5 52FF
A4C6 5316
A4C7 5339
A4C8 5348
A4C9 5347
A4CA 5345
A4CB 535E
A4CC 5384
A4CD 53CB
A4CE 53CA
A4CF 53CD
A4D0 58EC
A4D1 5929
A4D2 592B
A4D3 592A
A4D4 592D
A4D5 5B54
A4D6 5C11
A4D7 5C24
A4D8 5C3A
A4D9 5C6F
A4DA 5DF4
A4DB 5E7B
A4DC 5EFF
A4DD 5F14
A4DE 5F15
A4DF 5FC3
A4E0 6208
A4E1 6236
A4E2 624B
A4E3 624E
A4E4 652F
A4E5 6587
A4E6 6597
A4E7 65A4
A4E8 65B9
A4E9 65E5
A4EA 66F0
A4EB 6708
A4EC 6728
A4ED 6B20
A4EE 6B62
A4EF 6B79
A4F0 6BCB
A4F1 6BD4
A4F2 6BDB
A4F3 6C0F
A4F4 6C34
A4F5 706B
A4F6 722A
A4F7 7236
A4F8 723B
A4F9 7247
A4FA 7259
A4FB 725B
A4FC 72AC
A4FD 738B
A4FE 4E19
A540 4E16
A541 4E15
A542 4E14
A543 4E18
A544 4E3B
A545 4E4D
A546 4E4F
A547 4E4E
A548 4EE5
A549 4ED8
A54A 4ED4
A54B 4ED5
A54C 4ED6
A54D 4ED7
A54E 4EE3
A54F 4EE4
A550 4ED9
A551 4EDE
A552 5145
A553 5144
A554 5189
A555 518A
A556 51AC
A557 51F9
A558 51FA
A559 51F8
A55A 520A
A55B 52A0
A55C 529F
A55D 5305
A55E 5306
A55F 5317
A560 531D
A561 4EDF
A562 534A
A563 5349
A564 5361
A565 5360
A566 536F
A567 536E
A568 53BB
A569 53EF
A56A 53E4
A56B 53F3
A56C 53EC
A56D 53EE
A56E 53E9
A56F 53E8
A570 53FC
A571 53F8
A572 53F5
A573 53EB
A574 53E6
A575 53EA
A576 53F2
A577 53F1
A578 53F0
A579 53E5
A57A 53ED
A57B 53FB
A57C 56DB
A57D 56DA
A57E 5916
A5A1 592E
A5A2 5931
A5A3 5974
A5A4 5976
A5A5 5B55
A5A6 5B83
A5A7 5C3C
A5A8 5DE8
A5A9 5DE7
A5AA 5DE6
A5AB 5E02
A5AC 5E03
A5AD 5E73
A5AE 5E7C
A5AF 5F01
A5B0 5F18
A5B1 5F17
A5B2 5FC5
A5B3 620A
A5B4 6253
A5B5 6254
A5B6 6252
A5B7 6251
A5B8 65A5
A5B9 65E6
A5BA 672E
A5BB 672C
A5BC 672A
A5BD 672B
A5BE 672D
A5BF 6B63
A5C0 6BCD
A5C1 6C11
A5C2 6C10
A5C3 6C38
A5C4 6C41
A5C5 6C40
A5C6 6C3E
A5C7 72AF
A5C8 7384
A5C9 7389
A5CA 74DC
A5CB 74E6
A5CC 7518
A5CD 751F
A5CE 7528
A5CF 7529
A5D0 7530
A5D1 7531
A5D2 7532
A5D3 7533
A5D4 758B
A5D5 767D
A5D6 76AE
A5D7 76BF
A5D8 76EE
A5D9 77DB
A5DA 77E2
A5DB 77F3
A5DC 793A
A5DD 79BE
A5DE 7A74
A5DF 7ACB
A5E0 4E1E
A5E1 4E1F
A5E2 4E52
A5E3 4E53
A5E4 4E69
A5E5 4E99
A5E6 4EA4
A5E7 4EA6
A5E8 4EA5
A5E9 4EFF
A5EA 4F09
A5EB 4F19
A5EC 4F0A
A5ED 4F15
A5EE 4F0D
A5EF 4F10
A5F0 4F11
A5F1 4F0F
A5F2 4EF2
A5F3 4EF6
A5F4 4EFB
A5F5 4EF0
A5F6 4EF3
A5F7 4EFD
A5F8 4F01
A5F9 4F0B
A5FA 5149
A5FB 5147
A5FC 5146
A5FD 5148
A5FE 5168
A640 5171
A641 518D
A642 51B0
A643 5217
A644 5211
A645 5212
A646 520E
A647 5216
A648 52A3
A649 5308
A64A 5321
A64B 5320
A64C 5370
A64D 5371
A64E 5409
A64F 540F
A650 540C
A651 540A
A652 5410
A653 5401
A654 540B
A655 5404
A656 5411
A657 540D
A658 5408
A659 5403
A65A 540E
A65B 5406
A65C 5412
A65D 56E0
A65E 56DE
A65F 56DD
A660 5733
A661 5730
A662 5728
A663 572D
A664 572C
A665 572F
A666 5729
A667 5919
A668 591A
A669 5937
A66A 5938
A66B 5984
A66C 5978
A66D 5983
A66E 597D
A66F 5979
A670 5982
A671 5981
A672 5B57
A673 5B58
A674 5B87
A675 5B88
A676 5B85
A677 5B89
A678 5BFA
A679 5C16
A67A 5C79
A67B 5DDE
A67C 5E06
A67D 5E76
A67E 5E74
A6A1 5F0F
A6A2 5F1B
A6A3 5FD9
A6A4 5FD6
A6A5 620E
A6A6 620C
A6A7 620D
A6A8 6210
A6A9 6263
A6AA 625B
A6AB 6258
A6AC 6536
A6AD 65E9
A6AE 65E8
A6AF 65EC
A6B0 65ED
A6B1 66F2
A6B2 66F3
A6B3 6709
A6B4 673D
A6B5 6734
A6B6 6731
A6B7 6735
A6B8 6B21
A6B9 6B64
A6BA 6B7B
A6BB 6C16
A6BC 6C5D
A6BD 6C57
A6BE 6C59
A6BF 6C5F
A6C0 6C60
A6C1 6C50
A6C2 6C55
A6C3 6C61
A6C4 6C5B
A6C5 6C4D
A6C6 6C4E
A6C7 7070
A6C8 725F
A6C9 725D
A6CA 767E
A6CB 7AF9
A6CC 7C73
A6CD 7CF8
A6CE 7F36
A6CF 7F8A
A6D0 7FBD
A6D1 8001
A6D2 8003
A6D3 800C
A6D4 8012
A6D5 8033
A6D6 807F
A6D7 8089
A6D8 808B
A6D9 808C
A6DA 81E3
A6DB 81EA
A6DC 81F3
A6DD 81FC
A6DE 820C
A6DF 821B
A6E0 821F
A6E1 826E
A6E2 8272
A6E3 827E
A6E4 866B
A6E5 8840
A6E6 884C
A6E7 8863
A6E8 897F
A6E9 9621
A6EA 4E32
A6EB 4EA8
A6EC 4F4D
A6ED 4F4F
A6EE 4F47
A6EF 4F57
A6F0 4F5E
A6F1 4F34
A6F2 4F5B
A6F3 4F55
A6F4 4F30
A6F5 4F50
A6F6 4F51
A6F7 4F3D
A6F8 4F3A
A6F9 4F38
A6FA 4F43
A6FB 4F54
A6FC 4F3C
A6FD 4F46
A6FE 4F63
A740 4F5C
A741 4F60
A742 4F2F
A743 4F4E
A744 4F36
A745 4F59
A746 4F5D
A747 4F48
A748 4F5A
A749 514C
A74A 514B
A74B 514D
A74C 5175
A74D 51B6
A74E 51B7
A74F 5225
A750 5224
A751 5229
A752 522A
A753 5228
A754 52AB
A755 52A9
A756 52AA
A757 52AC
A758 5323
A759 5373
A75A 5375
A75B 541D
A75C 542D
A75D 541E
A75E 543E
A75F 5426
A760 544E
A761 5427
A762 5446
A763 5443
A764 5433
A765 5448
A766 5442
A767 541B
A768 5429
A769 544A
A76A 5439
A76B 543B
A76C 5438
A76D 542E
A76E 5435
A76F 5436
A770 5420
A771 543C
A772 5440
A773 5431
A774 542B
A775 541F
A776 542C
A777 56EA
A778 56F0
A779 56E4
A77A 56EB
A77B 574A
A77C 5751
A77D 5740
A77E 574D
A7A1 5747
A7A2 574E
A7A3 573E
A7A4 5750
A7A5 574F
A7A6 573B
A7A7 58EF
A7A8 593E
A7A9 599D
A7AA 5992
A7AB 59A8
A7AC 599E
A7AD 59A3
A7AE 5999
A7AF 5996
A7B0 598D
A7B1 59A4
A7B2 5993
A7B3 598A
A7B4 59A5
A7B5 5B5D
A7B6 5B5C
A7B7 5B5A
A7B8 5B5B
A7B9 5B8C
A7BA 5B8B
A7BB 5B8F
A7BC 5C2C
A7BD 5C40
A7BE 5C41
A7BF 5C3F
A7C0 5C3E
A7C1 5C90
A7C2 5C91
A7C3 5C94
A7C4 5C8C
A7C5 5DEB
A7C6 5E0C
A7C7 5E8F
A7C8 5E87
A7C9 5E8A
A7CA 5EF7
A7CB 5F04
A7CC 5F1F
A7CD 5F64
A7CE 5F62
A7CF 5F77
A7D0 5F79
A7D1 5FD8
A7D2 5FCC
A7D3 5FD7
A7D4 5FCD
A7D5 5FF1
A7D6 5FEB
A7D7 5FF8
A7D8 5FEA
A7D9 6212
A7DA 6211
A7DB 6284
A7DC 6297
A7DD 6296
A7DE 6280
A7DF 6276
A7E0 6289
A7E1 626D
A7E2 628A
A7E3 627C
A7E4 627E
A7E5 6279
A7E6 6273
A7E7 6292
A7E8 626F
A7E9 6298
A7EA 626E
A7EB 6295
A7EC 6293
A7ED 6291
A7EE 6286
A7EF 6539
A7F0 653B
A7F1 6538
A7F2 65F1
A7F3 66F4
A7F4 675F
A7F5 674E
A7F6 674F
A7F7 6750
A7F8 6751
A7F9 675C
A7FA 6756
A7FB 675E
A7FC 6749
A7FD 6746
A7FE 6760
A840 6753
A841 6757
A842 6B65
A843 6BCF
A844 6C42
A845 6C5E
A846 6C99
A847 6C81
A848 6C88
A849 6C89
A84A 6C85
A84B 6C9B
A84C 6C6A
A84D 6C7A
A84E 6C90
A84F 6C70
A850 6C8C
A851 6C68
A852 6C96
A853 6C92
A854 6C7D
A855 6C83
A856 6C72
A857 6C7E
A858 6C74
A859 6C86
A85A 6C76
A85B 6C8D
A85C 6C94
A85D 6C98
A85E 6C82
A85F 7076
A860 707C
A861 707D
A862 7078
A863 7262
A864 7261
A865 7260
A866 72C4
A867 72C2
A868 7396
A869 752C
A86A 752B
A86B 7537
A86C 7538
A86D 7682
A86E 76EF
A86F 77E3
A870 79C1
A871 79C0
A872 79BF
A873 7A76
A874 7CFB
A875 7F55
A876 8096
A877 8093
A878 809D
A879 8098
A87A 809B
A87B 809A
A87C 80B2
A87D 826F
A87E 8292
A8A1 828B
A8A2 828D
A8A3 898B
A8A4 89D2
A8A5 8A00
A8A6 8C37
A8A7 8C46
A8A8 8C55
A8A9 8C9D
A8AA 8D64
A8AB 8D70
A8AC 8DB3
A8AD 8EAB
A8AE 8ECA
A8AF 8F9B
A8B0 8FB0
A8B1 8FC2
A8B2 8FC6
A8B3 8FC5
A8B4 8FC4
A8B5 5DE1
A8B6 9091
A8B7 90A2
A8B8 90AA
A8B9 90A6
A8BA 90A3
A8BB 9149
A8BC 91C6
A8BD 91CC
A8BE 9632
A8BF 962E
A8C0 9631
A8C1 962A
A8C2 962C
A8C3 4E26
A8C4 4E56
A8C5 4E73
A8C6 4E8B
A8C7 4E9B
A8C8 4E9E
A8C9 4EAB
A8CA 4EAC
A8CB 4F6F
A8CC 4F9D
A8CD 4F8D
A8CE 4F73
A8CF 4F7F
A8D0 4F6C
A8D1 4F9B
A8D2 4F8B
A8D3 4F86
A8D4 4F83
A8D5 4F70
A8D6 4F75
A8D7 4F88
A8D8 4F69
A8D9 4F7B
A8DA 4F96
A8DB 4F7E
A8DC 4F8F
A8DD 4F91
A8DE 4F7A
A8DF 5154
A8E0 5152
A8E1 5155
A8E2 5169
A8E3 5177
A8E4 5176
A8E5 5178
A8E6 51BD
A8E7 51FD
A8E8 523B
A8E9 5238
A8EA 5237
A8EB 523A
A8EC 5230
A8ED 522E
A8EE 5236
A8EF 5241
A8F0 52BE
A8F1 52BB
A8F2 5352
A8F3 5354
A8F4 5353
A8F5 5351
A8F6 5366
A8F7 5377
A8F8 5378
A8F9 5379
A8FA 53D6
A8FB 53D4
A8FC 53D7
A8FD 5473
A8FE 5475
A940 5496
A941 5478
A942 5495
A943 5480
A944 547B
A945 5477
A946 5484
A947 5492
A948 5486
A949 547C
A94A 5490
A94B 5471
A94C 5476
A94D 548C
A94E 549A
A94F 5462
A950 5468
A951 548B
A952 547D
A953 548E
A954 56FA
A955 5783
A956 5777
A957 576A
A958 5769
A959 5761
A95A 5766
A95B 5764
A95C 577C
A95D 591C
A95E 5949
A95F 5947
A960 5948
A961 5944
A962 5954
A963 59BE
A964 59BB
A965 59D4
A966 59B9
A967 59AE
A968 59D1
A969 59C6
A96A 59D0
A96B 59CD
A96C 59CB
A96D 59D3
A96E 59CA
A96F 59AF
A970 59B3
A971 59D2
A972 59C5
A973 5B5F
A974 5B64
A975 5B63
A976 5B97
A977 5B9A
A978 5B98
A979 5B9C
A97A 5B99
A97B 5B9B
A97C 5C1A
A97D 5C48
A97E 5C45
A9A1 5C46
A9A2 5CB7
A9A3 5CA1
A9A4 5CB8
A9A5 5CA9
A9A6 5CAB
A9A7 5CB1
A9A8 5CB3
A9A9 5E18
A9AA 5E1A
A9AB 5E16
A9AC 5E15
A9AD 5E1B
A9AE 5E11
A9AF 5E78
A9B0 5E9A
A9B1 5E97
A9B2 5E9C
A9B3 5E95
A9B4 5E96
A9B5 5EF6
A9B6 5F26
A9B7 5F27
A9B8 5F29
A9B9 5F80
A9BA 5F81
A9BB 5F7F
A9BC 5F7C
A9BD 5FDD
A9BE 5FE0
A9BF 5FFD
A9C0 5FF5
A9C1 5FFF
A9C2 600F
A9C3 6014
A9C4 602F
A9C5 6035
A9C6 6016
A9C7 602A
A9C8 6015
A9C9 6021
A9CA 6027
A9CB 6029
A9CC 602B
A9CD 601B
A9CE 6216
A9CF 6215
A9D0 623F
A9D1 623E
A9D2 6240
A9D3 627F
A9D4 62C9
A9D5 62CC
A9D6 62C4
A9D7 62BF
A9D8 62C2
A9D9 62B9
A9DA 62D2
A9DB 62DB
A9DC 62AB
A9DD 62D3
A9DE 62D4
A9DF 62CB
A9E0 62C8
A9E1 62A8
A9E2 62BD
A9E3 62BC
A9E4 62D0
A9E5 62D9
A9E6 62C7
A9E7 62CD
A9E8 62B5
A9E9 62DA
A9EA 62B1
A9EB 62D8
A9EC 62D6
A9ED 62D7
A9EE 62C6
A9EF 62AC
A9F0 62CE
A9F1 653E
A9F2 65A7
A9F3 65BC
A9F4 65FA
A9F5 6614
A9F6 6613
A9F7 660C
A9F8 6606
A9F9 6602
A9FA 660E
A9FB 6600
A9FC 660F
A9FD 6615
A9FE 660A
AA40 6607
AA41 670D
AA42 670B
AA43 676D
AA44 678B
AA45 6795
AA46 6771
AA47 679C
AA48 6773
AA49 6777
AA4A 6787
AA4B 679D
AA4C 6797
AA4D 676F
AA4E 6770
AA4F 677F
AA50 6789
AA51 677E
AA52 6790
AA53 6775
AA54 679A
AA55 6793
AA56 677C
AA57 676A
AA58 6772
AA59 6B23
AA5A 6B66
AA5B 6B67
AA5C 6B7F
AA5D 6C13
AA5E 6C1B
AA5F 6CE3
AA60 6CE8
AA61 6CF3
AA62 6CB1
AA63 6CCC
AA64 6CE5
AA65 6CB3
AA66 6CBD
AA67 6CBE
AA68 6CBC
AA69 6CE2
AA6A 6CAB
AA6B 6CD5
AA6C 6CD3
AA6D 6CB8
AA6E 6CC4
AA6F 6CB9
AA70 6CC1
AA71 6CAE
AA72 6CD7
AA73 6CC5
AA74 6CF1
AA75 6CBF
AA76 6CBB
AA77 6CE1
AA78 6CDB
AA79 6CCA
AA7A 6CAC
AA7B 6CEF
AA7C 6CDC
AA7D 6CD6
AA7E 6CE0
AAA1 7095
AAA2 708E
AAA3 7092
AAA4 708A
AAA5 7099
AAA6 722C
AAA7 722D
AAA8 7238
AAA9 7248
AAAA 7267
AAAB 7269
AAAC 72C0
AAAD 72CE
AAAE 72D9
AAAF 72D7
AAB0 72D0
AAB1 73A9
AAB2 73A8
AAB3 739F
AAB4 73AB
AAB5 73A5
AAB6 753D
AAB7 759D
AAB8 7599
AAB9 759A
AABA 7684
AABB 76C2
AABC 76F2
AABD 76F4
AABE 77E5
AABF 77FD
AAC0 793E
AAC1 7940
AAC2 7941
AAC3 79C9
AAC4 79C8
AAC5 7A7A
AAC6 7A79
AAC7 7AFA
AAC8 7CFE
AAC9 7F54
AACA 7F8C
AACB 7F8B
AACC 8005
AACD 80BA
AACE 80A5
AACF 80A2
AAD0 80B1
AAD1 80A1
AAD2 80AB
AAD3 80A9
AAD4 80B4
AAD5 80AA
AAD6 80AF
AAD7 81E5
AAD8 81FE
AAD9 820D
AADA 82B3
AADB 829D
AADC 8299
AADD 82AD
AADE 82BD
AADF 829F
AAE0 82B9
AAE1 82B1
AAE2 82AC
AAE3 82A5
AAE4 82AF
AAE5 82B8
AAE6 82A3
AAE7 82B0
AAE8 82BE
AAE9 82B7
AAEA 864E
AAEB 8671
AAEC 521D
AAED 8868
AAEE 8ECB
AAEF 8FCE
AAF0 8FD4
AAF1 8FD1
AAF2 90B5
AAF3 90B8
AAF4 90B1
AAF5 90B6
AAF6 91C7
AAF7 91D1
AAF8 9577
AAF9 9580
AAFA 961C
AAFB 9640
AAFC 963F
AAFD 963B
AAFE 9644
AB40 9642
AB41 96B9
AB42 96E8
AB43 9752
AB44 975E
AB45 4E9F
AB46 4EAD
AB47 4EAE
AB48 4FE1
AB49 4FB5
AB4A 4FAF
AB4B 4FBF
AB4C 4FE0
AB4D 4FD1
AB4E 4FCF
AB4F 4FDD
AB50 4FC3
AB51 4FB6
AB52 4FD8
AB53 4FDF
AB54 4FCA
AB55 4FD7
AB56 4FAE
AB57 4FD0
AB58 4FC4
AB59 4FC2
AB5A 4FDA
AB5B 4FCE
AB5C 4FDE
AB5D 4FB7
AB5E 5157
AB5F 5192
AB60 5191
AB61 51A0
AB62 524E
AB63 5243
AB64 524A
AB65 524D
AB66 524C
AB67 524B
AB68 5247
AB69 52C7
AB6A 52C9
AB6B 52C3
AB6C 52C1
AB6D 530D
AB6E 5357
AB6F 537B
AB70 539A
AB71 53DB
AB72 54AC
AB73 54C0
AB74 54A8
AB75 54CE
AB76 54C9
AB77 54B8
AB78 54A6
AB79 54B3
AB7A 54C7
AB7B 54C2
AB7C 54BD
AB7D 54AA
AB7E 54C1
ABA1 54C4
ABA2 54C8
ABA3 54AF
ABA4 54AB
ABA5 54B1
ABA6 54BB
ABA7 54A9
ABA8 54A7
ABA9 54BF
ABAA 56FF
ABAB 5782
ABAC 578B
ABAD 57A0
ABAE 57A3
ABAF 57A2
ABB0 57CE
ABB1 57AE
ABB2 5793
ABB3 5955
ABB4 5951
ABB5 594F
ABB6 594E
ABB7 5950
ABB8 59DC
ABB9 59D8
ABBA 59FF
ABBB 59E3
ABBC 59E8
ABBD 5A03
ABBE 59E5
ABBF 59EA
ABC0 59DA
ABC1 59E6
ABC2 5A01
ABC3 59FB
ABC4 5B69
ABC5 5BA3
ABC6 5BA6
ABC7 5BA4
ABC8 5BA2
ABC9 5BA5
ABCA 5C01
ABCB 5C4E
ABCC 5C4F
ABCD 5C4D
ABCE 5C4B
ABCF 5CD9
ABD0 5CD2
ABD1 5DF7
ABD2 5E1D
ABD3 5E25
ABD4 5E1F
ABD5 5E7D
ABD6 5EA0
ABD7 5EA6
ABD8 5EFA
ABD9 5F08
ABDA 5F2D
ABDB 5F65
ABDC 5F88
ABDD 5F85
ABDE 5F8A
ABDF 5F8B
ABE0 5F87
ABE1 5F8C
ABE2 5F89
ABE3 6012
ABE4 601D
ABE5 6020
ABE6 6025
ABE7 600E
ABE8 6028
ABE9 604D
ABEA 6070
ABEB 6068
ABEC 6062
ABED 6046
ABEE 6043
ABEF 606C
ABF0 606B
ABF1 606A
ABF2 6064
ABF3 6241
ABF4 62DC
ABF5 6316
ABF6 6309
ABF7 62FC
ABF8 62ED
ABF9 6301
ABFA 62EE
ABFB 62FD
ABFC 6307
ABFD 62F1
ABFE 62F7
AC40 62EF
AC41 62EC
AC42 62FE
AC43 62F4
AC44 6311
AC45 6302
AC46 653F
AC47 6545
AC48 65AB
AC49 65BD
AC4A 65E2
AC4B 6625
AC4C 662D
AC4D 6620
AC4E 6627
AC4F 662F
AC50 661F
AC51 6628
AC52 6631
AC53 6624
AC54 66F7
AC55 67FF
AC56 67D3
AC57 67F1
AC58 67D4
AC59 67D0
AC5A 67EC
AC5B 67B6
AC5C 67AF
AC5D 67F5
AC5E 67E9
AC5F 67EF
AC60 67C4
AC61 67D1
AC62 67B4
AC63 67DA
AC64 67E5
AC65 67B8
AC66 67CF
AC67 67DE
AC68 67F3
AC69 67B0
AC6A 67D9
AC6B 67E2
AC6C 67DD
AC6D 67D2
AC6E 6B6A
AC6F 6B83
AC70 6B86
AC71 6BB5
AC72 6BD2
AC73 6BD7
AC74 6C1F
AC75 6CC9
AC76 6D0B
AC77 6D32
AC78 6D2A
AC79 6D41
AC7A 6D25
AC7B 6D0C
AC7C 6D31
AC7D 6D1E
AC7E 6D17
ACA1 6D3B
ACA2 6D3D
ACA3 6D3E
ACA4 6D36
ACA5 6D1B
ACA6 6CF5
ACA7 6D39
ACA8 6D27
ACA9 6D38
ACAA 6D29
ACAB 6D2E
ACAC 6D35
ACAD 6D0E
ACAE 6D2B
ACAF 70AB
ACB0 70BA
ACB1 70B3
ACB2 70AC
ACB3 70AF
ACB4 70AD
ACB5 70B8
ACB6 70AE
ACB7 70A4
ACB8 7230
ACB9 7272
ACBA 726F
ACBB 7274
ACBC 72E9
ACBD 72E0
ACBE 72E1
ACBF 73B7
ACC0 73CA
ACC1 73BB
ACC2 73B2
ACC3 73CD
ACC4 73C0
ACC5 73B3
ACC6 751A
ACC7 752D
ACC8 754F
ACC9 754C
ACCA 754E
ACCB 754B
ACCC 75AB
ACCD 75A4
ACCE 75A5
ACCF 75A2
ACD0 75A3
ACD1 7678
ACD2 7686
ACD3 7687
ACD4 7688
ACD5 76C8
ACD6 76C6
ACD7 76C3
ACD8 76C5
ACD9 7701
ACDA 76F9
ACDB 76F8
ACDC 7709
ACDD 770B
ACDE 76FE
ACDF 76FC
ACE0 7707
ACE1 77DC
ACE2 7802
ACE3 7814
ACE4 780C
ACE5 780D
ACE6 7946
ACE7 7949
ACE8 7948
ACE9 7947
ACEA 79B9
ACEB 79BA
ACEC 79D1
ACED 79D2
ACEE 79CB
ACEF 7A7F
ACF0 7A81
ACF1 7AFF
ACF2 7AFD
ACF3 7C7D
ACF4 7D02
ACF5 7D05
ACF6 7D00
ACF7 7D09
ACF8 7D07
ACF9 7D04
ACFA 7D06
ACFB 7F38
ACFC 7F8E
ACFD 7FBF
ACFE 8004
AD40 8010
AD41 800D
AD42 8011
AD43 8036
AD44 80D6
AD45 80E5
AD46 80DA
AD47 80C3
AD48 80C4
AD49 80CC
AD4A 80E1
AD4B 80DB
AD4C 80CE
AD4D 80DE
AD4E 80E4
AD4F 80DD
AD50 81F4
AD51 8222
AD52 82E7
AD53 8303
AD54 8305
AD55 82E3
AD56 82DB
AD57 82E6
AD58 8304
AD59 82E5
AD5A 8302
AD5B 8309
AD5C 82D2
AD5D 82D7
AD5E 82F1
AD5F 8301
AD60 82DC
AD61 82D4
AD62 82D1
AD63 82DE
AD64 82D3
AD65 82DF
AD66 82EF
AD67 8306
AD68 8650
AD69 8679
AD6A 867B
AD6B 867A
AD6C 884D
AD6D 886B
AD6E 8981
AD6F 89D4
AD70 8A08
AD71 8A02
AD72 8A03
AD73 8C9E
AD74 8CA0
AD75 8D74
AD76 8D73
AD77 8DB4
AD78 8ECD
AD79 8ECC
AD7A 8FF0
AD7B 8FE6
AD7C 8FE2
AD7D 8FEA
AD7E 8FE5
ADA1 8FED
ADA2 8FEB
ADA3 8FE4
ADA4 8FE8
ADA5 90CA
ADA6 90CE
ADA7 90C1
ADA8 90C3
ADA9 914B
ADAA 914A
ADAB 91CD
ADAC 9582
ADAD 9650
ADAE 964B
ADAF 964C
ADB0 964D
ADB1 9762
ADB2 9769
ADB3 97CB
ADB4 97ED
ADB5 97F3
ADB6 9801
ADB7 98A8
ADB8 98DB
ADB9 98DF
ADBA 9996
ADBB 9999
ADBC 4E58
ADBD 4EB3
ADBE 500C
ADBF 500D
ADC0 5023
ADC1 4FEF
ADC2 5026
ADC3 5025
ADC4 4FF8
ADC5 5029
ADC6 5016
ADC7 5006
ADC8 503C
ADC9 501F
ADCA 501A
ADCB 5012
ADCC 5011
ADCD 4FFA
ADCE 5000
ADCF 5014
ADD0 5028
ADD1 4FF1
ADD2 5021
ADD3 500B
ADD4 5019
ADD5 5018
ADD6 4FF3
ADD7 4FEE
ADD8 502D
ADD9 502A
ADDA 4FFE
ADDB 502B
ADDC 5009
ADDD 517C
ADDE 51A4
ADDF 51A5
ADE0 51A2
ADE1 51CD
ADE2 51CC
ADE3 51C6
ADE4 51CB
ADE5 5256
ADE6 525C
ADE7 5254
ADE8 525B
ADE9 525D
ADEA 532A
ADEB 537F
ADEC 539F
ADED 539D
ADEE 53DF
ADEF 54E8
ADF0 5510
ADF1 5501
ADF2 5537
ADF3 54FC
ADF4 54E5
ADF5 54F2
ADF6 5506
ADF7 54FA
ADF8 5514
ADF9 54E9
ADFA 54ED
ADFB 54E1
ADFC 5509
ADFD 54EE
ADFE 54EA
AE40 54E6
AE41 5527
AE42 5507
AE43 54FD
AE44 550F
AE45 5703
AE46 5704
AE47 57C2
AE48 57D4
AE49 57CB
AE4A 57C3
AE4B 5809
AE4C 590F
AE4D 5957
AE4E 5958
AE4F 595A
AE50 5A11
AE51 5A18
AE52 5A1C
AE53 5A1F
AE54 5A1B
AE55 5A13
AE56 59EC
AE57 5A20
AE58 5A23
AE59 5A29
AE5A 5A25
AE5B 5A0C
AE5C 5A09
AE5D 5B6B
AE5E 5C58
AE5F 5BB0
AE60 5BB3
AE61 5BB6
AE62 5BB4
AE63 5BAE
AE64 5BB5
AE65 5BB9
AE66 5BB8
AE67 5C04
AE68 5C51
AE69 5C55
AE6A 5C50
AE6B 5CED
AE6C 5CFD
AE6D 5CFB
AE6E 5CEA
AE6F 5CE8
AE70 5CF0
AE71 5CF6
AE72 5D01
AE73 5CF4
AE74 5DEE
AE75 5E2D
AE76 5E2B
AE77 5EAB
AE78 5EAD
AE79 5EA7
AE7A 5F31
AE7B 5F92
AE7C 5F91
AE7D 5F90
AE7E 6059
AEA1 6063
AEA2 6065
AEA3 6050
AEA4 6055
AEA5 606D
AEA6 6069
AEA7 606F
AEA8 6084
AEA9 609F
AEAA 609A
AEAB 608D
AEAC 6094
AEAD 608C
AEAE 6085
AEAF 6096
AEB0 6247
AEB1 62F3
AEB2 6308
AEB3 62FF
AEB4 634E
AEB5 633E
AEB6 632F
AEB7 6355
AEB8 6342
AEB9 6346
AEBA 634F
AEBB 6349
AEBC 633A
AEBD 6350
AEBE 633D
AEBF 632A
AEC0 632B
AEC1 6328
AEC2 634D
AEC3 634C
AEC4 6548
AEC5 6549
AEC6 6599
AEC7 65C1
AEC8 65C5
AEC9 6642
AECA 6649
AECB 664F
AECC 6643
AECD 6652
AECE 664C
AECF 6645
AED0 6641
AED1 66F8
AED2 6714
AED3 6715
AED4 6717
AED5 6821
AED6 6838
AED7 6848
AED8 6846
AED9 6853
AEDA 6839
AEDB 6842
AEDC 6854
AEDD 6829
AEDE 68B3
AEDF 6817
AEE0 684C
AEE1 6851
AEE2 683D
AEE3 67F4
AEE4 6850
AEE5 6840
AEE6 683C
AEE7 6843
AEE8 682A
AEE9 6845
AEEA 6813
AEEB 6818
AEEC 6841
AEED 6B8A
AEEE 6B89
AEEF 6BB7
AEF0 6C23
AEF1 6C27
AEF2 6C28
AEF3 6C26
AEF4 6C24
AEF5 6CF0
AEF6 6D6A
AEF7 6D95
AEF8 6D88
AEF9 6D87
AEFA 6D66
AEFB 6D78
AEFC 6D77
AEFD 6D59
AEFE 6D93
AF40 6D6C
AF41 6D89
AF42 6D6E
AF43 6D5A
AF44 6D74
AF45 6D69
AF46 6D8C
AF47 6D8A
AF48 6D79
AF49 6D85
AF4A 6D65
AF4B 6D94
AF4C 70CA
AF4D 70D8
AF4E 70E4
AF4F 70D9
AF50 70C8
AF51 70CF
AF52 7239
AF53 7279
AF54 72FC
AF55 72F9
AF56 72FD
AF57 72F8
AF58 72F7
AF59 7386
AF5A 73ED
AF5B 7409
AF5C 73EE
AF5D 73E0
AF5E 73EA
AF5F 73DE
AF60 7554
AF61 755D
AF62 755C
AF63 755A
AF64 7559
AF65 75BE
AF66 75C5
AF67 75C7
AF68 75B2
AF69 75B3
AF6A 75BD
AF6B 75BC
AF6C 75B9
AF6D 75C2
AF6E 75B8
AF6F 768B
AF70 76B0
AF71 76CA
AF72 76CD
AF73 76CE
AF74 7729
AF75 771F
AF76 7720
AF77 7728
AF78 77E9
AF79 7830
AF7A 7827
AF7B 7838
AF7C 781D
AF7D 7834
AF7E 7837
AFA1 7825
AFA2 782D
AFA3 7820
AFA4 781F
AFA5 7832
AFA6 7955
AFA7 7950
AFA8 7960
AFA9 795F
AFAA 7956
AFAB 795E
AFAC 795D
AFAD 7957
AFAE 795A
AFAF 79E4
AFB0 79E3
AFB1 79E7
AFB2 79DF
AFB3 79E6
AFB4 79E9
AFB5 79D8
AFB6 7A84
AFB7 7A88
AFB8 7AD9
AFB9 7B06
AFBA 7B11
AFBB 7C89
AFBC 7D21
AFBD 7D17
AFBE 7D0B
AFBF 7D0A
AFC0 7D20
AFC1 7D22
AFC2 7D14
AFC3 7D10
AFC4 7D15
AFC5 7D1A
AFC6 7D1C
AFC7 7D0D
AFC8 7D19
AFC9 7D1B
AFCA 7F3A
AFCB 7F5F
AFCC 7F94
AFCD 7FC5
AFCE 7FC1
AFCF 8006
AFD0 8018
AFD1 8015
AFD2 8019
AFD3 8017
AFD4 803D
AFD5 803F
AFD6 80F1
AFD7 8102
AFD8 80F0
AFD9 8105
AFDA 80ED
AFDB 80F4
AFDC 8106
AFDD 80F8
AFDE 80F3
AFDF 8108
AFE0 80FD
AFE1 810A
AFE2 80FC
AFE3 80EF
AFE4 81ED
AFE5 81EC
AFE6 8200
AFE7 8210
AFE8 822A
AFE9 822B
AFEA 8228
AFEB 822C
AFEC 82BB
AFED 832B
AFEE 8352
AFEF 8354
AFF0 834A
AFF1 8338
AFF2 8350
AFF3 8349
AFF4 8335
AFF5 8334
AFF6 834F
AFF7 8332
AFF8 8339
AFF9 8336
AFFA 8317
AFFB 8340
AFFC 8331
AFFD 8328
AFFE 8343
B040 8654
B041 868A
B042 86AA
B043 8693
B044 86A4
B045 86A9
B046 868C
B047 86A3
B048 869C
B049 8870
B04A 8877
B04B 8881
B04C 8882
B04D 887D
B04E 8879
B04F 8A18
B050 8A10
B051 8A0E
B052 8A0C
B053 8A15
B054 8A0A
B055 8A17
B056 8A13
B057 8A16
B058 8A0F
B059 8A11
B05A 8C48
B05B 8C7A
B05C 8C79
B05D 8CA1
B05E 8CA2
B05F 8D77
B060 8EAC
B061 8ED2
B062 8ED4
B063 8ECF
B064 8FB1
B065 9001
B066 9006
B067 8FF7
B068 9000
B069 8FFA
B06A 8FF4
B06B 9003
B06C 8FFD
B06D 9005
B06E 8FF8
B06F 9095
B070 90E1
B071 90DD
B072 90E2
B073 9152
B074 914D
B075 914C
B076 91D8
B077 91DD
B078 91D7
B079 91DC
B07A 91D9
B07B 9583
B07C 9662
B07D 9663
B07E 9661
B0A1 965B
B0A2 965D
B0A3 9664
B0A4 9658
B0A5 965E
B0A6 96BB
B0A7 98E2
B0A8 99AC
B0A9 9AA8
B0AA 9AD8
B0AB 9B25
B0AC 9B32
B0AD 9B3C
B0AE 4E7E
B0AF 507A
B0B0 507D
B0B1 505C
B0B2 5047
B0B3 5043
B0B4 504C
B0B5 505A
B0B6 5049
B0B7 5065
B0B8 5076
B0B9 504E
B0BA 5055
B0BB 5075
B0BC 5074
B0BD 5077
B0BE 504F
B0BF 500F
B0C0 506F
B0C1 506D
B0C2 515C
B0C3 5195
B0C4 51F0
B0C5 526A
B0C6 526F
B0C7 52D2
B0C8 52D9
B0C9 52D8
B0CA 52D5
B0CB 5310
B0CC 530F
B0CD 5319
B0CE 533F
B0CF 5340
B0D0 533E
B0D1 53C3
B0D2 66FC
B0D3 5546
B0D4 556A
B0D5 5566
B0D6 5544
B0D7 555E
B0D8 5561
B0D9 5543
B0DA 554A
B0DB 5531
B0DC 5556
B0DD 554F
B0DE 5555
B0DF 552F
B0E0 5564
B0E1 5538
B0E2 552E
B0E3 555C
B0E4 552C
B0E5 5563
B0E6 5533
B0E7 5541
B0E8 5557
B0E9 5708
B0EA 570B
B0EB 5709
B0EC 57DF
B0ED 5805
B0EE 580A
B0EF 5806
B0F0 57E0
B0F1 57E4
B0F2 57FA
B0F3 5802
B0F4 5835
B0F5 57F7
B0F6 57F9
B0F7 5920
B0F8 5962
B0F9 5A36
B0FA 5A41
B0FB 5A49
B0FC 5A66
B0FD 5A6A
B0FE 5A40
B140 5A3C
B141 5A62
B142 5A5A
B143 5A46
B144 5A4A
B145 5B70
B146 5BC7
B147 5BC5
B148 5BC4
B149 5BC2
B14A 5BBF
B14B 5BC6
B14C 5C09
B14D 5C08
B14E 5C07
B14F 5C60
B150 5C5C
B151 5C5D
B152 5D07
B153 5D06
B154 5D0E
B155 5D1B
B156 5D16
B157 5D22
B158 5D11
B159 5D29
B15A 5D14
B15B 5D19
B15C 5D24
B15D 5D27
B15E 5D17
B15F 5DE2
B160 5E38
B161 5E36
B162 5E33
B163 5E37
B164 5EB7
B165 5EB8
B166 5EB6
B167 5EB5
B168 5EBE
B169 5F35
B16A 5F37
B16B 5F57
B16C 5F6C
B16D 5F69
B16E 5F6B
B16F 5F97
B170 5F99
B171 5F9E
B172 5F98
B173 5FA1
B174 5FA0
B175 5F9C
B176 607F
B177 60A3
B178 6089
B179 60A0
B17A 60A8
B17B 60CB
B17C 60B4
B17D 60E6
B17E 60BD
B1A1 60C5
B1A2 60BB
B1A3 60B5
B1A4 60DC
B1A5 60BC
B1A6 60D8
B1A7 60D5
B1A8 60C6
B1A9 60DF
B1AA 60B8
B1AB 60DA
B1AC 60C7
B1AD 621A
B1AE 621B
B1AF 6248
B1B0 63A0
B1B1 63A7
B1B2 6372
B1B3 6396
B1B4 63A2
B1B5 63A5
B1B6 6377
B1B7 6367
B1B8 6398
B1B9 63AA
B1BA 6371
B1BB 63A9
B1BC 6389
B1BD 6383
B1BE 639B
B1BF 636B
B1C0 63A8
B1C1 6384
B1C2 6388
B1C3 6399
B1C4 63A1
B1C5 63AC
B1C6 6392
B1C7 638F
B1C8 6380
B1C9 637B
B1CA 6369
B1CB 6368
B1CC 637A
B1CD 655D
B1CE 6556
B1CF 6551
B1D0 6559
B1D1 6557
B1D2 555F
B1D3 654F
B1D4 6558
B1D5 6555
B1D6 6554
B1D7 659C
B1D8 659B
B1D9 65AC
B1DA 65CF
B1DB 65CB
B1DC 65CC
B1DD 65CE
B1DE 665D
B1DF 665A
B1E0 6664
B1E1 6668
B1E2 6666
B1E3 665E
B1E4 66F9
B1E5 52D7
B1E6 671B
B1E7 6881
B1E8 68AF
B1E9 68A2
B1EA 6893
B1EB 68B5
B1EC 687F
B1ED 6876
B1EE 68B1
B1EF 68A7
B1F0 6897
B1F1 68B0
B1F2 6883
B1F3 68C4
B1F4 68AD
B1F5 6886
B1F6 6885
B1F7 6894
B1F8 689D
B1F9 68A8
B1FA 689F
B1FB 68A1
B1FC 6882
B1FD 6B32
B1FE 6BBA
B240 6BEB
B241 6BEC
B242 6C2B
B243 6D8E
B244 6DBC
B245 6DF3
B246 6DD9
B247 6DB2
B248 6DE1
B249 6DCC
B24A 6DE4
B24B 6DFB
B24C 6DFA
B24D 6E05
B24E 6DC7
B24F 6DCB
B250 6DAF
B251 6DD1
B252 6DAE
B253 6DDE
B254 6DF9
B255 6DB8
B256 6DF7
B257 6DF5
B258 6DC5
B259 6DD2
B25A 6E1A
B25B 6DB5
B25C 6DDA
B25D 6DEB
B25E 6DD8
B25F 6DEA
B260 6DF1
B261 6DEE
B262 6DE8
B263 6DC6
B264 6DC4
B265 6DAA
B266 6DEC
B267 6DBF
B268 6DE6
B269 70F9
B26A 7109
B26B 710A
B26C 70FD
B26D 70EF
B26E 723D
B26F 727D
B270 7281
B271 731C
B272 731B
B273 7316
B274 7313
B275 7319
B276 7387
B277 7405
B278 740A
B279 7403
B27A 7406
B27B 73FE
B27C 740D
B27D 74E0
B27E 74F6
B2A1 74F7
B2A2 751C
B2A3 7522
B2A4 7565
B2A5 7566
B2A6 7562
B2A7 7570
B2A8 758F
B2A9 75D4
B2AA 75D5
B2AB 75B5
B2AC 75CA
B2AD 75CD
B2AE 768E
B2AF 76D4
B2B0 76D2
B2B1 76DB
B2B2 7737
B2B3 773E
B2B4 773C
B2B5 7736
B2B6 7738
B2B7 773A
B2B8 786B
B2B9 7843
B2BA 784E
B2BB 7965
B2BC 7968
B2BD 796D
B2BE 79FB
B2BF 7A92
B2C0 7A95
B2C1 7B20
B2C2 7B28
B2C3 7B1B
B2C4 7B2C
B2C5 7B26
B2C6 7B19
B2C7 7B1E
B2C8 7B2E
B2C9 7C92
B2CA 7C97
B2CB 7C95
B2CC 7D46
B2CD 7D43
B2CE 7D71
B2CF 7D2E
B2D0 7D39
B2D1 7D3C
B2D2 7D40
B2D3 7D30
B2D4 7D33
B2D5 7D44
B2D6 7D2F
B2D7 7D42
B2D8 7D32
B2D9 7D31
B2DA 7F3D
B2DB 7F9E
B2DC 7F9A
B2DD 7FCC
B2DE 7FCE
B2DF 7FD2
B2E0 801C
B2E1 804A
B2E2 8046
B2E3 812F
B2E4 8116
B2E5 8123
B2E6 812B
B2E7 8129
B2E8 8130
B2E9 8124
B2EA 8202
B2EB 8235
B2EC 8237
B2ED 8236
B2EE 8239
B2EF 838E
B2F0 839E
B2F1 8398
B2F2 8378
B2F3 83A2
B2F4 8396
B2F5 83BD
B2F6 83AB
B2F7 8392
B2F8 838A
B2F9 8393
B2FA 8389
B2FB 83A0
B2FC 8377
B2FD 837B
B2FE 837C
B340 8386
B341 83A7
B342 8655
B343 5F6A
B344 86C7
B345 86C0
B346 86B6
B347 86C4
B348 86B5
B349 86C6
B34A 86CB
B34B 86B1
B34C 86AF
B34D 86C9
B34E 8853
B34F 889E
B350 8888
B351 88AB
B352 8892
B353 8896
B354 888D
B355 888B
B356 8993
B357 898F
B358 8A2A
B359 8A1D
B35A 8A23
B35B 8A25
B35C 8A31
B35D 8A2D
B35E 8A1F
B35F 8A1B
B360 8A22
B361 8C49
B362 8C5A
B363 8CA9
B364 8CAC
B365 8CAB
B366 8CA8
B367 8CAA
B368 8CA7
B369 8D67
B36A 8D66
B36B 8DBE
B36C 8DBA
B36D 8EDB
B36E 8EDF
B36F 9019
B370 900D
B371 901A
B372 9017
B373 9023
B374 901F
B375 901D
B376 9010
B377 9015
B378 901E
B379 9020
B37A 900F
B37B 9022
B37C 9016
B37D 901B
B37E 9014
B3A1 90E8
B3A2 90ED
B3A3 90FD
B3A4 9157
B3A5 91CE
B3A6 91F5
B3A7 91E6
B3A8 91E3
B3A9 91E7
B3AA 91ED
B3AB 91E9
B3AC 9589
B3AD 966A
B3AE 9675
B3AF 9673
B3B0 9678
B3B1 9670
B3B2 9674
B3B3 9676
B3B4 9677
B3B5 966C
B3B6 96C0
B3B7 96EA
B3B8 96E9
B3B9 7AE0
B3BA 7ADF
B3BB 9802
B3BC 9803
B3BD 9B5A
B3BE 9CE5
B3BF 9E75
B3C0 9E7F
B3C1 9EA5
B3C2 9EBB
B3C3 50A2
B3C4 508D
B3C5 5085
B3C6 5099
B3C7 5091
B3C8 5080
B3C9 5096
B3CA 5098
B3CB 509A
B3CC 6700
B3CD 51F1
B3CE 5272
B3CF 5274
B3D0 5275
B3D1 5269
B3D2 52DE
B3D3 52DD
B3D4 52DB
B3D5 535A
B3D6 53A5
B3D7 557B
B3D8 5580
B3D9 55A7
B3DA 557C
B3DB 558A
B3DC 559D
B3DD 5598
B3DE 5582
B3DF 559C
B3E0 55AA
B3E1 5594
B3E2 5587
B3E3 558B
B3E4 5583
B3E5 55B3
B3E6 55AE
B3E7 559F
B3E8 553E
B3E9 55B2
B3EA 559A
B3EB 55BB
B3EC 55AC
B3ED 55B1
B3EE 557E
B3EF 5589
B3F0 55AB
B3F1 5599
B3F2 570D
B3F3 582F
B3F4 582A
B3F5 5834
B3F6 5824
B3F7 5830
B3F8 5831
B3F9 5821
B3FA 581D
B3FB 5820
B3FC 58F9
B3FD 58FA
B3FE 5960
B440 5A77
B441 5A9A
B442 5A7F
B443 5A92
B444 5A9B
B445 5AA7
B446 5B73
B447 5B71
B448 5BD2
B449 5BCC
B44A 5BD3
B44B 5BD0
B44C 5C0A
B44D 5C0B
B44E 5C31
B44F 5D4C
B450 5D50
B451 5D34
B452 5D47
B453 5DFD
B454 5E45
B455 5E3D
B456 5E40
B457 5E43
B458 5E7E
B459 5ECA
B45A 5EC1
B45B 5EC2
B45C 5EC4
B45D 5F3C
B45E 5F6D
B45F 5FA9
B460 5FAA
B461 5FA8
B462 60D1
B463 60E1
B464 60B2
B465 60B6
B466 60E0
B467 611C
B468 6123
B469 60FA
B46A 6115
B46B 60F0
B46C 60FB
B46D 60F4
B46E 6168
B46F 60F1
B470 610E
B471 60F6
B472 6109
B473 6100
B474 6112
B475 621F
B476 6249
B477 63A3
B478 638C
B479 63CF
B47A 63C0
B47B 63E9
B47C 63C9
B47D 63C6
B47E 63CD
B4A1 63D2
B4A2 63E3
B4A3 63D0
B4A4 63E1
B4A5 63D6
B4A6 63ED
B4A7 63EE
B4A8 6376
B4A9 63F4
B4AA 63EA
B4AB 63DB
B4AC 6452
B4AD 63DA
B4AE 63F9
B4AF 655E
B4B0 6566
B4B1 6562
B4B2 6563
B4B3 6591
B4B4 6590
B4B5 65AF
B4B6 666E
B4B7 6670
B4B8 6674
B4B9 6676
B4BA 666F
B4BB 6691
B4BC 667A
B4BD 667E
B4BE 6677
B4BF 66FE
B4C0 66FF
B4C1 671F
B4C2 671D
B4C3 68FA
B4C4 68D5
B4C5 68E0
B4C6 68D8
B4C7 68D7
B4C8 6905
B4C9 68DF
B4CA 68F5
B4CB 68EE
B4CC 68E7
B4CD 68F9
B4CE 68D2
B4CF 68F2
B4D0 68E3
B4D1 68CB
B4D2 68CD
B4D3 690D
B4D4 6912
B4D5 690E
B4D6 68C9
B4D7 68DA
B4D8 696E
B4D9 68FB
B4DA 6B3E
B4DB 6B3A
B4DC 6B3D
B4DD 6B98
B4DE 6B96
B4DF 6BBC
B4E0 6BEF
B4E1 6C2E
B4E2 6C2F
B4E3 6C2C
B4E4 6E2F
B4E5 6E38
B4E6 6E54
B4E7 6E21
B4E8 6E32
B4E9 6E67
B4EA 6E4A
B4EB 6E20
B4EC 6E25
B4ED 6E23
B4EE 6E1B
B4EF 6E5B
B4F0 6E58
B4F1 6E24
B4F2 6E56
B4F3 6E6E
B4F4 6E2D
B4F5 6E26
B4F6 6E6F
B4F7 6E34
B4F8 6E4D
B4F9 6E3A
B4FA 6E2C
B4FB 6E43
B4FC 6E1D
B4FD 6E3E
B4FE 6ECB
B540 6E89
B541 6E19
B542 6E4E
B543 6E63
B544 6E44
B545 6E72
B546 6E69
B547 6E5F
B548 7119
B549 711A
B54A 7126
B54B 7130
B54C 7121
B54D 7136
B54E 716E
B54F 711C
B550 724C
B551 7284
B552 7280
B553 7336
B554 7325
B555 7334
B556 7329
B557 743A
B558 742A
B559 7433
B55A 7422
B55B 7425
B55C 7435
B55D 7436
B55E 7434
B55F 742F
B560 741B
B561 7426
B562 7428
B563 7525
B564 7526
B565 756B
B566 756A
B567 75E2
B568 75DB
B569 75E3
B56A 75D9
B56B 75D8
B56C 75DE
B56D 75E0
B56E 767B
B56F 767C
B570 7696
B571 7693
B572 76B4
B573 76DC
B574 774F
B575 77ED
B576 785D
B577 786C
B578 786F
B579 7A0D
B57A 7A08
B57B 7A0B
B57C 7A05
B57D 7A00
B57E 7A98
B5A1 7A97
B5A2 7A96
B5A3 7AE5
B5A4 7AE3
B5A5 7B49
B5A6 7B56
B5A7 7B46
B5A8 7B50
B5A9 7B52
B5AA 7B54
B5AB 7B4D
B5AC 7B4B
B5AD 7B4F
B5AE 7B51
B5AF 7C9F
B5B0 7CA5
B5B1 7D5E
B5B2 7D50
B5B3 7D68
B5B4 7D55
B5B5 7D2B
B5B6 7D6E
B5B7 7D72
B5B8 7D61
B5B9 7D66
B5BA 7D62
B5BB 7D70
B5BC 7D73
B5BD 5584
B5BE 7FD4
B5BF 7FD5
B5C0 800B
B5C1 8052
B5C2 8085
B5C3 8155
B5C4 8154
B5C5 814B
B5C6 8151
B5C7 814E
B5C8 8139
B5C9 8146
B5CA 813E
B5CB 814C
B5CC 8153
B5CD 8174
B5CE 8212
B5CF 821C
B5D0 83E9
B5D1 8403
B5D2 83F8
B5D3 840D
B5D4 83E0
B5D5 83C5
B5D6 840B
B5D7 83C1
B5D8 83EF
B5D9 83F1
B5DA 83F4
B5DB 8457
B5DC 840A
B5DD 83F0
B5DE 840C
B5DF 83CC
B5E0 83FD
B5E1 83F2
B5E2 83CA
B5E3 8438
B5E4 840E
B5E5 8404
B5E6 83DC
B5E7 8407
B5E8 83D4
B5E9 83DF
B5EA 865B
B5EB 86DF
B5EC 86D9
B5ED 86ED
B5EE 86D4
B5EF 86DB
B5F0 86E4
B5F1 86D0
B5F2 86DE
B5F3 8857
B5F4 88C1
B5F5 88C2
B5F6 88B1
B5F7 8983
B5F8 8996
B5F9 8A3B
B5FA 8A60
B5FB 8A55
B5FC 8A5E
B5FD 8A3C
B5FE 8A41
B640 8A54
B641 8A5B
B642 8A50
B643 8A46
B644 8A34
B645 8A3A
B646 8A36
B647 8A56
B648 8C61
B649 8C82
B64A 8CAF
B64B 8CBC
B64C 8CB3
B64D 8CBD
B64E 8CC1
B64F 8CBB
B650 8CC0
B651 8CB4
B652 8CB7
B653 8CB6
B654 8CBF
B655 8CB8
B656 8D8A
B657 8D85
B658 8D81
B659 8DCE
B65A 8DDD
B65B 8DCB
B65C 8DDA
B65D 8DD1
B65E 8DCC
B65F 8DDB
B660 8DC6
B661 8EFB
B662 8EF8
B663 8EFC
B664 8F9C
B665 902E
B666 9035
B667 9031
B668 9038
B669 9032
B66A 9036
B66B 9102
B66C 90F5
B66D 9109
B66E 90FE
B66F 9163
B670 9165
B671 91CF
B672 9214
B673 9215
B674 9223
B675 9209
B676 921E
B677 920D
B678 9210
B679 9207
B67A 9211
B67B 9594
B67C 958F
B67D 958B
B67E 9591
B6A1 9593
B6A2 9592
B6A3 958E
B6A4 968A
B6A5 968E
B6A6 968B
B6A7 967D
B6A8 9685
B6A9 9686
B6AA 968D
B6AB 9672
B6AC 9684
B6AD 96C1
B6AE 96C5
B6AF 96C4
B6B0 96C6
B6B1 96C7
B6B2 96EF
B6B3 96F2
B6B4 97CC
B6B5 9805
B6B6 9806
B6B7 9808
B6B8 98E7
B6B9 98EA
B6BA 98EF
B6BB 98E9
B6BC 98F2
B6BD 98ED
B6BE 99AE
B6BF 99AD
B6C0 9EC3
B6C1 9ECD
B6C2 9ED1
B6C3 4E82
B6C4 50AD
B6C5 50B5
B6C6 50B2
B6C7 50B3
B6C8 50C5
B6C9 50BE
B6CA 50AC
B6CB 50B7
B6CC 50BB
B6CD 50AF
B6CE 50C7
B6CF 527F
B6D0 5277
B6D1 527D
B6D2 52DF
B6D3 52E6
B6D4 52E4
B6D5 52E2
B6D6 52E3
B6D7 532F
B6D8 55DF
B6D9 55E8
B6DA 55D3
B6DB 55E6
B6DC 55CE
B6DD 55DC
B6DE 55C7
B6DF 55D1
B6E0 55E3
B6E1 55E4
B6E2 55EF
B6E3 55DA
B6E4 55E1
B6E5 55C5
B6E6 55C6
B6E7 55E5
B6E8 55C9
B6E9 5712
B6EA 5713
B6EB 585E
B6EC 5851
B6ED 5858
B6EE 5857
B6EF 585A
B6F0 5854
B6F1 586B
B6F2 584C
B6F3 586D
B6F4 584A
B6F5 5862
B6F6 5852
B6F7 584B
B6F8 5967
B6F9 5AC1
B6FA 5AC9
B6FB 5ACC
B6FC 5ABE
B6FD 5ABD
B6FE 5ABC
B740 5AB3
B741 5AC2
B742 5AB2
B743 5D69
B744 5D6F
B745 5E4C
B746 5E79
B747 5EC9
B748 5EC8
B749 5F12
B74A 5F59
B74B 5FAC
B74C 5FAE
B74D 611A
B74E 610F
B74F 6148
B750 611F
B751 60F3
B752 611B
B753 60F9
B754 6101
B755 6108
B756 614E
B757 614C
B758 6144
B759 614D
B75A 613E
B75B 6134
B75C 6127
B75D 610D
B75E 6106
B75F 6137
B760 6221
B761 6222
B762 6413
B763 643E
B764 641E
B765 642A
B766 642D
B767 643D
B768 642C
B769 640F
B76A 641C
B76B 6414
B76C 640D
B76D 6436
B76E 6416
B76F 6417
B770 6406
B771 656C
B772 659F
B773 65B0
B774 6697
B775 6689
B776 6687
B777 6688
B778 6696
B779 6684
B77A 6698
B77B 668D
B77C 6703
B77D 6994
B77E 696D
B7A1 695A
B7A2 6977
B7A3 6960
B7A4 6954
B7A5 6975
B7A6 6930
B7A7 6982
B7A8 694A
B7A9 6968
B7AA 696B
B7AB 695E
B7AC 6953
B7AD 6979
B7AE 6986
B7AF 695D
B7B0 6963
B7B1 695B
B7B2 6B47
B7B3 6B72
B7B4 6BC0
B7B5 6BBF
B7B6 6BD3
B7B7 6BFD
B7B8 6EA2
B7B9 6EAF
B7BA 6ED3
B7BB 6EB6
B7BC 6EC2
B7BD 6E90
B7BE 6E9D
B7BF 6EC7
B7C0 6EC5
B7C1 6EA5
B7C2 6E98
B7C3 6EBC
B7C4 6EBA
B7C5 6EAB
B7C6 6ED1
B7C7 6E96
B7C8 6E9C
B7C9 6EC4
B7CA 6ED4
B7CB 6EAA
B7CC 6EA7
B7CD 6EB4
B7CE 714E
B7CF 7159
B7D0 7169
B7D1 7164
B7D2 7149
B7D3 7167
B7D4 715C
B7D5 716C
B7D6 7166
B7D7 714C
B7D8 7165
B7D9 715E
B7DA 7146
B7DB 7168
B7DC 7156
B7DD 723A
B7DE 7252
B7DF 7337
B7E0 7345
B7E1 733F
B7E2 733E
B7E3 746F
B7E4 745A
B7E5 7455
B7E6 745F
B7E7 745E
B7E8 7441
B7E9 743F
B7EA 7459
B7EB 745B
B7EC 745C
B7ED 7576
B7EE 7578
B7EF 7600
B7F0 75F0
B7F1 7601
B7F2 75F2
B7F3 75F1
B7F4 75FA
B7F5 75FF
B7F6 75F4
B7F7 75F3
B7F8 76DE
B7F9 76DF
B7FA 775B
B7FB 776B
B7FC 7766
B7FD 775E
B7FE 7763
B840 7779
B841 776A
B842 776C
B843 775C
B844 7765
B845 7768
B846 7762
B847 77EE
B848 788E
B849 78B0
B84A 7897
B84B 7898
B84C 788C
B84D 7889
B84E 787C
B84F 7891
B850 7893
B851 787F
B852 797A
B853 797F
B854 7981
B855 842C
B856 79BD
B857 7A1C
B858 7A1A
B859 7A20
B85A 7A14
B85B 7A1F
B85C 7A1E
B85D 7A9F
B85E 7AA0
B85F 7B77
B860 7BC0
B861 7B60
B862 7B6E
B863 7B67
B864 7CB1
B865 7CB3
B866 7CB5
B867 7D93
B868 7D79
B869 7D91
B86A 7D81
B86B 7D8F
B86C 7D5B
B86D 7F6E
B86E 7F69
B86F 7F6A
B870 7F72
B871 7FA9
B872 7FA8
B873 7FA4
B874 8056
B875 8058
B876 8086
B877 8084
B878 8171
B879 8170
B87A 8178
B87B 8165
B87C 816E
B87D 8173
B87E 816B
B8A1 8179
B8A2 817A
B8A3 8166
B8A4 8205
B8A5 8247
B8A6 8482
B8A7 8477
B8A8 843D
B8A9 8431
B8AA 8475
B8AB 8466
B8AC 846B
B8AD 8449
B8AE 846C
B8AF 845B
B8B0 843C
B8B1 8435
B8B2 8461
B8B3 8463
B8B4 8469
B8B5 846D
B8B6 8446
B8B7 865E
B8B8 865C
B8B9 865F
B8BA 86F9
B8BB 8713
B8BC 8708
B8BD 8707
B8BE 8700
B8BF 86FE
B8C0 86FB
B8C1 8702
B8C2 8703
B8C3 8706
B8C4 870A
B8C5 8859
B8C6 88DF
B8C7 88D4
B8C8 88D9
B8C9 88DC
B8CA 88D8
B8CB 88DD
B8CC 88E1
B8CD 88CA
B8CE 88D5
B8CF 88D2
B8D0 899C
B8D1 89E3
B8D2 8A6B
B8D3 8A72
B8D4 8A73
B8D5 8A66
B8D6 8A69
B8D7 8A70
B8D8 8A87
B8D9 8A7C
B8DA 8A63
B8DB 8AA0
B8DC 8A71
B8DD 8A85
B8DE 8A6D
B8DF 8A62
B8E0 8A6E
B8E1 8A6C
B8E2 8A79
B8E3 8A7B
B8E4 8A3E
B8E5 8A68
B8E6 8C62
B8E7 8C8A
B8E8 8C89
B8E9 8CCA
B8EA 8CC7
B8EB 8CC8
B8EC 8CC4
B8ED 8CB2
B8EE 8CC3
B8EF 8CC2
B8F0 8CC5
B8F1 8DE1
B8F2 8DDF
B8F3 8DE8
B8F4 8DEF
B8F5 8DF3
B8F6 8DFA
B8F7 8DEA
B8F8 8DE4
B8F9 8DE6
B8FA 8EB2
B8FB 8F03
B8FC 8F09
B8FD 8EFE
B8FE 8F0A
B940 8F9F
B941 8FB2
B942 904B
B943 904A
B944 9053
B945 9042
B946 9054
B947 903C
B948 9055
B949 9050
B94A 9047
B94B 904F
B94C 904E
B94D 904D
B94E 9051
B94F 903E
B950 9041
B951 9112
B952 9117
B953 916C
B954 916A
B955 9169
B956 91C9
B957 9237
B958 9257
B959 9238
B95A 923D
B95B 9240
B95C 923E
B95D 925B
B95E 924B
B95F 9264
B960 9251
B961 9234
B962 9249
B963 924D
B964 9245
B965 9239
B966 923F
B967 925A
B968 9598
B969 9698
B96A 9694
B96B 9695
B96C 96CD
B96D 96CB
B96E 96C9
B96F 96CA
B970 96F7
B971 96FB
B972 96F9
B973 96F6
B974 9756
B975 9774
B976 9776
B977 9810
B978 9811
B979 9813
B97A 980A
B97B 9812
B97C 980C
B97D 98FC
B97E 98F4
B9A1 98FD
B9A2 98FE
B9A3 99B3
B9A4 99B1
B9A5 99B4
B9A6 9AE1
B9A7 9CE9
B9A8 9E82
B9A9 9F0E
B9AA 9F13
B9AB 9F20
B9AC 50E7
B9AD 50EE
B9AE 50E5
B9AF 50D6
B9B0 50ED
B9B1 50DA
B9B2 50D5
B9B3 50CF
B9B4 50D1
B9B5 50F1
B9B6 50CE
B9B7 50E9
B9B8 5162
B9B9 51F3
B9BA 5283
B9BB 5282
B9BC 5331
B9BD 53AD
B9BE 55FE
B9BF 5600
B9C0 561B
B9C1 5617
B9C2 55FD
B9C3 5614
B9C4 5606
B9C5 5609
B9C6 560D
B9C7 560E
B9C8 55F7
B9C9 5616
B9CA 561F
B9CB 5608
B9CC 5610
B9CD 55F6
B9CE 5718
B9CF 5716
B9D0 5875
B9D1 587E
B9D2 5883
B9D3 5893
B9D4 588A
B9D5 5879
B9D6 5885
B9D7 587D
B9D8 58FD
B9D9 5925
B9DA 5922
B9DB 5924
B9DC 596A
B9DD 5969
B9DE 5AE1
B9DF 5AE6
B9E0 5AE9
B9E1 5AD7
B9E2 5AD6
B9E3 5AD8
B9E4 5AE3
B9E5 5B75
B9E6 5BDE
B9E7 5BE7
B9E8 5BE1
B9E9 5BE5
B9EA 5BE6
B9EB 5BE8
B9EC 5BE2
B9ED 5BE4
B9EE 5BDF
B9EF 5C0D
B9F0 5C62
B9F1 5D84
B9F2 5D87
B9F3 5E5B
B9F4 5E63
B9F5 5E55
B9F6 5E57
B9F7 5E54
B9F8 5ED3
B9F9 5ED6
B9FA 5F0A
B9FB 5F46
B9FC 5F70
B9FD 5FB9
B9FE 6147
BA40 613F
BA41 614B
BA42 6177
BA43 6162
BA44 6163
BA45 615F
BA46 615A
BA47 6158
BA48 6175
BA49 622A
BA4A 6487
BA4B 6458
BA4C 6454
BA4D 64A4
BA4E 6478
BA4F 645F
BA50 647A
BA51 6451
BA52 6467
BA53 6434
BA54 646D
BA55 647B
BA56 6572
BA57 65A1
BA58 65D7
BA59 65D6
BA5A 66A2
BA5B 66A8
BA5C 669D
BA5D 699C
BA5E 69A8
BA5F 6995
BA60 69C1
BA61 69AE
BA62 69D3
BA63 69CB
BA64 699B
BA65 69B7
BA66 69BB
BA67 69AB
BA68 69B4
BA69 69D0
BA6A 69CD
BA6B 69AD
BA6C 69CC
BA6D 69A6
BA6E 69C3
BA6F 69A3
BA70 6B49
BA71 6B4C
BA72 6C33
BA73 6F33
BA74 6F14
BA75 6EFE
BA76 6F13
BA77 6EF4
BA78 6F29
BA79 6F3E
BA7A 6F20
BA7B 6F2C
BA7C 6F0F
BA7D 6F02
BA7E 6F22
BAA1 6EFF
BAA2 6EEF
BAA3 6F06
BAA4 6F31
BAA5 6F38
BAA6 6F32
BAA7 6F23
BAA8 6F15
BAA9 6F2B
BAAA 6F2F
BAAB 6F88
BAAC 6F2A
BAAD 6EEC
BAAE 6F01
BAAF 6EF2
BAB0 6ECC
BAB1 6EF7
BAB2 7194
BAB3 7199
BAB4 717D
BAB5 718A
BAB6 7184
BAB7 7192
BAB8 723E
BAB9 7292
BABA 7296
BABB 7344
BABC 7350
BABD 7464
BABE 7463
BABF 746A
BAC0 7470
BAC1 746D
BAC2 7504
BAC3 7591
BAC4 7627
BAC5 760D
BAC6 760B
BAC7 7609
BAC8 7613
BAC9 76E1
BACA 76E3
BACB 7784
BACC 777D
BACD 777F
BACE 7761
BACF 78C1
BAD0 789F
BAD1 78A7
BAD2 78B3
BAD3 78A9
BAD4 78A3
BAD5 798E
BAD6 798F
BAD7 798D
BAD8 7A2E
BAD9 7A31
BADA 7AAA
BADB 7AA9
BADC 7AED
BADD 7AEF
BADE 7BA1
BADF 7B95
BAE0 7B8B
BAE1 7B75
BAE2 7B97
BAE3 7B9D
BAE4 7B94
BAE5 7B8F
BAE6 7BB8
BAE7 7B87
BAE8 7B84
BAE9 7CB9
BAEA 7CBD
BAEB 7CBE
BAEC 7DBB
BAED 7DB0
BAEE 7D9C
BAEF 7DBD
BAF0 7DBE
BAF1 7DA0
BAF2 7DCA
BAF3 7DB4
BAF4 7DB2
BAF5 7DB1
BAF6 7DBA
BAF7 7DA2
BAF8 7DBF
BAF9 7DB5
BAFA 7DB8
BAFB 7DAD
BAFC 7DD2
BAFD 7DC7
BAFE 7DAC
BB40 7F70
BB41 7FE0
BB42 7FE1
BB43 7FDF
BB44 805E
BB45 805A
BB46 8087
BB47 8150
BB48 8180
BB49 818F
BB4A 8188
BB4B 818A
BB4C 817F
BB4D 8182
BB4E 81E7
BB4F 81FA
BB50 8207
BB51 8214
BB52 821E
BB53 824B
BB54 84C9
BB55 84BF
BB56 84C6
BB57 84C4
BB58 8499
BB59 849E
BB5A 84B2
BB5B 849C
BB5C 84CB
BB5D 84B8
BB5E 84C0
BB5F 84D3
BB60 8490
BB61 84BC
BB62 84D1
BB63 84CA
BB64 873F
BB65 871C
BB66 873B
BB67 8722
BB68 8725
BB69 8734
BB6A 8718
BB6B 8755
BB6C 8737
BB6D 8729
BB6E 88F3
BB6F 8902
BB70 88F4
BB71 88F9
BB72 88F8
BB73 88FD
BB74 88E8
BB75 891A
BB76 88EF
BB77 8AA6
BB78 8A8C
BB79 8A9E
BB7A 8AA3
BB7B 8A8D
BB7C 8AA1
BB7D 8A93
BB7E 8AA4
BBA1 8AAA
BBA2 8AA5
BBA3 8AA8
BBA4 8A98
BBA5 8A91
BBA6 8A9A
BBA7 8AA7
BBA8 8C6A
BBA9 8C8D
BBAA 8C8C
BBAB 8CD3
BBAC 8CD1
BBAD 8CD2
BBAE 8D6B
BBAF 8D99
BBB0 8D95
BBB1 8DFC
BBB2 8F14
BBB3 8F12
BBB4 8F15
BBB5 8F13
BBB6 8FA3
BBB7 9060
BBB8 9058
BBB9 905C
BBBA 9063
BBBB 9059
BBBC 905E
BBBD 9062
BBBE 905D
BBBF 905B
BBC0 9119
BBC1 9118
BBC2 911E
BBC3 9175
BBC4 9178
BBC5 9177
BBC6 9174
BBC7 9278
BBC8 9280
BBC9 9285
BBCA 9298
BBCB 9296
BBCC 927B
BBCD 9293
BBCE 929C
BBCF 92A8
BBD0 927C
BBD1 9291
BBD2 95A1
BBD3 95A8
BBD4 95A9
BBD5 95A3
BBD6 95A5
BBD7 95A4
BBD8 9699
BBD9 969C
BBDA 969B
BBDB 96CC
BBDC 96D2
BBDD 9700
BBDE 977C
BBDF 9785
BBE0 97F6
BBE1 9817
BBE2 9818
BBE3 98AF
BBE4 98B1
BBE5 9903
BBE6 9905
BBE7 990C
BBE8 9909
BBE9 99C1
BBEA 9AAF
BBEB 9AB0
BBEC 9AE6
BBED 9B41
BBEE 9B42
BBEF 9CF4
BBF0 9CF6
BBF1 9CF3
BBF2 9EBC
BBF3 9F3B
BBF4 9F4A
BBF5 5104
BBF6 5100
BBF7 50FB
BBF8 50F5
BBF9 50F9
BBFA 5102
BBFB 5108
BBFC 5109
BBFD 5105
BBFE 51DC
BC40 5287
BC41 5288
BC42 5289
BC43 528D
BC44 528A
BC45 52F0
BC46 53B2
BC47 562E
BC48 563B
BC49 5639
BC4A 5632
BC4B 563F
BC4C 5634
BC4D 5629
BC4E 5653
BC4F 564E
BC50 5657
BC51 5674
BC52 5636
BC53 562F
BC54 5630
BC55 5880
BC56 589F
BC57 589E
BC58 58B3
BC59 589C
BC5A 58AE
BC5B 58A9
BC5C 58A6
BC5D 596D
BC5E 5B09
BC5F 5AFB
BC60 5B0B
BC61 5AF5
BC62 5B0C
BC63 5B08
BC64 5BEE
BC65 5BEC
BC66 5BE9
BC67 5BEB
BC68 5C64
BC69 5C65
BC6A 5D9D
BC6B 5D94
BC6C 5E62
BC6D 5E5F
BC6E 5E61
BC6F 5EE2
BC70 5EDA
BC71 5EDF
BC72 5EDD
BC73 5EE3
BC74 5EE0
BC75 5F48
BC76 5F71
BC77 5FB7
BC78 5FB5
BC79 6176
BC7A 6167
BC7B 616E
BC7C 615D
BC7D 6155
BC7E 6182
BCA1 617C
BCA2 6170
BCA3 616B
BCA4 617E
BCA5 61A7
BCA6 6190
BCA7 61AB
BCA8 618E
BCA9 61AC
BCAA 619A
BCAB 61A4
BCAC 6194
BCAD 61AE
BCAE 622E
BCAF 6469
BCB0 646F
BCB1 6479
BCB2 649E
BCB3 64B2
BCB4 6488
BCB5 6490
BCB6 64B0
BCB7 64A5
BCB8 6493
BCB9 6495
BCBA 64A9
BCBB 6492
BCBC 64AE
BCBD 64AD
BCBE 64AB
BCBF 649A
BCC0 64AC
BCC1 6499
BCC2 64A2
BCC3 64B3
BCC4 6575
BCC5 6577
BCC6 6578
BCC7 66AE
BCC8 66AB
BCC9 66B4
BCCA 66B1
BCCB 6A23
BCCC 6A1F
BCCD 69E8
BCCE 6A01
BCCF 6A1E
BCD0 6A19
BCD1 69FD
BCD2 6A21
BCD3 6A13
BCD4 6A0A
BCD5 69F3
BCD6 6A02
BCD7 6A05
BCD8 69ED
BCD9 6A11
BCDA 6B50
BCDB 6B4E
BCDC 6BA4
BCDD 6BC5
BCDE 6BC6
BCDF 6F3F
BCE0 6F7C
BCE1 6F84
BCE2 6F51
BCE3 6F66
BCE4 6F54
BCE5 6F86
BCE6 6F6D
BCE7 6F5B
BCE8 6F78
BCE9 6F6E
BCEA 6F8E
BCEB 6F7A
BCEC 6F70
BCED 6F64
BCEE 6F97
BCEF 6F58
BCF0 6ED5
BCF1 6F6F
BCF2 6F60
BCF3 6F5F
BCF4 719F
BCF5 71AC
BCF6 71B1
BCF7 71A8
BCF8 7256
BCF9 729B
BCFA 734E
BCFB 7357
BCFC 7469
BCFD 748B
BCFE 7483
BD40 747E
BD41 7480
BD42 757F
BD43 7620
BD44 7629
BD45 761F
BD46 7624
BD47 7626
BD48 7621
BD49 7622
BD4A 769A
BD4B 76BA
BD4C 76E4
BD4D 778E
BD4E 7787
BD4F 778C
BD50 7791
BD51 778B
BD52 78CB
BD53 78C5
BD54 78BA
BD55 78CA
BD56 78BE
BD57 78D5
BD58 78BC
BD59 78D0
BD5A 7A3F
BD5B 7A3C
BD5C 7A40
BD5D 7A3D
BD5E 7A37
BD5F 7A3B
BD60 7AAF
BD61 7AAE
BD62 7BAD
BD63 7BB1
BD64 7BC4
BD65 7BB4
BD66 7BC6
BD67 7BC7
BD68 7BC1
BD69 7BA0
BD6A 7BCC
BD6B 7CCA
BD6C 7DE0
BD6D 7DF4
BD6E 7DEF
BD6F 7DFB
BD70 7DD8
BD71 7DEC
BD72 7DDD
BD73 7DE8
BD74 7DE3
BD75 7DDA
BD76 7DDE
BD77 7DE9
BD78 7D9E
BD79 7DD9
BD7A 7DF2
BD7B 7DF9
BD7C 7F75
BD7D 7F77
BD7E 7FAF
BDA1 7FE9
BDA2 8026
BDA3 819B
BDA4 819C
BDA5 819D
BDA6 81A0
BDA7 819A
BDA8 8198
BDA9 8517
BDAA 853D
BDAB 851A
BDAC 84EE
BDAD 852C
BDAE 852D
BDAF 8513
BDB0 8511
BDB1 8523
BDB2 8521
BDB3 8514
BDB4 84EC
BDB5 8525
BDB6 84FF
BDB7 8506
BDB8 8782
BDB9 8774
BDBA 8776
BDBB 8760
BDBC 8766
BDBD 8778
BDBE 8768
BDBF 8759
BDC0 8757
BDC1 874C
BDC2 8753
BDC3 885B
BDC4 885D
BDC5 8910
BDC6 8907
BDC7 8912
BDC8 8913
BDC9 8915
BDCA 890A
BDCB 8ABC
BDCC 8AD2
BDCD 8AC7
BDCE 8AC4
BDCF 8A95
BDD0 8ACB
BDD1 8AF8
BDD2 8AB2
BDD3 8AC9
BDD4 8AC2
BDD5 8ABF
BDD6 8AB0
BDD7 8AD6
BDD8 8ACD
BDD9 8AB6
BDDA 8AB9
BDDB 8ADB
BDDC 8C4C
BDDD 8C4E
BDDE 8C6C
BDDF 8CE0
BDE0 8CDE
BDE1 8CE6
BDE2 8CE4
BDE3 8CEC
BDE4 8CED
BDE5 8CE2
BDE6 8CE3
BDE7 8CDC
BDE8 8CEA
BDE9 8CE1
BDEA 8D6D
BDEB 8D9F
BDEC 8DA3
BDED 8E2B
BDEE 8E10
BDEF 8E1D
BDF0 8E22
BDF1 8E0F
BDF2 8E29
BDF3 8E1F
BDF4 8E21
BDF5 8E1E
BDF6 8EBA
BDF7 8F1D
BDF8 8F1B
BDF9 8F1F
BDFA 8F29
BDFB 8F26
BDFC 8F2A
BDFD 8F1C
BDFE 8F1E
BE40 8F25
BE41 9069
BE42 906E
BE43 9068
BE44 906D
BE45 9077
BE46 9130
BE47 912D
BE48 9127
BE49 9131
BE4A 9187
BE4B 9189
BE4C 918B
BE4D 9183
BE4E 92C5
BE4F 92BB
BE50 92B7
BE51 92EA
BE52 92AC
BE53 92E4
BE54 92C1
BE55 92B3
BE56 92BC
BE57 92D2
BE58 92C7
BE59 92F0
BE5A 92B2
BE5B 95AD
BE5C 95B1
BE5D 9704
BE5E 9706
BE5F 9707
BE60 9709
BE61 9760
BE62 978D
BE63 978B
BE64 978F
BE65 9821
BE66 982B
BE67 981C
BE68 98B3
BE69 990A
BE6A 9913
BE6B 9912
BE6C 9918
BE6D 99DD
BE6E 99D0
BE6F 99DF
BE70 99DB
BE71 99D1
BE72 99D5
BE73 99D2
BE74 99D9
BE75 9AB7
BE76 9AEE
BE77 9AEF
BE78 9B27
BE79 9B45
BE7A 9B44
BE7B 9B77
BE7C 9B6F
BE7D 9D06
BE7E 9D09
BEA1 9D03
BEA2 9EA9
BEA3 9EBE
BEA4 9ECE
BEA5 58A8
BEA6 9F52
BEA7 5112
BEA8 5118
BEA9 5114
BEAA 5110
BEAB 5115
BEAC 5180
BEAD 51AA
BEAE 51DD
BEAF 5291
BEB0 5293
BEB1 52F3
BEB2 5659
BEB3 566B
BEB4 5679
BEB5 5669
BEB6 5664
BEB7 5678
BEB8 566A
BEB9 5668
BEBA 5665
BEBB 5671
BEBC 566F
BEBD 566C
BEBE 5662
BEBF 5676
BEC0 58C1
BEC1 58BE
BEC2 58C7
BEC3 58C5
BEC4 596E
BEC5 5B1D
BEC6 5B34
BEC7 5B78
BEC8 5BF0
BEC9 5C0E
BECA 5F4A
BECB 61B2
BECC 6191
BECD 61A9
BECE 618A
BECF 61CD
BED0 61B6
BED1 61BE
BED2 61CA
BED3 61C8
BED4 6230
BED5 64C5
BED6 64C1
BED7 64CB
BED8 64BB
BED9 64BC
BEDA 64DA
BEDB 64C4
BEDC 64C7
BEDD 64C2
BEDE 64CD
BEDF 64BF
BEE0 64D2
BEE1 64D4
BEE2 64BE
BEE3 6574
BEE4 66C6
BEE5 66C9
BEE6 66B9
BEE7 66C4
BEE8 66C7
BEE9 66B8
BEEA 6A3D
BEEB 6A38
BEEC 6A3A
BEED 6A59
BEEE 6A6B
BEEF 6A58
BEF0 6A39
BEF1 6A44
BEF2 6A62
BEF3 6A61
BEF4 6A4B
BEF5 6A47
BEF6 6A35
BEF7 6A5F
BEF8 6A48
BEF9 6B59
BEFA 6B77
BEFB 6C05
BEFC 6FC2
BEFD 6FB1
BEFE 6FA1
BF40 6FC3
BF41 6FA4
BF42 6FC1
BF43 6FA7
BF44 6FB3
BF45 6FC0
BF46 6FB9
BF47 6FB6
BF48 6FA6
BF49 6FA0
BF4A 6FB4
BF4B 71BE
BF4C 71C9
BF4D 71D0
BF4E 71D2
BF4F 71C8
BF50 71D5
BF51 71B9
BF52 71CE
BF53 71D9
BF54 71DC
BF55 71C3
BF56 71C4
BF57 7368
BF58 749C
BF59 74A3
BF5A 7498
BF5B 749F
BF5C 749E
BF5D 74E2
BF5E 750C
BF5F 750D
BF60 7634
BF61 7638
BF62 763A
BF63 76E7
BF64 76E5
BF65 77A0
BF66 779E
BF67 779F
BF68 77A5
BF69 78E8
BF6A 78DA
BF6B 78EC
BF6C 78E7
BF6D 79A6
BF6E 7A4D
BF6F 7A4E
BF70 7A46
BF71 7A4C
BF72 7A4B
BF73 7ABA
BF74 7BD9
BF75 7C11
BF76 7BC9
BF77 7BE4
BF78 7BDB
BF79 7BE1
BF7A 7BE9
BF7B 7BE6
BF7C 7CD5
BF7D 7CD6
BF7E 7E0A
BFA1 7E11
BFA2 7E08
BFA3 7E1B
BFA4 7E23
BFA5 7E1E
BFA6 7E1D
BFA7 7E09
BFA8 7E10
BFA9 7F79
BFAA 7FB2
BFAB 7FF0
BFAC 7FF1
BFAD 7FEE
BFAE 8028
BFAF 81B3
BFB0 81A9
BFB1 81A8
BFB2 81FB
BFB3 8208
BFB4 8258
BFB5 8259
BFB6 854A
BFB7 8559
BFB8 8548
BFB9 8568
BFBA 8569
BFBB 8543
BFBC 8549
BFBD 856D
BFBE 856A
BFBF 855E
BFC0 8783
BFC1 879F
BFC2 879E
BFC3 87A2
BFC4 878D
BFC5 8861
BFC6 892A
BFC7 8932
BFC8 8925
BFC9 892B
BFCA 8921
BFCB 89AA
BFCC 89A6
BFCD 8AE6
BFCE 8AFA
BFCF 8AEB
BFD0 8AF1
BFD1 8B00
BFD2 8ADC
BFD3 8AE7
BFD4 8AEE
BFD5 8AFE
BFD6 8B01
BFD7 8B02
BFD8 8AF7
BFD9 8AED
BFDA 8AF3
BFDB 8AF6
BFDC 8AFC
BFDD 8C6B
BFDE 8C6D
BFDF 8C93
BFE0 8CF4
BFE1 8E44
BFE2 8E31
BFE3 8E34
BFE4 8E42
BFE5 8E39
BFE6 8E35
BFE7 8F3B
BFE8 8F2F
BFE9 8F38
BFEA 8F33
BFEB 8FA8
BFEC 8FA6
BFED 9075
BFEE 9074
BFEF 9078
BFF0 9072
BFF1 907C
BFF2 907A
BFF3 9134
BFF4 9192
BFF5 9320
BFF6 9336
BFF7 92F8
BFF8 9333
BFF9 932F
BFFA 9322
BFFB 92FC
BFFC 932B
BFFD 9304
BFFE 931A
C040 9310
C041 9326
C042 9321
C043 9315
C044 932E
C045 9319
C046 95BB
C047 96A7
C048 96A8
C049 96AA
C04A 96D5
C04B 970E
C04C 9711
C04D 9716
C04E 970D
C04F 9713
C050 970F
C051 975B
C052 975C
C053 9766
C054 9798
C055 9830
C056 9838
C057 983B
C058 9837
C059 982D
C05A 9839
C05B 9824
C05C 9910
C05D 9928
C05E 991E
C05F 991B
C060 9921
C061 991A
C062 99ED
C063 99E2
C064 99F1
C065 9AB8
C066 9ABC
C067 9AFB
C068 9AED
C069 9B28
C06A 9B91
C06B 9D15
C06C 9D23
C06D 9D26
C06E 9D28
C06F 9D12
C070 9D1B
C071 9ED8
C072 9ED4
C073 9F8D
C074 9F9C
C075 512A
C076 511F
C077 5121
C078 5132
C079 52F5
C07A 568E
C07B 5680
C07C 5690
C07D 5685
C07E 5687
C0A1 568F
C0A2 58D5
C0A3 58D3
C0A4 58D1
C0A5 58CE
C0A6 5B30
C0A7 5B2A
C0A8 5B24
C0A9 5B7A
C0AA 5C37
C0AB 5C68
C0AC 5DBC
C0AD 5DBA
C0AE 5DBD
C0AF 5DB8
C0B0 5E6B
C0B1 5F4C
C0B2 5FBD
C0B3 61C9
C0B4 61C2
C0B5 61C7
C0B6 61E6
C0B7 61CB
C0B8 6232
C0B9 6234
C0BA 64CE
C0BB 64CA
C0BC 64D8
C0BD 64E0
C0BE 64F0
C0BF 64E6
C0C0 64EC
C0C1 64F1
C0C2 64E2
C0C3 64ED
C0C4 6582
C0C5 6583
C0C6 66D9
C0C7 66D6
C0C8 6A80
C0C9 6A94
C0CA 6A84
C0CB 6AA2
C0CC 6A9C
C0CD 6ADB
C0CE 6AA3
C0CF 6A7E
C0D0 6A97
C0D1 6A90
C0D2 6AA0
C0D3 6B5C
C0D4 6BAE
C0D5 6BDA
C0D6 6C08
C0D7 6FD8
C0D8 6FF1
C0D9 6FDF
C0DA 6FE0
C0DB 6FDB
C0DC 6FE4
C0DD 6FEB
C0DE 6FEF
C0DF 6F80
C0E0 6FEC
C0E1 6FE1
C0E2 6FE9
C0E3 6FD5
C0E4 6FEE
C0E5 6FF0
C0E6 71E7
C0E7 71DF
C0E8 71EE
C0E9 71E6
C0EA 71E5
C0EB 71ED
C0EC 71EC
C0ED 71F4
C0EE 71E0
C0EF 7235
C0F0 7246
C0F1 7370
C0F2 7372
C0F3 74A9
C0F4 74B0
C0F5 74A6
C0F6 74A8
C0F7 7646
C0F8 7642
C0F9 764C
C0FA 76EA
C0FB 77B3
C0FC 77AA
C0FD 77B0
C0FE 77AC
C140 77A7
C141 77AD
C142 77EF
C143 78F7
C144 78FA
C145 78F4
C146 78EF
C147 7901
C148 79A7
C149 79AA
C14A 7A57
C14B 7ABF
C14C 7C07
C14D 7C0D
C14E 7BFE
C14F 7BF7
C150 7C0C
C151 7BE0
C152 7CE0
C153 7CDC
C154 7CDE
C155 7CE2
C156 7CDF
C157 7CD9
C158 7CDD
C159 7E2E
C15A 7E3E
C15B 7E46
C15C 7E37
C15D 7E32
C15E 7E43
C15F 7E2B
C160 7E3D
C161 7E31
C162 7E45
C163 7E41
C164 7E34
C165 7E39
C166 7E48
C167 7E35
C168 7E3F
C169 7E2F
C16A 7F44
C16B 7FF3
C16C 7FFC
C16D 8071
C16E 8072
C16F 8070
C170 806F
C171 8073
C172 81C6
C173 81C3
C174 81BA
C175 81C2
C176 81C0
C177 81BF
C178 81BD
C179 81C9
C17A 81BE
C17B 81E8
C17C 8209
C17D 8271
C17E 85AA
C1A1 8584
C1A2 857E
C1A3 859C
C1A4 8591
C1A5 8594
C1A6 85AF
C1A7 859B
C1A8 8587
C1A9 85A8
C1AA 858A
C1AB 8667
C1AC 87C0
C1AD 87D1
C1AE 87B3
C1AF 87D2
C1B0 87C6
C1B1 87AB
C1B2 87BB
C1B3 87BA
C1B4 87C8
C1B5 87CB
C1B6 893B
C1B7 8936
C1B8 8944
C1B9 8938
C1BA 893D
C1BB 89AC
C1BC 8B0E
C1BD 8B17
C1BE 8B19
C1BF 8B1B
C1C0 8B0A
C1C1 8B20
C1C2 8B1D
C1C3 8B04
C1C4 8B10
C1C5 8C41
C1C6 8C3F
C1C7 8C73
C1C8 8CFA
C1C9 8CFD
C1CA 8CFC
C1CB 8CF8
C1CC 8CFB
C1CD 8DA8
C1CE 8E49
C1CF 8E4B
C1D0 8E48
C1D1 8E4A
C1D2 8F44
C1D3 8F3E
C1D4 8F42
C1D5 8F45
C1D6 8F3F
C1D7 907F
C1D8 907D
C1D9 9084
C1DA 9081
C1DB 9082
C1DC 9080
C1DD 9139
C1DE 91A3
C1DF 919E
C1E0 919C
C1E1 934D
C1E2 9382
C1E3 9328
C1E4 9375
C1E5 934A
C1E6 9365
C1E7 934B
C1E8 9318
C1E9 937E
C1EA 936C
C1EB 935B
C1EC 9370
C1ED 935A
C1EE 9354
C1EF 95CA
C1F0 95CB
C1F1 95CC
C1F2 95C8
C1F3 95C6
C1F4 96B1
C1F5 96B8
C1F6 96D6
C1F7 971C
C1F8 971E
C1F9 97A0
C1FA 97D3
C1FB 9846
C1FC 98B6
C1FD 9935
C1FE 9A01
C240 99FF
C241 9BAE
C242 9BAB
C243 9BAA
C244 9BAD
C245 9D3B
C246 9D3F
C247 9E8B
C248 9ECF
C249 9EDE
C24A 9EDC
C24B 9EDD
C24C 9EDB
C24D 9F3E
C24E 9F4B
C24F 53E2
C250 5695
C251 56AE
C252 58D9
C253 58D8
C254 5B38
C255 5F5D
C256 61E3
C257 6233
C258 64F4
C259 64F2
C25A 64FE
C25B 6506
C25C 64FA
C25D 64FB
C25E 64F7
C25F 65B7
C260 66DC
C261 6726
C262 6AB3
C263 6AAC
C264 6AC3
C265 6ABB
C266 6AB8
C267 6AC2
C268 6AAE
C269 6AAF
C26A 6B5F
C26B 6B78
C26C 6BAF
C26D 7009
C26E 700B
C26F 6FFE
C270 7006
C271 6FFA
C272 7011
C273 700F
C274 71FB
C275 71FC
C276 71FE
C277 71F8
C278 7377
C279 7375
C27A 74A7
C27B 74BF
C27C 7515
C27D 7656
C27E 7658
C2A1 7652
C2A2 77BD
C2A3 77BF
C2A4 77BB
C2A5 77BC
C2A6 790E
C2A7 79AE
C2A8 7A61
C2A9 7A62
C2AA 7A60
C2AB 7AC4
C2AC 7AC5
C2AD 7C2B
C2AE 7C27
C2AF 7C2A
C2B0 7C1E
C2B1 7C23
C2B2 7C21
C2B3 7CE7
C2B4 7E54
C2B5 7E55
C2B6 7E5E
C2B7 7E5A
C2B8 7E61
C2B9 7E52
C2BA 7E59
C2BB 7F48
C2BC 7FF9
C2BD 7FFB
C2BE 8077
C2BF 8076
C2C0 81CD
C2C1 81CF
C2C2 820A
C2C3 85CF
C2C4 85A9
C2C5 85CD
C2C6 85D0
C2C7 85C9
C2C8 85B0
C2C9 85BA
C2CA 85B9
C2CB 85A6
C2CC 87EF
C2CD 87EC
C2CE 87F2
C2CF 87E0
C2D0 8986
C2D1 89B2
C2D2 89F4
C2D3 8B28
C2D4 8B39
C2D5 8B2C
C2D6 8B2B
C2D7 8C50
C2D8 8D05
C2D9 8E59
C2DA 8E63
C2DB 8E66
C2DC 8E64
C2DD 8E5F
C2DE 8E55
C2DF 8EC0
C2E0 8F49
C2E1 8F4D
C2E2 9087
C2E3 9083
C2E4 9088
C2E5 91AB
C2E6 91AC
C2E7 91D0
C2E8 9394
C2E9 938A
C2EA 9396
C2EB 93A2
C2EC 93B3
C2ED 93AE
C2EE 93AC
C2EF 93B0
C2F0 9398
C2F1 939A
C2F2 9397
C2F3 95D4
C2F4 95D6
C2F5 95D0
C2F6 95D5
C2F7 96E2
C2F8 96DC
C2F9 96D9
C2FA 96DB
C2FB 96DE
C2FC 9724
C2FD 97A3
C2FE 97A6
C340 97AD
C341 97F9
C342 984D
C343 984F
C344 984C
C345 984E
C346 9853
C347 98BA
C348 993E
C349 993F
C34A 993D
C34B 992E
C34C 99A5
C34D 9A0E
C34E 9AC1
C34F 9B03
C350 9B06
C351 9B4F
C352 9B4E
C353 9B4D
C354 9BCA
C355 9BC9
C356 9BFD
C357 9BC8
C358 9BC0
C359 9D51
C35A 9D5D
C35B 9D60
C35C 9EE0
C35D 9F15
C35E 9F2C
C35F 5133
C360 56A5
C361 58DE
C362 58DF
C363 58E2
C364 5BF5
C365 9F90
C366 5EEC
C367 61F2
C368 61F7
C369 61F6
C36A 61F5
C36B 6500
C36C 650F
C36D 66E0
C36E 66DD
C36F 6AE5
C370 6ADD
C371 6ADA
C372 6AD3
C373 701B
C374 701F
C375 7028
C376 701A
C377 701D
C378 7015
C379 7018
C37A 7206
C37B 720D
C37C 7258
C37D 72A2
C37E 7378
C3A1 737A
C3A2 74BD
C3A3 74CA
C3A4 74E3
C3A5 7587
C3A6 7586
C3A7 765F
C3A8 7661
C3A9 77C7
C3AA 7919
C3AB 79B1
C3AC 7A6B
C3AD 7A69
C3AE 7C3E
C3AF 7C3F
C3B0 7C38
C3B1 7C3D
C3B2 7C37
C3B3 7C40
C3B4 7E6B
C3B5 7E6D
C3B6 7E79
C3B7 7E69
C3B8 7E6A
C3B9 7F85
C3BA 7E73
C3BB 7FB6
C3BC 7FB9
C3BD 7FB8
C3BE 81D8
C3BF 85E9
C3C0 85DD
C3C1 85EA
C3C2 85D5
C3C3 85E4
C3C4 85E5
C3C5 85F7
C3C6 87FB
C3C7 8805
C3C8 880D
C3C9 87F9
C3CA 87FE
C3CB 8960
C3CC 895F
C3CD 8956
C3CE 895E
C3CF 8B41
C3D0 8B5C
C3D1 8B58
C3D2 8B49
C3D3 8B5A
C3D4 8B4E
C3D5 8B4F
C3D6 8B46
C3D7 8B59
C3D8 8D08
C3D9 8D0A
C3DA 8E7C
C3DB 8E72
C3DC 8E87
C3DD 8E76
C3DE 8E6C
C3DF 8E7A
C3E0 8E74
C3E1 8F54
C3E2 8F4E
C3E3 8FAD
C3E4 908A
C3E5 908B
C3E6 91B1
C3E7 91AE
C3E8 93E1
C3E9 93D1
C3EA 93DF
C3EB 93C3
C3EC 93C8
C3ED 93DC
C3EE 93DD
C3EF 93D6
C3F0 93E2
C3F1 93CD
C3F2 93D8
C3F3 93E4
C3F4 93D7
C3F5 93E8
C3F6 95DC
C3F7 96B4
C3F8 96E3
C3F9 972A
C3FA 9727
C3FB 9761
C3FC 97DC
C3FD 97FB
C3FE 985E
C440 9858
C441 985B
C442 98BC
C443 9945
C444 9949
C445 9A16
C446 9A19
C447 9B0D
C448 9BE8
C449 9BE7
C44A 9BD6
C44B 9BDB
C44C 9D89
C44D 9D61
C44E 9D72
C44F 9D6A
C450 9D6C
C451 9E92
C452 9E97
C453 9E93
C454 9EB4
C455 52F8
C456 56A8
C457 56B7
C458 56B6
C459 56B4
C45A 56BC
C45B 58E4
C45C 5B40
C45D 5B43
C45E 5B7D
C45F 5BF6
C460 5DC9
C461 61F8
C462 61FA
C463 6518
C464 6514
C465 6519
C466 66E6
C467 6727
C468 6AEC
C469 703E
C46A 7030
C46B 7032
C46C 7210
C46D 737B
C46E 74CF
C46F 7662
C470 7665
C471 7926
C472 792A
C473 792C
C474 792B
C475 7AC7
C476 7AF6
C477 7C4C
C478 7C43
C479 7C4D
C47A 7CEF
C47B 7CF0
C47C 8FAE
C47D 7E7D
C47E 7E7C
C4A1 7E82
C4A2 7F4C
C4A3 8000
C4A4 81DA
C4A5 8266
C4A6 85FB
C4A7 85F9
C4A8 8611
C4A9 85FA
C4AA 8606
C4AB 860B
C4AC 8607
C4AD 860A
C4AE 8814
C4AF 8815
C4B0 8964
C4B1 89BA
C4B2 89F8
C4B3 8B70
C4B4 8B6C
C4B5 8B66
C4B6 8B6F
C4B7 8B5F
C4B8 8B6B
C4B9 8D0F
C4BA 8D0D
C4BB 8E89
C4BC 8E81
C4BD 8E85
C4BE 8E82
C4BF 91B4
C4C0 91CB
C4C1 9418
C4C2 9403
C4C3 93FD
C4C4 95E1
C4C5 9730
C4C6 98C4
C4C7 9952
C4C8 9951
C4C9 99A8
C4CA 9A2B
C4CB 9A30
C4CC 9A37
C4CD 9A35
C4CE 9C13
C4CF 9C0D
C4D0 9E79
C4D1 9EB5
C4D2 9EE8
C4D3 9F2F
C4D4 9F5F
C4D5 9F63
C4D6 9F61
C4D7 5137
C4D8 5138
C4D9 56C1
C4DA 56C0
C4DB 56C2
C4DC 5914
C4DD 5C6C
C4DE 5DCD
C4DF 61FC
C4E0 61FE
C4E1 651D
C4E2 651C
C4E3 6595
C4E4 66E9
C4E5 6AFB
C4E6 6B04
C4E7 6AFA
C4E8 6BB2
C4E9 704C
C4EA 721B
C4EB 72A7
C4EC 74D6
C4ED 74D4
C4EE 7669
C4EF 77D3
C4F0 7C50
C4F1 7E8F
C4F2 7E8C
C4F3 7FBC
C4F4 8617
C4F5 862D
C4F6 861A
C4F7 8823
C4F8 8822
C4F9 8821
C4FA 881F
C4FB 896A
C4FC 896C
C4FD 89BD
C4FE 8B74
C540 8B77
C541 8B7D
C542 8D13
C543 8E8A
C544 8E8D
C545 8E8B
C546 8F5F
C547 8FAF
C548 91BA
C549 942E
C54A 9433
C54B 9435
C54C 943A
C54D 9438
C54E 9432
C54F 942B
C550 95E2
C551 9738
C552 9739
C553 9732
C554 97FF
C555 9867
C556 9865
C557 9957
C558 9A45
C559 9A43
C55A 9A40
C55B 9A3E
C55C 9ACF
C55D 9B54
C55E 9B51
C55F 9C2D
C560 9C25
C561 9DAF
C562 9DB4
C563 9DC2
C564 9DB8
C565 9E9D
C566 9EEF
C567 9F19
C568 9F5C
C569 9F66
C56A 9F67
C56B 513C
C56C 513B
C56D 56C8
C56E 56CA
C56F 56C9
C570 5B7F
C571 5DD4
C572 5DD2
C573 5F4E
C574 61FF
C575 6524
C576 6B0A
C577 6B61
C578 7051
C579 7058
C57A 7380
C57B 74E4
C57C 758A
C57D 766E
C57E 766C
C5A1 79B3
C5A2 7C60
C5A3 7C5F
C5A4 807E
C5A5 807D
C5A6 81DF
C5A7 8972
C5A8 896F
C5A9 89FC
C5AA 8B80
C5AB 8D16
C5AC 8D17
C5AD 8E91
C5AE 8E93
C5AF 8F61
C5B0 9148
C5B1 9444
C5B2 9451
C5B3 9452
C5B4 973D
C5B5 973E
C5B6 97C3
C5B7 97C1
C5B8 986B
C5B9 9955
C5BA 9A55
C5BB 9A4D
C5BC 9AD2
C5BD 9B1A
C5BE 9C49
C5BF 9C31
C5C0 9C3E
C5C1 9C3B
C5C2 9DD3
C5C3 9DD7
C5C4 9F34
C5C5 9F6C
C5C6 9F6A
C5C7 9F94
C5C8 56CC
C5C9 5DD6
C5CA 6200
C5CB 6523
C5CC 652B
C5CD 652A
C5CE 66EC
C5CF 6B10
C5D0 74DA
C5D1 7ACA
C5D2 7C64
C5D3 7C63
C5D4 7C65
C5D5 7E93
C5D6 7E96
C5D7 7E94
C5D8 81E2
C5D9 8638
C5DA 863F
C5DB 8831
C5DC 8B8A
C5DD 9090
C5DE 908F
C5DF 9463
C5E0 9460
C5E1 9464
C5E2 9768
C5E3 986F
C5E4 995C
C5E5 9A5A
C5E6 9A5B
C5E7 9A57
C5E8 9AD3
C5E9 9AD4
C5EA 9AD1
C5EB 9C54
C5EC 9C57
C5ED 9C56
C5EE 9DE5
C5EF 9E9F
C5F0 9EF4
C5F1 56D1
C5F2 58E9
C5F3 652C
C5F4 705E
C5F5 7671
C5F6 7672
C5F7 77D7
C5F8 7F50
C5F9 7F88
C5FA 8836
C5FB 8839
C5FC 8862
C5FD 8B93
C5FE 8B92
C640 8B96
C641 8277
C642 8D1B
C643 91C0
C644 946A
C645 9742
C646 9748
C647 9744
C648 97C6
C649 9870
C64A 9A5F
C64B 9B22
C64C 9B58
C64D 9C5F
C64E 9DF9
C64F 9DFA
C650 9E7C
C651 9E7D
C652 9F07
C653 9F77
C654 9F72
C655 5EF3
C656 6B16
C657 7063
C658 7C6C
C659 7C6E
C65A 883B
C65B 89C0
C65C 8EA1
C65D 91C1
C65E 9472
C65F 9470
C660 9871
C661 995E
C662 9AD6
C663 9B23
C664 9ECC
C665 7064
C666 77DA
C667 8B9A
C668 9477
C669 97C9
C66A 9A62
C66B 9A65
C66C 7E9C
C66D 8B9C
C66E 8EAA
C66F 91C5
C670 947D
C671 947E
C672 947C
C673 9C77
C674 9C78
C675 9EF7
C676 8C54
C677 947F
C678 9E1A
C679 7228
C67A 9A6A
C67B 9B31
C67C 9E1B
C67D 9E1E
C67E 7C72
C940 4E42
C941 4E5C
C942 51F5
C943 531A
C944 5382
C945 4E07
C946 4E0C
C947 4E47
C948 4E8D
C949 56D7
C94A FA0C
C94B 5C6E
C94C 5F73
C94D 4E0F
C94E 5187
C94F 4E0E
C950 4E2E
C951 4E93
C952 4EC2
C953 4EC9
C954 4EC8
C955 5198
C956 52FC
C957 536C
C958 53B9
C959 5720
C95A 5903
C95B 592C
C95C 5C10
C95D 5DFF
C95E 65E1
C95F 6BB3
C960 6BCC
C961 6C14
C962 723F
C963 4E31
C964 4E3C
C965 4EE8
C966 4EDC
C967 4EE9
C968 4EE1
C969 4EDD
C96A 4EDA
C96B 520C
C96C 531C
C96D 534C
C96E 5722
C96F 5723
C970 5917
C971 592F
C972 5B81
C973 5B84
C974 5C12
C975 5C3B
C976 5C74
C977 5C73
C978 5E04
C979 5E80
C97A 5E82
C97B 5FC9
C97C 6209
C97D 6250
C97E 6C15
C9A1 6C36
C9A2 6C43
C9A3 6C3F
C9A4 6C3B
C9A5 72AE
C9A6 72B0
C9A7 738A
C9A8 79B8
C9A9 808A
C9AA 961E
C9AB 4F0E
C9AC 4F18
C9AD 4F2C
C9AE 4EF5
C9AF 4F14
C9B0 4EF1
C9B1 4F00
C9B2 4EF7
C9B3 4F08
C9B4 4F1D
C9B5 4F02
C9B6 4F05
C9B7 4F22
C9B8 4F13
C9B9 4F04
C9BA 4EF4
C9BB 4F12
C9BC 51B1
C9BD 5213
C9BE 5209
C9BF 5210
C9C0 52A6
C9C1 5322
C9C2 531F
C9C3 534D
C9C4 538A
C9C5 5407
C9C6 56E1
C9C7 56DF
C9C8 572E
C9C9 572A
C9CA 5734
C9CB 593C
C9CC 5980
C9CD 597C
C9CE 5985
C9CF 597B
C9D0 597E
C9D1 5977
C9D2 597F
C9D3 5B56
C9D4 5C15
C9D5 5C25
C9D6 5C7C
C9D7 5C7A
C9D8 5C7B
C9D9 5C7E
C9DA 5DDF
C9DB 5E75
C9DC 5E84
C9DD 5F02
C9DE 5F1A
C9DF 5F74
C9E0 5FD5
C9E1 5FD4
C9E2 5FCF
C9E3 625C
C9E4 625E
C9E5 6264
C9E6 6261
C9E7 6266
C9E8 6262
C9E9 6259
C9EA 6260
C9EB 625A
C9EC 6265
C9ED 65EF
C9EE 65EE
C9EF 673E
C9F0 6739
C9F1 6738
C9F2 673B
C9F3 673A
C9F4 673F
C9F5 673C
C9F6 6733
C9F7 6C18
C9F8 6C46
C9F9 6C52
C9FA 6C5C
C9FB 6C4F
C9FC 6C4A
C9FD 6C54
C9FE 6C4B
CA40 6C4C
CA41 7071
CA42 725E
CA43 72B4
CA44 72B5
CA45 738E
CA46 752A
CA47 767F
CA48 7A75
CA49 7F51
CA4A 8278
CA4B 827C
CA4C 8280
CA4D 827D
CA4E 827F
CA4F 864D
CA50 897E
CA51 9099
CA52 9097
CA53 9098
CA54 909B
CA55 9094
CA56 9622
CA57 9624
CA58 9620
CA59 9623
CA5A 4F56
CA5B 4F3B
CA5C 4F62
CA5D 4F49
CA5E 4F53
CA5F 4F64
CA60 4F3E
CA61 4F67
CA62 4F52
CA63 4F5F
CA64 4F41
CA65 4F58
CA66 4F2D
CA67 4F33
CA68 4F3F
CA69 4F61
CA6A 518F
CA6B 51B9
CA6C 521C
CA6D 521E
CA6E 5221
CA6F 52AD
CA70 52AE
CA71 5309
CA72 5363
CA73 5372
CA74 538E
CA75 538F
CA76 5430
CA77 5437
CA78 542A
CA79 5454
CA7A 5445
CA7B 5419
CA7C 541C
CA7D 5425
CA7E 5418
CAA1 543D
CAA2 544F
CAA3 5441
CAA4 5428
CAA5 5424
CAA6 5447
CAA7 56EE
CAA8 56E7
CAA9 56E5
CAAA 5741
CAAB 5745
CAAC 574C
CAAD 5749
CAAE 574B
CAAF 5752
CAB0 5906
CAB1 5940
CAB2 59A6
CAB3 5998
CAB4 59A0
CAB5 5997
CAB6 598E
CAB7 59A2
CAB8 5990
CAB9 598F
CABA 59A7
CABB 59A1
CABC 5B8E
CABD 5B92
CABE 5C28
CABF 5C2A
CAC0 5C8D
CAC1 5C8F
CAC2 5C88
CAC3 5C8B
CAC4 5C89
CAC5 5C92
CAC6 5C8A
CAC7 5C86
CAC8 5C93
CAC9 5C95
CACA 5DE0
CACB 5E0A
CACC 5E0E
CACD 5E8B
CACE 5E89
CACF 5E8C
CAD0 5E88
CAD1 5E8D
CAD2 5F05
CAD3 5F1D
CAD4 5F78
CAD5 5F76
CAD6 5FD2
CAD7 5FD1
CAD8 5FD0
CAD9 5FED
CADA 5FE8
CADB 5FEE
CADC 5FF3
CADD 5FE1
CADE 5FE4
CADF 5FE3
CAE0 5FFA
CAE1 5FEF
CAE2 5FF7
CAE3 5FFB
CAE4 6000
CAE5 5FF4
CAE6 623A
CAE7 6283
CAE8 628C
CAE9 628E
CAEA 628F
CAEB 6294
CAEC 6287
CAED 6271
CAEE 627B
CAEF 627A
CAF0 6270
CAF1 6281
CAF2 6288
CAF3 6277
CAF4 627D
CAF5 6272
CAF6 6274
CAF7 6537
CAF8 65F0
CAF9 65F4
CAFA 65F3
CAFB 65F2
CAFC 65F5
CAFD 6745
CAFE 6747
CB40 6759
CB41 6755
CB42 674C
CB43 6748
CB44 675D
CB45 674D
CB46 675A
CB47 674B
CB48 6BD0
CB49 6C19
CB4A 6C1A
CB4B 6C78
CB4C 6C67
CB4D 6C6B
CB4E 6C84
CB4F 6C8B
CB50 6C8F
CB51 6C71
CB52 6C6F
CB53 6C69
CB54 6C9A
CB55 6C6D
CB56 6C87
CB57 6C95
CB58 6C9C
CB59 6C66
CB5A 6C73
CB5B 6C65
CB5C 6C7B
CB5D 6C8E
CB5E 7074
CB5F 707A
CB60 7263
CB61 72BF
CB62 72BD
CB63 72C3
CB64 72C6
CB65 72C1
CB66 72BA
CB67 72C5
CB68 7395
CB69 7397
CB6A 7393
CB6B 7394
CB6C 7392
CB6D 753A
CB6E 7539
CB6F 7594
CB70 7595
CB71 7681
CB72 793D
CB73 8034
CB74 8095
CB75 8099
CB76 8090
CB77 8092
CB78 809C
CB79 8290
CB7A 828F
CB7B 8285
CB7C 828E
CB7D 8291
CB7E 8293
CBA1 828A
CBA2 8283
CBA3 8284
CBA4 8C78
CBA5 8FC9
CBA6 8FBF
CBA7 909F
CBA8 90A1
CBA9 90A5
CBAA 909E
CBAB 90A7
CBAC 90A0
CBAD 9630
CBAE 9628
CBAF 962F
CBB0 962D
CBB1 4E33
CBB2 4F98
CBB3 4F7C
CBB4 4F85
CBB5 4F7D
CBB6 4F80
CBB7 4F87
CBB8 4F76
CBB9 4F74
CBBA 4F89
CBBB 4F84
CBBC 4F77
CBBD 4F4C
CBBE 4F97
CBBF 4F6A
CBC0 4F9A
CBC1 4F79
CBC2 4F81
CBC3 4F78
CBC4 4F90
CBC5 4F9C
CBC6 4F94
CBC7 4F9E
CBC8 4F92
CBC9 4F82
CBCA 4F95
CBCB 4F6B
CBCC 4F6E
CBCD 519E
CBCE 51BC
CBCF 51BE
CBD0 5235
CBD1 5232
CBD2 5233
CBD3 5246
CBD4 5231
CBD5 52BC
CBD6 530A
CBD7 530B
CBD8 533C
CBD9 5392
CBDA 5394
CBDB 5487
CBDC 547F
CBDD 5481
CBDE 5491
CBDF 5482
CBE0 5488
CBE1 546B
CBE2 547A
CBE3 547E
CBE4 5465
CBE5 546C
CBE6 5474
CBE7 5466
CBE8 548D
CBE9 546F
CBEA 5461
CBEB 5460
CBEC 5498
CBED 5463
CBEE 5467
CBEF 5464
CBF0 56F7
CBF1 56F9
CBF2 576F
CBF3 5772
CBF4 576D
CBF5 576B
CBF6 5771
CBF7 5770
CBF8 5776
CBF9 5780
CBFA 5775
CBFB 577B
CBFC 5773
CBFD 5774
CBFE 5762
CC40 5768
CC41 577D
CC42 590C
CC43 5945
CC44 59B5
CC45 59BA
CC46 59CF
CC47 59CE
CC48 59B2
CC49 59CC
CC4A 59C1
CC4B 59B6
CC4C 59BC
CC4D 59C3
CC4E 59D6
CC4F 59B1
CC50 59BD
CC51 59C0
CC52 59C8
CC53 59B4
CC54 59C7
CC55 5B62
CC56 5B65
CC57 5B93
CC58 5B95
CC59 5C44
CC5A 5C47
CC5B 5CAE
CC5C 5CA4
CC5D 5CA0
CC5E 5CB5
CC5F 5CAF
CC60 5CA8
CC61 5CAC
CC62 5C9F
CC63 5CA3
CC64 5CAD
CC65 5CA2
CC66 5CAA
CC67 5CA7
CC68 5C9D
CC69 5CA5
CC6A 5CB6
CC6B 5CB0
CC6C 5CA6
CC6D 5E17
CC6E 5E14
CC6F 5E19
CC70 5F28
CC71 5F22
CC72 5F23
CC73 5F24
CC74 5F54
CC75 5F82
CC76 5F7E
CC77 5F7D
CC78 5FDE
CC79 5FE5
CC7A 602D
CC7B 6026
CC7C 6019
CC7D 6032
CC7E 600B
CCA1 6034
CCA2 600A
CCA3 6017
CCA4 6033
CCA5 601A
CCA6 601E
CCA7 602C
CCA8 6022
CCA9 600D
CCAA 6010
CCAB 602E
CCAC 6013
CCAD 6011
CCAE 600C
CCAF 6009
CCB0 601C
CCB1 6214
CCB2 623D
CCB3 62AD
CCB4 62B4
CCB5 62D1
CCB6 62BE
CCB7 62AA
CCB8 62B6
CCB9 62CA
CCBA 62AE
CCBB 62B3
CCBC 62AF
CCBD 62BB
CCBE 62A9
CCBF 62B0
CCC0 62B8
CCC1 653D
CCC2 65A8
CCC3 65BB
CCC4 6609
CCC5 65FC
CCC6 6604
CCC7 6612
CCC8 6608
CCC9 65FB
CCCA 6603
CCCB 660B
CCCC 660D
CCCD 6605
CCCE 65FD
CCCF 6611
CCD0 6610
CCD1 66F6
CCD2 670A
CCD3 6785
CCD4 676C
CCD5 678E
CCD6 6792
CCD7 6776
CCD8 677B
CCD9 6798
CCDA 6786
CCDB 6784
CCDC 6774
CCDD 678D
CCDE 678C
CCDF 677A
CCE0 679F
CCE1 6791
CCE2 6799
CCE3 6783
CCE4 677D
CCE5 6781
CCE6 6778
CCE7 6779
CCE8 6794
CCE9 6B25
CCEA 6B80
CCEB 6B7E
CCEC 6BDE
CCED 6C1D
CCEE 6C93
CCEF 6CEC
CCF0 6CEB
CCF1 6CEE
CCF2 6CD9
CCF3 6CB6
CCF4 6CD4
CCF5 6CAD
CCF6 6CE7
CCF7 6CB7
CCF8 6CD0
CCF9 6CC2
CCFA 6CBA
CCFB 6CC3
CCFC 6CC6
CCFD 6CED
CCFE 6CF2
CD40 6CD2
CD41 6CDD
CD42 6CB4
CD43 6C8A
CD44 6C9D
CD45 6C80
CD46 6CDE
CD47 6CC0
CD48 6D30
CD49 6CCD
CD4A 6CC7
CD4B 6CB0
CD4C 6CF9
CD4D 6CCF
CD4E 6CE9
CD4F 6CD1
CD50 7094
CD51 7098
CD52 7085
CD53 7093
CD54 7086
CD55 7084
CD56 7091
CD57 7096
CD58 7082
CD59 709A
CD5A 7083
CD5B 726A
CD5C 72D6
CD5D 72CB
CD5E 72D8
CD5F 72C9
CD60 72DC
CD61 72D2
CD62 72D4
CD63 72DA
CD64 72CC
CD65 72D1
CD66 73A4
CD67 73A1
CD68 73AD
CD69 73A6
CD6A 73A2
CD6B 73A0
CD6C 73AC
CD6D 739D
CD6E 74DD
CD6F 74E8
CD70 753F
CD71 7540
CD72 753E
CD73 758C
CD74 7598
CD75 76AF
CD76 76F3
CD77 76F1
CD78 76F0
CD79 76F5
CD7A 77F8
CD7B 77FC
CD7C 77F9
CD7D 77FB
CD7E 77FA
CDA1 77F7
CDA2 7942
CDA3 793F
CDA4 79C5
CDA5 7A78
CDA6 7A7B
CDA7 7AFB
CDA8 7C75
CDA9 7CFD
CDAA 8035
CDAB 808F
CDAC 80AE
CDAD 80A3
CDAE 80B8
CDAF 80B5
CDB0 80AD
CDB1 8220
CDB2 82A0
CDB3 82C0
CDB4 82AB
CDB5 829A
CDB6 8298
CDB7 829B
CDB8 82B5
CDB9 82A7
CDBA 82AE
CDBB 82BC
CDBC 829E
CDBD 82BA
CDBE 82B4
CDBF 82A8
CDC0 82A1
CDC1 82A9
CDC2 82C2
CDC3 82A4
CDC4 82C3
CDC5 82B6
CDC6 82A2
CDC7 8670
CDC8 866F
CDC9 866D
CDCA 866E
CDCB 8C56
CDCC 8FD2
CDCD 8FCB
CDCE 8FD3
CDCF 8FCD
CDD0 8FD6
CDD1 8FD5
CDD2 8FD7
CDD3 90B2
CDD4 90B4
CDD5 90AF
CDD6 90B3
CDD7 90B0
CDD8 9639
CDD9 963D
CDDA 963C
CDDB 963A
CDDC 9643
CDDD 4FCD
CDDE 4FC5
CDDF 4FD3
CDE0 4FB2
CDE1 4FC9
CDE2 4FCB
CDE3 4FC1
CDE4 4FD4
CDE5 4FDC
CDE6 4FD9
CDE7 4FBB
CDE8 4FB3
CDE9 4FDB
CDEA 4FC7
CDEB 4FD6
CDEC 4FBA
CDED 4FC0
CDEE 4FB9
CDEF 4FEC
CDF0 5244
CDF1 5249
CDF2 52C0
CDF3 52C2
CDF4 533D
CDF5 537C
CDF6 5397
CDF7 5396
CDF8 5399
CDF9 5398
CDFA 54BA
CDFB 54A1
CDFC 54AD
CDFD 54A5
CDFE 54CF
CE40 54C3
CE41 830D
CE42 54B7
CE43 54AE
CE44 54D6
CE45 54B6
CE46 54C5
CE47 54C6
CE48 54A0
CE49 5470
CE4A 54BC
CE4B 54A2
CE4C 54BE
CE4D 5472
CE4E 54DE
CE4F 54B0
CE50 57B5
CE51 579E
CE52 579F
CE53 57A4
CE54 578C
CE55 5797
CE56 579D
CE57 579B
CE58 5794
CE59 5798
CE5A 578F
CE5B 5799
CE5C 57A5
CE5D 579A
CE5E 5795
CE5F 58F4
CE60 590D
CE61 5953
CE62 59E1
CE63 59DE
CE64 59EE
CE65 5A00
CE66 59F1
CE67 59DD
CE68 59FA
CE69 59FD
CE6A 59FC
CE6B 59F6
CE6C 59E4
CE6D 59F2
CE6E 59F7
CE6F 59DB
CE70 59E9
CE71 59F3
CE72 59F5
CE73 59E0
CE74 59FE
CE75 59F4
CE76 59ED
CE77 5BA8
CE78 5C4C
CE79 5CD0
CE7A 5CD8
CE7B 5CCC
CE7C 5CD7
CE7D 5CCB
CE7E 5CDB
CEA1 5CDE
CEA2 5CDA
CEA3 5CC9
CEA4 5CC7
CEA5 5CCA
CEA6 5CD6
CEA7 5CD3
CEA8 5CD4
CEA9 5CCF
CEAA 5CC8
CEAB 5CC6
CEAC 5CCE
CEAD 5CDF
CEAE 5CF8
CEAF 5DF9
CEB0 5E21
CEB1 5E22
CEB2 5E23
CEB3 5E20
CEB4 5E24
CEB5 5EB0
CEB6 5EA4
CEB7 5EA2
CEB8 5E9B
CEB9 5EA3
CEBA 5EA5
CEBB 5F07
CEBC 5F2E
CEBD 5F56
CEBE 5F86
CEBF 6037
CEC0 6039
CEC1 6054
CEC2 6072
CEC3 605E
CEC4 6045
CEC5 6053
CEC6 6047
CEC7 6049
CEC8 605B
CEC9 604C
CECA 6040
CECB 6042
CECC 605F
CECD 6024
CECE 6044
CECF 6058
CED0 6066
CED1 606E
CED2 6242
CED3 6243
CED4 62CF
CED5 630D
CED6 630B
CED7 62F5
CED8 630E
CED9 6303
CEDA 62EB
CEDB 62F9
CEDC 630F
CEDD 630C
CEDE 62F8
CEDF 62F6
CEE0 6300
CEE1 6313
CEE2 6314
CEE3 62FA
CEE4 6315
CEE5 62FB
CEE6 62F0
CEE7 6541
CEE8 6543
CEE9 65AA
CEEA 65BF
CEEB 6636
CEEC 6621
CEED 6632
CEEE 6635
CEEF 661C
CEF0 6626
CEF1 6622
CEF2 6633
CEF3 662B
CEF4 663A
CEF5 661D
CEF6 6634
CEF7 6639
CEF8 662E
CEF9 670F
CEFA 6710
CEFB 67C1
CEFC 67F2
CEFD 67C8
CEFE 67BA
CF40 67DC
CF41 67BB
CF42 67F8
CF43 67D8
CF44 67C0
CF45 67B7
CF46 67C5
CF47 67EB
CF48 67E4
CF49 67DF
CF4A 67B5
CF4B 67CD
CF4C 67B3
CF4D 67F7
CF4E 67F6
CF4F 67EE
CF50 67E3
CF51 67C2
CF52 67B9
CF53 67CE
CF54 67E7
CF55 67F0
CF56 67B2
CF57 67FC
CF58 67C6
CF59 67ED
CF5A 67CC
CF5B 67AE
CF5C 67E6
CF5D 67DB
CF5E 67FA
CF5F 67C9
CF60 67CA
CF61 67C3
CF62 67EA
CF63 67CB
CF64 6B28
CF65 6B82
CF66 6B84
CF67 6BB6
CF68 6BD6
CF69 6BD8
CF6A 6BE0
CF6B 6C20
CF6C 6C21
CF6D 6D28
CF6E 6D34
CF6F 6D2D
CF70 6D1F
CF71 6D3C
CF72 6D3F
CF73 6D12
CF74 6D0A
CF75 6CDA
CF76 6D33
CF77 6D04
CF78 6D19
CF79 6D3A
CF7A 6D1A
CF7B 6D11
CF7C 6D00
CF7D 6D1D
CF7E 6D42
CFA1 6D01
CFA2 6D18
CFA3 6D37
CFA4 6D03
CFA5 6D0F
CFA6 6D40
CFA7 6D07
CFA8 6D20
CFA9 6D2C
CFAA 6D08
CFAB 6D22
CFAC 6D09
CFAD 6D10
CFAE 70B7
CFAF 709F
CFB0 70BE
CFB1 70B1
CFB2 70B0
CFB3 70A1
CFB4 70B4
CFB5 70B5
CFB6 70A9
CFB7 7241
CFB8 7249
CFB9 724A
CFBA 726C
CFBB 7270
CFBC 7273
CFBD 726E
CFBE 72CA
CFBF 72E4
CFC0 72E8
CFC1 72EB
CFC2 72DF
CFC3 72EA
CFC4 72E6
CFC5 72E3
CFC6 7385
CFC7 73CC
CFC8 73C2
CFC9 73C8
CFCA 73C5
CFCB 73B9
CFCC 73B6
CFCD 73B5
CFCE 73B4
CFCF 73EB
CFD0 73BF
CFD1 73C7
CFD2 73BE
CFD3 73C3
CFD4 73C6
CFD5 73B8
CFD6 73CB
CFD7 74EC
CFD8 74EE
CFD9 752E
CFDA 7547
CFDB 7548
CFDC 75A7
CFDD 75AA
CFDE 7679
CFDF 76C4
CFE0 7708
CFE1 7703
CFE2 7704
CFE3 7705
CFE4 770A
CFE5 76F7
CFE6 76FB
CFE7 76FA
CFE8 77E7
CFE9 77E8
CFEA 7806
CFEB 7811
CFEC 7812
CFED 7805
CFEE 7810
CFEF 780F
CFF0 780E
CFF1 7809
CFF2 7803
CFF3 7813
CFF4 794A
CFF5 794C
CFF6 794B
CFF7 7945
CFF8 7944
CFF9 79D5
CFFA 79CD
CFFB 79CF
CFFC 79D6
CFFD 79CE
CFFE 7A80
D040 7A7E
D041 7AD1
D042 7B00
D043 7B01
D044 7C7A
D045 7C78
D046 7C79
D047 7C7F
D048 7C80
D049 7C81
D04A 7D03
D04B 7D08
D04C 7D01
D04D 7F58
D04E 7F91
D04F 7F8D
D050 7FBE
D051 8007
D052 800E
D053 800F
D054 8014
D055 8037
D056 80D8
D057 80C7
D058 80E0
D059 80D1
D05A 80C8
D05B 80C2
D05C 80D0
D05D 80C5
D05E 80E3
D05F 80D9
D060 80DC
D061 80CA
D062 80D5
D063 80C9
D064 80CF
D065 80D7
D066 80E6
D067 80CD
D068 81FF
D069 8221
D06A 8294
D06B 82D9
D06C 82FE
D06D 82F9
D06E 8307
D06F 82E8
D070 8300
D071 82D5
D072 833A
D073 82EB
D074 82D6
D075 82F4
D076 82EC
D077 82E1
D078 82F2
D079 82F5
D07A 830C
D07B 82FB
D07C 82F6
D07D 82F0
D07E 82EA
D0A1 82E4
D0A2 82E0
D0A3 82FA
D0A4 82F3
D0A5 82ED
D0A6 8677
D0A7 8674
D0A8 867C
D0A9 8673
D0AA 8841
D0AB 884E
D0AC 8867
D0AD 886A
D0AE 8869
D0AF 89D3
D0B0 8A04
D0B1 8A07
D0B2 8D72
D0B3 8FE3
D0B4 8FE1
D0B5 8FEE
D0B6 8FE0
D0B7 90F1
D0B8 90BD
D0B9 90BF
D0BA 90D5
D0BB 90C5
D0BC 90BE
D0BD 90C7
D0BE 90CB
D0BF 90C8
D0C0 91D4
D0C1 91D3
D0C2 9654
D0C3 964F
D0C4 9651
D0C5 9653
D0C6 964A
D0C7 964E
D0C8 501E
D0C9 5005
D0CA 5007
D0CB 5013
D0CC 5022
D0CD 5030
D0CE 501B
D0CF 4FF5
D0D0 4FF4
D0D1 5033
D0D2 5037
D0D3 502C
D0D4 4FF6
D0D5 4FF7
D0D6 5017
D0D7 501C
D0D8 5020
D0D9 5027
D0DA 5035
D0DB 502F
D0DC 5031
D0DD 500E
D0DE 515A
D0DF 5194
D0E0 5193
D0E1 51CA
D0E2 51C4
D0E3 51C5
D0E4 51C8
D0E5 51CE
D0E6 5261
D0E7 525A
D0E8 5252
D0E9 525E
D0EA 525F
D0EB 5255
D0EC 5262
D0ED 52CD
D0EE 530E
D0EF 539E
D0F0 5526
D0F1 54E2
D0F2 5517
D0F3 5512
D0F4 54E7
D0F5 54F3
D0F6 54E4
D0F7 551A
D0F8 54FF
D0F9 5504
D0FA 5508
D0FB 54EB
D0FC 5511
D0FD 5505
D0FE 54F1
D140 550A
D141 54FB
D142 54F7
D143 54F8
D144 54E0
D145 550E
D146 5503
D147 550B
D148 5701
D149 5702
D14A 57CC
D14B 5832
D14C 57D5
D14D 57D2
D14E 57BA
D14F 57C6
D150 57BD
D151 57BC
D152 57B8
D153 57B6
D154 57BF
D155 57C7
D156 57D0
D157 57B9
D158 57C1
D159 590E
D15A 594A
D15B 5A19
D15C 5A16
D15D 5A2D
D15E 5A2E
D15F 5A15
D160 5A0F
D161 5A17
D162 5A0A
D163 5A1E
D164 5A33
D165 5B6C
D166 5BA7
D167 5BAD
D168 5BAC
D169 5C03
D16A 5C56
D16B 5C54
D16C 5CEC
D16D 5CFF
D16E 5CEE
D16F 5CF1
D170 5CF7
D171 5D00
D172 5CF9
D173 5E29
D174 5E28
D175 5EA8
D176 5EAE
D177 5EAA
D178 5EAC
D179 5F33
D17A 5F30
D17B 5F67
D17C 605D
D17D 605A
D17E 6067
D1A1 6041
D1A2 60A2
D1A3 6088
D1A4 6080
D1A5 6092
D1A6 6081
D1A7 609D
D1A8 6083
D1A9 6095
D1AA 609B
D1AB 6097
D1AC 6087
D1AD 609C
D1AE 608E
D1AF 6219
D1B0 6246
D1B1 62F2
D1B2 6310
D1B3 6356
D1B4 632C
D1B5 6344
D1B6 6345
D1B7 6336
D1B8 6343
D1B9 63E4
D1BA 6339
D1BB 634B
D1BC 634A
D1BD 633C
D1BE 6329
D1BF 6341
D1C0 6334
D1C1 6358
D1C2 6354
D1C3 6359
D1C4 632D
D1C5 6347
D1C6 6333
D1C7 635A
D1C8 6351
D1C9 6338
D1CA 6357
D1CB 6340
D1CC 6348
D1CD 654A
D1CE 6546
D1CF 65C6
D1D0 65C3
D1D1 65C4
D1D2 65C2
D1D3 664A
D1D4 665F
D1D5 6647
D1D6 6651
D1D7 6712
D1D8 6713
D1D9 681F
D1DA 681A
D1DB 6849
D1DC 6832
D1DD 6833
D1DE 683B
D1DF 684B
D1E0 684F
D1E1 6816
D1E2 6831
D1E3 681C
D1E4 6835
D1E5 682B
D1E6 682D
D1E7 682F
D1E8 684E
D1E9 6844
D1EA 6834
D1EB 681D
D1EC 6812
D1ED 6814
D1EE 6826
D1EF 6828
D1F0 682E
D1F1 684D
D1F2 683A
D1F3 6825
D1F4 6820
D1F5 6B2C
D1F6 6B2F
D1F7 6B2D
D1F8 6B31
D1F9 6B34
D1FA 6B6D
D1FB 8082
D1FC 6B88
D1FD 6BE6
D1FE 6BE4
D240 6BE8
D241 6BE3
D242 6BE2
D243 6BE7
D244 6C25
D245 6D7A
D246 6D63
D247 6D64
D248 6D76
D249 6D0D
D24A 6D61
D24B 6D92
D24C 6D58
D24D 6D62
D24E 6D6D
D24F 6D6F
D250 6D91
D251 6D8D
D252 6DEF
D253 6D7F
D254 6D86
D255 6D5E
D256 6D67
D257 6D60
D258 6D97
D259 6D70
D25A 6D7C
D25B 6D5F
D25C 6D82
D25D 6D98
D25E 6D2F
D25F 6D68
D260 6D8B
D261 6D7E
D262 6D80
D263 6D84
D264 6D16
D265 6D83
D266 6D7B
D267 6D7D
D268 6D75
D269 6D90
D26A 70DC
D26B 70D3
D26C 70D1
D26D 70DD
D26E 70CB
D26F 7F39
D270 70E2
D271 70D7
D272 70D2
D273 70DE
D274 70E0
D275 70D4
D276 70CD
D277 70C5
D278 70C6
D279 70C7
D27A 70DA
D27B 70CE
D27C 70E1
D27D 7242
D27E 7278
D2A1 7277
D2A2 7276
D2A3 7300
D2A4 72FA
D2A5 72F4
D2A6 72FE
D2A7 72F6
D2A8 72F3
D2A9 72FB
D2AA 7301
D2AB 73D3
D2AC 73D9
D2AD 73E5
D2AE 73D6
D2AF 73BC
D2B0 73E7
D2B1 73E3
D2B2 73E9
D2B3 73DC
D2B4 73D2
D2B5 73DB
D2B6 73D4
D2B7 73DD
D2B8 73DA
D2B9 73D7
D2BA 73D8
D2BB 73E8
D2BC 74DE
D2BD 74DF
D2BE 74F4
D2BF 74F5
D2C0 7521
D2C1 755B
D2C2 755F
D2C3 75B0
D2C4 75C1
D2C5 75BB
D2C6 75C4
D2C7 75C0
D2C8 75BF
D2C9 75B6
D2CA 75BA
D2CB 768A
D2CC 76C9
D2CD 771D
D2CE 771B
D2CF 7710
D2D0 7713
D2D1 7712
D2D2 7723
D2D3 7711
D2D4 7715
D2D5 7719
D2D6 771A
D2D7 7722
D2D8 7727
D2D9 7823
D2DA 782C
D2DB 7822
D2DC 7835
D2DD 782F
D2DE 7828
D2DF 782E
D2E0 782B
D2E1 7821
D2E2 7829
D2E3 7833
D2E4 782A
D2E5 7831
D2E6 7954
D2E7 795B
D2E8 794F
D2E9 795C
D2EA 7953
D2EB 7952
D2EC 7951
D2ED 79EB
D2EE 79EC
D2EF 79E0
D2F0 79EE
D2F1 79ED
D2F2 79EA
D2F3 79DC
D2F4 79DE
D2F5 79DD
D2F6 7A86
D2F7 7A89
D2F8 7A85
D2F9 7A8B
D2FA 7A8C
D2FB 7A8A
D2FC 7A87
D2FD 7AD8
D2FE 7B10
D340 7B04
D341 7B13
D342 7B05
D343 7B0F
D344 7B08
D345 7B0A
D346 7B0E
D347 7B09
D348 7B12
D349 7C84
D34A 7C91
D34B 7C8A
D34C 7C8C
D34D 7C88
D34E 7C8D
D34F 7C85
D350 7D1E
D351 7D1D
D352 7D11
D353 7D0E
D354 7D18
D355 7D16
D356 7D13
D357 7D1F
D358 7D12
D359 7D0F
D35A 7D0C
D35B 7F5C
D35C 7F61
D35D 7F5E
D35E 7F60
D35F 7F5D
D360 7F5B
D361 7F96
D362 7F92
D363 7FC3
D364 7FC2
D365 7FC0
D366 8016
D367 803E
D368 8039
D369 80FA
D36A 80F2
D36B 80F9
D36C 80F5
D36D 8101
D36E 80FB
D36F 8100
D370 8201
D371 822F
D372 8225
D373 8333
D374 832D
D375 8344
D376 8319
D377 8351
D378 8325
D379 8356
D37A 833F
D37B 8341
D37C 8326
D37D 831C
D37E 8322
D3A1 8342
D3A2 834E
D3A3 831B
D3A4 832A
D3A5 8308
D3A6 833C
D3A7 834D
D3A8 8316
D3A9 8324
D3AA 8320
D3AB 8337
D3AC 832F
D3AD 8329
D3AE 8347
D3AF 8345
D3B0 834C
D3B1 8353
D3B2 831E
D3B3 832C
D3B4 834B
D3B5 8327
D3B6 8348
D3B7 8653
D3B8 8652
D3B9 86A2
D3BA 86A8
D3BB 8696
D3BC 868D
D3BD 8691
D3BE 869E
D3BF 8687
D3C0 8697
D3C1 8686
D3C2 868B
D3C3 869A
D3C4 8685
D3C5 86A5
D3C6 8699
D3C7 86A1
D3C8 86A7
D3C9 8695
D3CA 8698
D3CB 868E
D3CC 869D
D3CD 8690
D3CE 8694
D3CF 8843
D3D0 8844
D3D1 886D
D3D2 8875
D3D3 8876
D3D4 8872
D3D5 8880
D3D6 8871
D3D7 887F
D3D8 886F
D3D9 8883
D3DA 887E
D3DB 8874
D3DC 887C
D3DD 8A12
D3DE 8C47
D3DF 8C57
D3E0 8C7B
D3E1 8CA4
D3E2 8CA3
D3E3 8D76
D3E4 8D78
D3E5 8DB5
D3E6 8DB7
D3E7 8DB6
D3E8 8ED1
D3E9 8ED3
D3EA 8FFE
D3EB 8FF5
D3EC 9002
D3ED 8FFF
D3EE 8FFB
D3EF 9004
D3F0 8FFC
D3F1 8FF6
D3F2 90D6
D3F3 90E0
D3F4 90D9
D3F5 90DA
D3F6 90E3
D3F7 90DF
D3F8 90E5
D3F9 90D8
D3FA 90DB
D3FB 90D7
D3FC 90DC
D3FD 90E4
D3FE 9150
D440 914E
D441 914F
D442 91D5
D443 91E2
D444 91DA
D445 965C
D446 965F
D447 96BC
D448 98E3
D449 9ADF
D44A 9B2F
D44B 4E7F
D44C 5070
D44D 506A
D44E 5061
D44F 505E
D450 5060
D451 5053
D452 504B
D453 505D
D454 5072
D455 5048
D456 504D
D457 5041
D458 505B
D459 504A
D45A 5062
D45B 5015
D45C 5045
D45D 505F
D45E 5069
D45F 506B
D460 5063
D461 5064
D462 5046
D463 5040
D464 506E
D465 5073
D466 5057
D467 5051
D468 51D0
D469 526B
D46A 526D
D46B 526C
D46C 526E
D46D 52D6
D46E 52D3
D46F 532D
D470 539C
D471 5575
D472 5576
D473 553C
D474 554D
D475 5550
D476 5534
D477 552A
D478 5551
D479 5562
D47A 5536
D47B 5535
D47C 5530
D47D 5552
D47E 5545
D4A1 550C
D4A2 5532
D4A3 5565
D4A4 554E
D4A5 5539
D4A6 5548
D4A7 552D
D4A8 553B
D4A9 5540
D4AA 554B
D4AB 570A
D4AC 5707
D4AD 57FB
D4AE 5814
D4AF 57E2
D4B0 57F6
D4B1 57DC
D4B2 57F4
D4B3 5800
D4B4 57ED
D4B5 57FD
D4B6 5808
D4B7 57F8
D4B8 580B
D4B9 57F3
D4BA 57CF
D4BB 5807
D4BC 57EE
D4BD 57E3
D4BE 57F2
D4BF 57E5
D4C0 57EC
D4C1 57E1
D4C2 580E
D4C3 57FC
D4C4 5810
D4C5 57E7
D4C6 5801
D4C7 580C
D4C8 57F1
D4C9 57E9
D4CA 57F0
D4CB 580D
D4CC 5804
D4CD 595C
D4CE 5A60
D4CF 5A58
D4D0 5A55
D4D1 5A67
D4D2 5A5E
D4D3 5A38
D4D4 5A35
D4D5 5A6D
D4D6 5A50
D4D7 5A5F
D4D8 5A65
D4D9 5A6C
D4DA 5A53
D4DB 5A64
D4DC 5A57
D4DD 5A43
D4DE 5A5D
D4DF 5A52
D4E0 5A44
D4E1 5A5B
D4E2 5A48
D4E3 5A8E
D4E4 5A3E
D4E5 5A4D
D4E6 5A39
D4E7 5A4C
D4E8 5A70
D4E9 5A69
D4EA 5A47
D4EB 5A51
D4EC 5A56
D4ED 5A42
D4EE 5A5C
D4EF 5B72
D4F0 5B6E
D4F1 5BC1
D4F2 5BC0
D4F3 5C59
D4F4 5D1E
D4F5 5D0B
D4F6 5D1D
D4F7 5D1A
D4F8 5D20
D4F9 5D0C
D4FA 5D28
D4FB 5D0D
D4FC 5D26
D4FD 5D25
D4FE 5D0F
D540 5D30
D541 5D12
D542 5D23
D543 5D1F
D544 5D2E
D545 5E3E
D546 5E34
D547 5EB1
D548 5EB4
D549 5EB9
D54A 5EB2
D54B 5EB3
D54C 5F36
D54D 5F38
D54E 5F9B
D54F 5F96
D550 5F9F
D551 608A
D552 6090
D553 6086
D554 60BE
D555 60B0
D556 60BA
D557 60D3
D558 60D4
D559 60CF
D55A 60E4
D55B 60D9
D55C 60DD
D55D 60C8
D55E 60B1
D55F 60DB
D560 60B7
D561 60CA
D562 60BF
D563 60C3
D564 60CD
D565 60C0
D566 6332
D567 6365
D568 638A
D569 6382
D56A 637D
D56B 63BD
D56C 639E
D56D 63AD
D56E 639D
D56F 6397
D570 63AB
D571 638E
D572 636F
D573 6387
D574 6390
D575 636E
D576 63AF
D577 6375
D578 639C
D579 636D
D57A 63AE
D57B 637C
D57C 63A4
D57D 633B
D57E 639F
D5A1 6378
D5A2 6385
D5A3 6381
D5A4 6391
D5A5 638D
D5A6 6370
D5A7 6553
D5A8 65CD
D5A9 6665
D5AA 6661
D5AB 665B
D5AC 6659
D5AD 665C
D5AE 6662
D5AF 6718
D5B0 6879
D5B1 6887
D5B2 6890
D5B3 689C
D5B4 686D
D5B5 686E
D5B6 68AE
D5B7 68AB
D5B8 6956
D5B9 686F
D5BA 68A3
D5BB 68AC
D5BC 68A9
D5BD 6875
D5BE 6874
D5BF 68B2
D5C0 688F
D5C1 6877
D5C2 6892
D5C3 687C
D5C4 686B
D5C5 6872
D5C6 68AA
D5C7 6880
D5C8 6871
D5C9 687E
D5CA 689B
D5CB 6896
D5CC 688B
D5CD 68A0
D5CE 6889
D5CF 68A4
D5D0 6878
D5D1 687B
D5D2 6891
D5D3 688C
D5D4 688A
D5D5 687D
D5D6 6B36
D5D7 6B33
D5D8 6B37
D5D9 6B38
D5DA 6B91
D5DB 6B8F
D5DC 6B8D
D5DD 6B8E
D5DE 6B8C
D5DF 6C2A
D5E0 6DC0
D5E1 6DAB
D5E2 6DB4
D5E3 6DB3
D5E4 6E74
D5E5 6DAC
D5E6 6DE9
D5E7 6DE2
D5E8 6DB7
D5E9 6DF6
D5EA 6DD4
D5EB 6E00
D5EC 6DC8
D5ED 6DE0
D5EE 6DDF
D5EF 6DD6
D5F0 6DBE
D5F1 6DE5
D5F2 6DDC
D5F3 6DDD
D5F4 6DDB
D5F5 6DF4
D5F6 6DCA
D5F7 6DBD
D5F8 6DED
D5F9 6DF0
D5FA 6DBA
D5FB 6DD5
D5FC 6DC2
D5FD 6DCF
D5FE 6DC9
D640 6DD0
D641 6DF2
D642 6DD3
D643 6DFD
D644 6DD7
D645 6DCD
D646 6DE3
D647 6DBB
D648 70FA
D649 710D
D64A 70F7
D64B 7117
D64C 70F4
D64D 710C
D64E 70F0
D64F 7104
D650 70F3
D651 7110
D652 70FC
D653 70FF
D654 7106
D655 7113
D656 7100
D657 70F8
D658 70F6
D659 710B
D65A 7102
D65B 710E
D65C 727E
D65D 727B
D65E 727C
D65F 727F
D660 731D
D661 7317
D662 7307
D663 7311
D664 7318
D665 730A
D666 7308
D667 72FF
D668 730F
D669 731E
D66A 7388
D66B 73F6
D66C 73F8
D66D 73F5
D66E 7404
D66F 7401
D670 73FD
D671 7407
D672 7400
D673 73FA
D674 73FC
D675 73FF
D676 740C
D677 740B
D678 73F4
D679 7408
D67A 7564
D67B 7563
D67C 75CE
D67D 75D2
D67E 75CF
D6A1 75CB
D6A2 75CC
D6A3 75D1
D6A4 75D0
D6A5 768F
D6A6 7689
D6A7 76D3
D6A8 7739
D6A9 772F
D6AA 772D
D6AB 7731
D6AC 7732
D6AD 7734
D6AE 7733
D6AF 773D
D6B0 7725
D6B1 773B
D6B2 7735
D6B3 7848
D6B4 7852
D6B5 7849
D6B6 784D
D6B7 784A
D6B8 784C
D6B9 7826
D6BA 7845
D6BB 7850
D6BC 7964
D6BD 7967
D6BE 7969
D6BF 796A
D6C0 7963
D6C1 796B
D6C2 7961
D6C3 79BB
D6C4 79FA
D6C5 79F8
D6C6 79F6
D6C7 79F7
D6C8 7A8F
D6C9 7A94
D6CA 7A90
D6CB 7B35
D6CC 7B47
D6CD 7B34
D6CE 7B25
D6CF 7B30
D6D0 7B22
D6D1 7B24
D6D2 7B33
D6D3 7B18
D6D4 7B2A
D6D5 7B1D
D6D6 7B31
D6D7 7B2B
D6D8 7B2D
D6D9 7B2F
D6DA 7B32
D6DB 7B38
D6DC 7B1A
D6DD 7B23
D6DE 7C94
D6DF 7C98
D6E0 7C96
D6E1 7CA3
D6E2 7D35
D6E3 7D3D
D6E4 7D38
D6E5 7D36
D6E6 7D3A
D6E7 7D45
D6E8 7D2C
D6E9 7D29
D6EA 7D41
D6EB 7D47
D6EC 7D3E
D6ED 7D3F
D6EE 7D4A
D6EF 7D3B
D6F0 7D28
D6F1 7F63
D6F2 7F95
D6F3 7F9C
D6F4 7F9D
D6F5 7F9B
D6F6 7FCA
D6F7 7FCB
D6F8 7FCD
D6F9 7FD0
D6FA 7FD1
D6FB 7FC7
D6FC 7FCF
D6FD 7FC9
D6FE 801F
D740 801E
D741 801B
D742 8047
D743 8043
D744 8048
D745 8118
D746 8125
D747 8119
D748 811B
D749 812D
D74A 811F
D74B 812C
D74C 811E
D74D 8121
D74E 8115
D74F 8127
D750 811D
D751 8122
D752 8211
D753 8238
D754 8233
D755 823A
D756 8234
D757 8232
D758 8274
D759 8390
D75A 83A3
D75B 83A8
D75C 838D
D75D 837A
D75E 8373
D75F 83A4
D760 8374
D761 838F
D762 8381
D763 8395
D764 8399
D765 8375
D766 8394
D767 83A9
D768 837D
D769 8383
D76A 838C
D76B 839D
D76C 839B
D76D 83AA
D76E 838B
D76F 837E
D770 83A5
D771 83AF
D772 8388
D773 8397
D774 83B0
D775 837F
D776 83A6
D777 8387
D778 83AE
D779 8376
D77A 839A
D77B 8659
D77C 8656
D77D 86BF
D77E 86B7
D7A1 86C2
D7A2 86C1
D7A3 86C5
D7A4 86BA
D7A5 86B0
D7A6 86C8
D7A7 86B9
D7A8 86B3
D7A9 86B8
D7AA 86CC
D7AB 86B4
D7AC 86BB
D7AD 86BC
D7AE 86C3
D7AF 86BD
D7B0 86BE
D7B1 8852
D7B2 8889
D7B3 8895
D7B4 88A8
D7B5 88A2
D7B6 88AA
D7B7 889A
D7B8 8891
D7B9 88A1
D7BA 889F
D7BB 8898
D7BC 88A7
D7BD 8899
D7BE 889B
D7BF 8897
D7C0 88A4
D7C1 88AC
D7C2 888C
D7C3 8893
D7C4 888E
D7C5 8982
D7C6 89D6
D7C7 89D9
D7C8 89D5
D7C9 8A30
D7CA 8A27
D7CB 8A2C
D7CC 8A1E
D7CD 8C39
D7CE 8C3B
D7CF 8C5C
D7D0 8C5D
D7D1 8C7D
D7D2 8CA5
D7D3 8D7D
D7D4 8D7B
D7D5 8D79
D7D6 8DBC
D7D7 8DC2
D7D8 8DB9
D7D9 8DBF
D7DA 8DC1
D7DB 8ED8
D7DC 8EDE
D7DD 8EDD
D7DE 8EDC
D7DF 8ED7
D7E0 8EE0
D7E1 8EE1
D7E2 9024
D7E3 900B
D7E4 9011
D7E5 901C
D7E6 900C
D7E7 9021
D7E8 90EF
D7E9 90EA
D7EA 90F0
D7EB 90F4
D7EC 90F2
D7ED 90F3
D7EE 90D4
D7EF 90EB
D7F0 90EC
D7F1 90E9
D7F2 9156
D7F3 9158
D7F4 915A
D7F5 9153
D7F6 9155
D7F7 91EC
D7F8 91F4
D7F9 91F1
D7FA 91F3
D7FB 91F8
D7FC 91E4
D7FD 91F9
D7FE 91EA
D840 91EB
D841 91F7
D842 91E8
D843 91EE
D844 957A
D845 9586
D846 9588
D847 967C
D848 966D
D849 966B
D84A 9671
D84B 966F
D84C 96BF
D84D 976A
D84E 9804
D84F 98E5
D850 9997
D851 509B
D852 5095
D853 5094
D854 509E
D855 508B
D856 50A3
D857 5083
D858 508C
D859 508E
D85A 509D
D85B 5068
D85C 509C
D85D 5092
D85E 5082
D85F 5087
D860 515F
D861 51D4
D862 5312
D863 5311
D864 53A4
D865 53A7
D866 5591
D867 55A8
D868 55A5
D869 55AD
D86A 5577
D86B 5645
D86C 55A2
D86D 5593
D86E 5588
D86F 558F
D870 55B5
D871 5581
D872 55A3
D873 5592
D874 55A4
D875 557D
D876 558C
D877 55A6
D878 557F
D879 5595
D87A 55A1
D87B 558E
D87C 570C
D87D 5829
D87E 5837
D8A1 5819
D8A2 581E
D8A3 5827
D8A4 5823
D8A5 5828
D8A6 57F5
D8A7 5848
D8A8 5825
D8A9 581C
D8AA 581B
D8AB 5833
D8AC 583F
D8AD 5836
D8AE 582E
D8AF 5839
D8B0 5838
D8B1 582D
D8B2 582C
D8B3 583B
D8B4 5961
D8B5 5AAF
D8B6 5A94
D8B7 5A9F
D8B8 5A7A
D8B9 5AA2
D8BA 5A9E
D8BB 5A78
D8BC 5AA6
D8BD 5A7C
D8BE 5AA5
D8BF 5AAC
D8C0 5A95
D8C1 5AAE
D8C2 5A37
D8C3 5A84
D8C4 5A8A
D8C5 5A97
D8C6 5A83
D8C7 5A8B
D8C8 5AA9
D8C9 5A7B
D8CA 5A7D
D8CB 5A8C
D8CC 5A9C
D8CD 5A8F
D8CE 5A93
D8CF 5A9D
D8D0 5BEA
D8D1 5BCD
D8D2 5BCB
D8D3 5BD4
D8D4 5BD1
D8D5 5BCA
D8D6 5BCE
D8D7 5C0C
D8D8 5C30
D8D9 5D37
D8DA 5D43
D8DB 5D6B
D8DC 5D41
D8DD 5D4B
D8DE 5D3F
D8DF 5D35
D8E0 5D51
D8E1 5D4E
D8E2 5D55
D8E3 5D33
D8E4 5D3A
D8E5 5D52
D8E6 5D3D
D8E7 5D31
D8E8 5D59
D8E9 5D42
D8EA 5D39
D8EB 5D49
D8EC 5D38
D8ED 5D3C
D8EE 5D32
D8EF 5D36
D8F0 5D40
D8F1 5D45
D8F2 5E44
D8F3 5E41
D8F4 5F58
D8F5 5FA6
D8F6 5FA5
D8F7 5FAB
D8F8 60C9
D8F9 60B9
D8FA 60CC
D8FB 60E2
D8FC 60CE
D8FD 60C4
D8FE 6114
D940 60F2
D941 610A
D942 6116
D943 6105
D944 60F5
D945 6113
D946 60F8
D947 60FC
D948 60FE
D949 60C1
D94A 6103
D94B 6118
D94C 611D
D94D 6110
D94E 60FF
D94F 6104
D950 610B
D951 624A
D952 6394
D953 63B1
D954 63B0
D955 63CE
D956 63E5
D957 63E8
D958 63EF
D959 63C3
D95A 649D
D95B 63F3
D95C 63CA
D95D 63E0
D95E 63F6
D95F 63D5
D960 63F2
D961 63F5
D962 6461
D963 63DF
D964 63BE
D965 63DD
D966 63DC
D967 63C4
D968 63D8
D969 63D3
D96A 63C2
D96B 63C7
D96C 63CC
D96D 63CB
D96E 63C8
D96F 63F0
D970 63D7
D971 63D9
D972 6532
D973 6567
D974 656A
D975 6564
D976 655C
D977 6568
D978 6565
D979 658C
D97A 659D
D97B 659E
D97C 65AE
D97D 65D0
D97E 65D2
D9A1 667C
D9A2 666C
D9A3 667B
D9A4 6680
D9A5 6671
D9A6 6679
D9A7 666A
D9A8 6672
D9A9 6701
D9AA 690C
D9AB 68D3
D9AC 6904
D9AD 68DC
D9AE 692A
D9AF 68EC
D9B0 68EA
D9B1 68F1
D9B2 690F
D9B3 68D6
D9B4 68F7
D9B5 68EB
D9B6 68E4
D9B7 68F6
D9B8 6913
D9B9 6910
D9BA 68F3
D9BB 68E1
D9BC 6907
D9BD 68CC
D9BE 6908
D9BF 6970
D9C0 68B4
D9C1 6911
D9C2 68EF
D9C3 68C6
D9C4 6914
D9C5 68F8
D9C6 68D0
D9C7 68FD
D9C8 68FC
D9C9 68E8
D9CA 690B
D9CB 690A
D9CC 6917
D9CD 68CE
D9CE 68C8
D9CF 68DD
D9D0 68DE
D9D1 68E6
D9D2 68F4
D9D3 68D1
D9D4 6906
D9D5 68D4
D9D6 68E9
D9D7 6915
D9D8 6925
D9D9 68C7
D9DA 6B39
D9DB 6B3B
D9DC 6B3F
D9DD 6B3C
D9DE 6B94
D9DF 6B97
D9E0 6B99
D9E1 6B95
D9E2 6BBD
D9E3 6BF0
D9E4 6BF2
D9E5 6BF3
D9E6 6C30
D9E7 6DFC
D9E8 6E46
D9E9 6E47
D9EA 6E1F
D9EB 6E49
D9EC 6E88
D9ED 6E3C
D9EE 6E3D
D9EF 6E45
D9F0 6E62
D9F1 6E2B
D9F2 6E3F
D9F3 6E41
D9F4 6E5D
D9F5 6E73
D9F6 6E1C
D9F7 6E33
D9F8 6E4B
D9F9 6E40
D9FA 6E51
D9FB 6E3B
D9FC 6E03
D9FD 6E2E
D9FE 6E5E
DA40 6E68
DA41 6E5C
DA42 6E61
DA43 6E31
DA44 6E28
DA45 6E60
DA46 6E71
DA47 6E6B
DA48 6E39
DA49 6E22
DA4A 6E30
DA4B 6E53
DA4C 6E65
DA4D 6E27
DA4E 6E78
DA4F 6E64
DA50 6E77
DA51 6E55
DA52 6E79
DA53 6E52
DA54 6E66
DA55 6E35
DA56 6E36
DA57 6E5A
DA58 7120
DA59 711E
DA5A 712F
DA5B 70FB
DA5C 712E
DA5D 7131
DA5E 7123
DA5F 7125
DA60 7122
DA61 7132
DA62 711F
DA63 7128
DA64 713A
DA65 711B
DA66 724B
DA67 725A
DA68 7288
DA69 7289
DA6A 7286
DA6B 7285
DA6C 728B
DA6D 7312
DA6E 730B
DA6F 7330
DA70 7322
DA71 7331
DA72 7333
DA73 7327
DA74 7332
DA75 732D
DA76 7326
DA77 7323
DA78 7335
DA79 730C
DA7A 742E
DA7B 742C
DA7C 7430
DA7D 742B
DA7E 7416
DAA1 741A
DAA2 7421
DAA3 742D
DAA4 7431
DAA5 7424
DAA6 7423
DAA7 741D
DAA8 7429
DAA9 7420
DAAA 7432
DAAB 74FB
DAAC 752F
DAAD 756F
DAAE 756C
DAAF 75E7
DAB0 75DA
DAB1 75E1
DAB2 75E6
DAB3 75DD
DAB4 75DF
DAB5 75E4
DAB6 75D7
DAB7 7695
DAB8 7692
DAB9 76DA
DABA 7746
DABB 7747
DABC 7744
DABD 774D
DABE 7745
DABF 774A
DAC0 774E
DAC1 774B
DAC2 774C
DAC3 77DE
DAC4 77EC
DAC5 7860
DAC6 7864
DAC7 7865
DAC8 785C
DAC9 786D
DACA 7871
DACB 786A
DACC 786E
DACD 7870
DACE 7869
DACF 7868
DAD0 785E
DAD1 7862
DAD2 7974
DAD3 7973
DAD4 7972
DAD5 7970
DAD6 7A02
DAD7 7A0A
DAD8 7A03
DAD9 7A0C
DADA 7A04
DADB 7A99
DADC 7AE6
DADD 7AE4
DADE 7B4A
DADF 7B3B
DAE0 7B44
DAE1 7B48
DAE2 7B4C
DAE3 7B4E
DAE4 7B40
DAE5 7B58
DAE6 7B45
DAE7 7CA2
DAE8 7C9E
DAE9 7CA8
DAEA 7CA1
DAEB 7D58
DAEC 7D6F
DAED 7D63
DAEE 7D53
DAEF 7D56
DAF0 7D67
DAF1 7D6A
DAF2 7D4F
DAF3 7D6D
DAF4 7D5C
DAF5 7D6B
DAF6 7D52
DAF7 7D54
DAF8 7D69
DAF9 7D51
DAFA 7D5F
DAFB 7D4E
DAFC 7F3E
DAFD 7F3F
DAFE 7F65
DB40 7F66
DB41 7FA2
DB42 7FA0
DB43 7FA1
DB44 7FD7
DB45 8051
DB46 804F
DB47 8050
DB48 80FE
DB49 80D4
DB4A 8143
DB4B 814A
DB4C 8152
DB4D 814F
DB4E 8147
DB4F 813D
DB50 814D
DB51 813A
DB52 81E6
DB53 81EE
DB54 81F7
DB55 81F8
DB56 81F9
DB57 8204
DB58 823C
DB59 823D
DB5A 823F
DB5B 8275
DB5C 833B
DB5D 83CF
DB5E 83F9
DB5F 8423
DB60 83C0
DB61 83E8
DB62 8412
DB63 83E7
DB64 83E4
DB65 83FC
DB66 83F6
DB67 8410
DB68 83C6
DB69 83C8
DB6A 83EB
DB6B 83E3
DB6C 83BF
DB6D 8401
DB6E 83DD
DB6F 83E5
DB70 83D8
DB71 83FF
DB72 83E1
DB73 83CB
DB74 83CE
DB75 83D6
DB76 83F5
DB77 83C9
DB78 8409
DB79 840F
DB7A 83DE
DB7B 8411
DB7C 8406
DB7D 83C2
DB7E 83F3
DBA1 83D5
DBA2 83FA
DBA3 83C7
DBA4 83D1
DBA5 83EA
DBA6 8413
DBA7 83C3
DBA8 83EC
DBA9 83EE
DBAA 83C4
DBAB 83FB
DBAC 83D7
DBAD 83E2
DBAE 841B
DBAF 83DB
DBB0 83FE
DBB1 86D8
DBB2 86E2
DBB3 86E6
DBB4 86D3
DBB5 86E3
DBB6 86DA
DBB7 86EA
DBB8 86DD
DBB9 86EB
DBBA 86DC
DBBB 86EC
DBBC 86E9
DBBD 86D7
DBBE 86E8
DBBF 86D1
DBC0 8848
DBC1 8856
DBC2 8855
DBC3 88BA
DBC4 88D7
DBC5 88B9
DBC6 88B8
DBC7 88C0
DBC8 88BE
DBC9 88B6
DBCA 88BC
DBCB 88B7
DBCC 88BD
DBCD 88B2
DBCE 8901
DBCF 88C9
DBD0 8995
DBD1 8998
DBD2 8997
DBD3 89DD
DBD4 89DA
DBD5 89DB
DBD6 8A4E
DBD7 8A4D
DBD8 8A39
DBD9 8A59
DBDA 8A40
DBDB 8A57
DBDC 8A58
DBDD 8A44
DBDE 8A45
DBDF 8A52
DBE0 8A48
DBE1 8A51
DBE2 8A4A
DBE3 8A4C
DBE4 8A4F
DBE5 8C5F
DBE6 8C81
DBE7 8C80
DBE8 8CBA
DBE9 8CBE
DBEA 8CB0
DBEB 8CB9
DBEC 8CB5
DBED 8D84
DBEE 8D80
DBEF 8D89
DBF0 8DD8
DBF1 8DD3
DBF2 8DCD
DBF3 8DC7
DBF4 8DD6
DBF5 8DDC
DBF6 8DCF
DBF7 8DD5
DBF8 8DD9
DBF9 8DC8
DBFA 8DD7
DBFB 8DC5
DBFC 8EEF
DBFD 8EF7
DBFE 8EFA
DC40 8EF9
DC41 8EE6
DC42 8EEE
DC43 8EE5
DC44 8EF5
DC45 8EE7
DC46 8EE8
DC47 8EF6
DC48 8EEB
DC49 8EF1
DC4A 8EEC
DC4B 8EF4
DC4C 8EE9
DC4D 902D
DC4E 9034
DC4F 902F
DC50 9106
DC51 912C
DC52 9104
DC53 90FF
DC54 90FC
DC55 9108
DC56 90F9
DC57 90FB
DC58 9101
DC59 9100
DC5A 9107
DC5B 9105
DC5C 9103
DC5D 9161
DC5E 9164
DC5F 915F
DC60 9162
DC61 9160
DC62 9201
DC63 920A
DC64 9225
DC65 9203
DC66 921A
DC67 9226
DC68 920F
DC69 920C
DC6A 9200
DC6B 9212
DC6C 91FF
DC6D 91FD
DC6E 9206
DC6F 9204
DC70 9227
DC71 9202
DC72 921C
DC73 9224
DC74 9219
DC75 9217
DC76 9205
DC77 9216
DC78 957B
DC79 958D
DC7A 958C
DC7B 9590
DC7C 9687
DC7D 967E
DC7E 9688
DCA1 9689
DCA2 9683
DCA3 9680
DCA4 96C2
DCA5 96C8
DCA6 96C3
DCA7 96F1
DCA8 96F0
DCA9 976C
DCAA 9770
DCAB 976E
DCAC 9807
DCAD 98A9
DCAE 98EB
DCAF 9CE6
DCB0 9EF9
DCB1 4E83
DCB2 4E84
DCB3 4EB6
DCB4 50BD
DCB5 50BF
DCB6 50C6
DCB7 50AE
DCB8 50C4
DCB9 50CA
DCBA 50B4
DCBB 50C8
DCBC 50C2
DCBD 50B0
DCBE 50C1
DCBF 50BA
DCC0 50B1
DCC1 50CB
DCC2 50C9
DCC3 50B6
DCC4 50B8
DCC5 51D7
DCC6 527A
DCC7 5278
DCC8 527B
DCC9 527C
DCCA 55C3
DCCB 55DB
DCCC 55CC
DCCD 55D0
DCCE 55CB
DCCF 55CA
DCD0 55DD
DCD1 55C0
DCD2 55D4
DCD3 55C4
DCD4 55E9
DCD5 55BF
DCD6 55D2
DCD7 558D
DCD8 55CF
DCD9 55D5
DCDA 55E2
DCDB 55D6
DCDC 55C8
DCDD 55F2
DCDE 55CD
DCDF 55D9
DCE0 55C2
DCE1 5714
DCE2 5853
DCE3 5868
DCE4 5864
DCE5 584F
DCE6 584D
DCE7 5849
DCE8 586F
DCE9 5855
DCEA 584E
DCEB 585D
DCEC 5859
DCED 5865
DCEE 585B
DCEF 583D
DCF0 5863
DCF1 5871
DCF2 58FC
DCF3 5AC7
DCF4 5AC4
DCF5 5ACB
DCF6 5ABA
DCF7 5AB8
DCF8 5AB1
DCF9 5AB5
DCFA 5AB0
DCFB 5ABF
DCFC 5AC8
DCFD 5ABB
DCFE 5AC6
DD40 5AB7
DD41 5AC0
DD42 5ACA
DD43 5AB4
DD44 5AB6
DD45 5ACD
DD46 5AB9
DD47 5A90
DD48 5BD6
DD49 5BD8
DD4A 5BD9
DD4B 5C1F
DD4C 5C33
DD4D 5D71
DD4E 5D63
DD4F 5D4A
DD50 5D65
DD51 5D72
DD52 5D6C
DD53 5D5E
DD54 5D68
DD55 5D67
DD56 5D62
DD57 5DF0
DD58 5E4F
DD59 5E4E
DD5A 5E4A
DD5B 5E4D
DD5C 5E4B
DD5D 5EC5
DD5E 5ECC
DD5F 5EC6
DD60 5ECB
DD61 5EC7
DD62 5F40
DD63 5FAF
DD64 5FAD
DD65 60F7
DD66 6149
DD67 614A
DD68 612B
DD69 6145
DD6A 6136
DD6B 6132
DD6C 612E
DD6D 6146
DD6E 612F
DD6F 614F
DD70 6129
DD71 6140
DD72 6220
DD73 9168
DD74 6223
DD75 6225
DD76 6224
DD77 63C5
DD78 63F1
DD79 63EB
DD7A 6410
DD7B 6412
DD7C 6409
DD7D 6420
DD7E 6424
DDA1 6433
DDA2 6443
DDA3 641F
DDA4 6415
DDA5 6418
DDA6 6439
DDA7 6437
DDA8 6422
DDA9 6423
DDAA 640C
DDAB 6426
DDAC 6430
DDAD 6428
DDAE 6441
DDAF 6435
DDB0 642F
DDB1 640A
DDB2 641A
DDB3 6440
DDB4 6425
DDB5 6427
DDB6 640B
DDB7 63E7
DDB8 641B
DDB9 642E
DDBA 6421
DDBB 640E
DDBC 656F
DDBD 6592
DDBE 65D3
DDBF 6686
DDC0 668C
DDC1 6695
DDC2 6690
DDC3 668B
DDC4 668A
DDC5 6699
DDC6 6694
DDC7 6678
DDC8 6720
DDC9 6966
DDCA 695F
DDCB 6938
DDCC 694E
DDCD 6962
DDCE 6971
DDCF 693F
DDD0 6945
DDD1 696A
DDD2 6939
DDD3 6942
DDD4 6957
DDD5 6959
DDD6 697A
DDD7 6948
DDD8 6949
DDD9 6935
DDDA 696C
DDDB 6933
DDDC 693D
DDDD 6965
DDDE 68F0
DDDF 6978
DDE0 6934
DDE1 6969
DDE2 6940
DDE3 696F
DDE4 6944
DDE5 6976
DDE6 6958
DDE7 6941
DDE8 6974
DDE9 694C
DDEA 693B
DDEB 694B
DDEC 6937
DDED 695C
DDEE 694F
DDEF 6951
DDF0 6932
DDF1 6952
DDF2 692F
DDF3 697B
DDF4 693C
DDF5 6B46
DDF6 6B45
DDF7 6B43
DDF8 6B42
DDF9 6B48
DDFA 6B41
DDFB 6B9B
DDFC FA0D
DDFD 6BFB
DDFE 6BFC
DE40 6BF9
DE41 6BF7
DE42 6BF8
DE43 6E9B
DE44 6ED6
DE45 6EC8
DE46 6E8F
DE47 6EC0
DE48 6E9F
DE49 6E93
DE4A 6E94
DE4B 6EA0
DE4C 6EB1
DE4D 6EB9
DE4E 6EC6
DE4F 6ED2
DE50 6EBD
DE51 6EC1
DE52 6E9E
DE53 6EC9
DE54 6EB7
DE55 6EB0
DE56 6ECD
DE57 6EA6
DE58 6ECF
DE59 6EB2
DE5A 6EBE
DE5B 6EC3
DE5C 6EDC
DE5D 6ED8
DE5E 6E99
DE5F 6E92
DE60 6E8E
DE61 6E8D
DE62 6EA4
DE63 6EA1
DE64 6EBF
DE65 6EB3
DE66 6ED0
DE67 6ECA
DE68 6E97
DE69 6EAE
DE6A 6EA3
DE6B 7147
DE6C 7154
DE6D 7152
DE6E 7163
DE6F 7160
DE70 7141
DE71 715D
DE72 7162
DE73 7172
DE74 7178
DE75 716A
DE76 7161
DE77 7142
DE78 7158
DE79 7143
DE7A 714B
DE7B 7170
DE7C 715F
DE7D 7150
DE7E 7153
DEA1 7144
DEA2 714D
DEA3 715A
DEA4 724F
DEA5 728D
DEA6 728C
DEA7 7291
DEA8 7290
DEA9 728E
DEAA 733C
DEAB 7342
DEAC 733B
DEAD 733A
DEAE 7340
DEAF 734A
DEB0 7349
DEB1 7444
DEB2 744A
DEB3 744B
DEB4 7452
DEB5 7451
DEB6 7457
DEB7 7440
DEB8 744F
DEB9 7450
DEBA 744E
DEBB 7442
DEBC 7446
DEBD 744D
DEBE 7454
DEBF 74E1
DEC0 74FF
DEC1 74FE
DEC2 74FD
DEC3 751D
DEC4 7579
DEC5 7577
DEC6 6983
DEC7 75EF
DEC8 760F
DEC9 7603
DECA 75F7
DECB 75FE
DECC 75FC
DECD 75F9
DECE 75F8
DECF 7610
DED0 75FB
DED1 75F6
DED2 75ED
DED3 75F5
DED4 75FD
DED5 7699
DED6 76B5
DED7 76DD
DED8 7755
DED9 775F
DEDA 7760
DEDB 7752
DEDC 7756
DEDD 775A
DEDE 7769
DEDF 7767
DEE0 7754
DEE1 7759
DEE2 776D
DEE3 77E0
DEE4 7887
DEE5 789A
DEE6 7894
DEE7 788F
DEE8 7884
DEE9 7895
DEEA 7885
DEEB 7886
DEEC 78A1
DEED 7883
DEEE 7879
DEEF 7899
DEF0 7880
DEF1 7896
DEF2 787B
DEF3 797C
DEF4 7982
DEF5 797D
DEF6 7979
DEF7 7A11
DEF8 7A18
DEF9 7A19
DEFA 7A12
DEFB 7A17
DEFC 7A15
DEFD 7A22
DEFE 7A13
DF40 7A1B
DF41 7A10
DF42 7AA3
DF43 7AA2
DF44 7A9E
DF45 7AEB
DF46 7B66
DF47 7B64
DF48 7B6D
DF49 7B74
DF4A 7B69
DF4B 7B72
DF4C 7B65
DF4D 7B73
DF4E 7B71
DF4F 7B70
DF50 7B61
DF51 7B78
DF52 7B76
DF53 7B63
DF54 7CB2
DF55 7CB4
DF56 7CAF
DF57 7D88
DF58 7D86
DF59 7D80
DF5A 7D8D
DF5B 7D7F
DF5C 7D85
DF5D 7D7A
DF5E 7D8E
DF5F 7D7B
DF60 7D83
DF61 7D7C
DF62 7D8C
DF63 7D94
DF64 7D84
DF65 7D7D
DF66 7D92
DF67 7F6D
DF68 7F6B
DF69 7F67
DF6A 7F68
DF6B 7F6C
DF6C 7FA6
DF6D 7FA5
DF6E 7FA7
DF6F 7FDB
DF70 7FDC
DF71 8021
DF72 8164
DF73 8160
DF74 8177
DF75 815C
DF76 8169
DF77 815B
DF78 8162
DF79 8172
DF7A 6721
DF7B 815E
DF7C 8176
DF7D 8167
DF7E 816F
DFA1 8144
DFA2 8161
DFA3 821D
DFA4 8249
DFA5 8244
DFA6 8240
DFA7 8242
DFA8 8245
DFA9 84F1
DFAA 843F
DFAB 8456
DFAC 8476
DFAD 8479
DFAE 848F
DFAF 848D
DFB0 8465
DFB1 8451
DFB2 8440
DFB3 8486
DFB4 8467
DFB5 8430
DFB6 844D
DFB7 847D
DFB8 845A
DFB9 8459
DFBA 8474
DFBB 8473
DFBC 845D
DFBD 8507
DFBE 845E
DFBF 8437
DFC0 843A
DFC1 8434
DFC2 847A
DFC3 8443
DFC4 8478
DFC5 8432
DFC6 8445
DFC7 8429
DFC8 83D9
DFC9 844B
DFCA 842F
DFCB 8442
DFCC 842D
DFCD 845F
DFCE 8470
DFCF 8439
DFD0 844E
DFD1 844C
DFD2 8452
DFD3 846F
DFD4 84C5
DFD5 848E
DFD6 843B
DFD7 8447
DFD8 8436
DFD9 8433
DFDA 8468
DFDB 847E
DFDC 8444
DFDD 842B
DFDE 8460
DFDF 8454
DFE0 846E
DFE1 8450
DFE2 870B
DFE3 8704
DFE4 86F7
DFE5 870C
DFE6 86FA
DFE7 86D6
DFE8 86F5
DFE9 874D
DFEA 86F8
DFEB 870E
DFEC 8709
DFED 8701
DFEE 86F6
DFEF 870D
DFF0 8705
DFF1 88D6
DFF2 88CB
DFF3 88CD
DFF4 88CE
DFF5 88DE
DFF6 88DB
DFF7 88DA
DFF8 88CC
DFF9 88D0
DFFA 8985
DFFB 899B
DFFC 89DF
DFFD 89E5
DFFE 89E4
E040 89E1
E041 89E0
E042 89E2
E043 89DC
E044 89E6
E045 8A76
E046 8A86
E047 8A7F
E048 8A61
E049 8A3F
E04A 8A77
E04B 8A82
E04C 8A84
E04D 8A75
E04E 8A83
E04F 8A81
E050 8A74
E051 8A7A
E052 8C3C
E053 8C4B
E054 8C4A
E055 8C65
E056 8C64
E057 8C66
E058 8C86
E059 8C84
E05A 8C85
E05B 8CCC
E05C 8D68
E05D 8D69
E05E 8D91
E05F 8D8C
E060 8D8E
E061 8D8F
E062 8D8D
E063 8D93
E064 8D94
E065 8D90
E066 8D92
E067 8DF0
E068 8DE0
E069 8DEC
E06A 8DF1
E06B 8DEE
E06C 8DD0
E06D 8DE9
E06E 8DE3
E06F 8DE2
E070 8DE7
E071 8DF2
E072 8DEB
E073 8DF4
E074 8F06
E075 8EFF
E076 8F01
E077 8F00
E078 8F05
E079 8F07
E07A 8F08
E07B 8F02
E07C 8F0B
E07D 9052
E07E 903F
E0A1 9044
E0A2 9049
E0A3 903D
E0A4 9110
E0A5 910D
E0A6 910F
E0A7 9111
E0A8 9116
E0A9 9114
E0AA 910B
E0AB 910E
E0AC 916E
E0AD 916F
E0AE 9248
E0AF 9252
E0B0 9230
E0B1 923A
E0B2 9266
E0B3 9233
E0B4 9265
E0B5 925E
E0B6 9283
E0B7 922E
E0B8 924A
E0B9 9246
E0BA 926D
E0BB 926C
E0BC 924F
E0BD 9260
E0BE 9267
E0BF 926F
E0C0 9236
E0C1 9261
E0C2 9270
E0C3 9231
E0C4 9254
E0C5 9263
E0C6 9250
E0C7 9272
E0C8 924E
E0C9 9253
E0CA 924C
E0CB 9256
E0CC 9232
E0CD 959F
E0CE 959C
E0CF 959E
E0D0 959B
E0D1 9692
E0D2 9693
E0D3 9691
E0D4 9697
E0D5 96CE
E0D6 96FA
E0D7 96FD
E0D8 96F8
E0D9 96F5
E0DA 9773
E0DB 9777
E0DC 9778
E0DD 9772
E0DE 980F
E0DF 980D
E0E0 980E
E0E1 98AC
E0E2 98F6
E0E3 98F9
E0E4 99AF
E0E5 99B2
E0E6 99B0
E0E7 99B5
E0E8 9AAD
E0E9 9AAB
E0EA 9B5B
E0EB 9CEA
E0EC 9CED
E0ED 9CE7
E0EE 9E80
E0EF 9EFD
E0F0 50E6
E0F1 50D4
E0F2 50D7
E0F3 50E8
E0F4 50F3
E0F5 50DB
E0F6 50EA
E0F7 50DD
E0F8 50E4
E0F9 50D3
E0FA 50EC
E0FB 50F0
E0FC 50EF
E0FD 50E3
E0FE 50E0
E140 51D8
E141 5280
E142 5281
E143 52E9
E144 52EB
E145 5330
E146 53AC
E147 5627
E148 5615
E149 560C
E14A 5612
E14B 55FC
E14C 560F
E14D 561C
E14E 5601
E14F 5613
E150 5602
E151 55FA
E152 561D
E153 5604
E154 55FF
E155 55F9
E156 5889
E157 587C
E158 5890
E159 5898
E15A 5886
E15B 5881
E15C 587F
E15D 5874
E15E 588B
E15F 587A
E160 5887
E161 5891
E162 588E
E163 5876
E164 5882
E165 5888
E166 587B
E167 5894
E168 588F
E169 58FE
E16A 596B
E16B 5ADC
E16C 5AEE
E16D 5AE5
E16E 5AD5
E16F 5AEA
E170 5ADA
E171 5AED
E172 5AEB
E173 5AF3
E174 5AE2
E175 5AE0
E176 5ADB
E177 5AEC
E178 5ADE
E179 5ADD
E17A 5AD9
E17B 5AE8
E17C 5ADF
E17D 5B77
E17E 5BE0
E1A1 5BE3
E1A2 5C63
E1A3 5D82
E1A4 5D80
E1A5 5D7D
E1A6 5D86
E1A7 5D7A
E1A8 5D81
E1A9 5D77
E1AA 5D8A
E1AB 5D89
E1AC 5D88
E1AD 5D7E
E1AE 5D7C
E1AF 5D8D
E1B0 5D79
E1B1 5D7F
E1B2 5E58
E1B3 5E59
E1B4 5E53
E1B5 5ED8
E1B6 5ED1
E1B7 5ED7
E1B8 5ECE
E1B9 5EDC
E1BA 5ED5
E1BB 5ED9
E1BC 5ED2
E1BD 5ED4
E1BE 5F44
E1BF 5F43
E1C0 5F6F
E1C1 5FB6
E1C2 612C
E1C3 6128
E1C4 6141
E1C5 615E
E1C6 6171
E1C7 6173
E1C8 6152
E1C9 6153
E1CA 6172
E1CB 616C
E1CC 6180
E1CD 6174
E1CE 6154
E1CF 617A
E1D0 615B
E1D1 6165
E1D2 613B
E1D3 616A
E1D4 6161
E1D5 6156
E1D6 6229
E1D7 6227
E1D8 622B
E1D9 642B
E1DA 644D
E1DB 645B
E1DC 645D
E1DD 6474
E1DE 6476
E1DF 6472
E1E0 6473
E1E1 647D
E1E2 6475
E1E3 6466
E1E4 64A6
E1E5 644E
E1E6 6482
E1E7 645E
E1E8 645C
E1E9 644B
E1EA 6453
E1EB 6460
E1EC 6450
E1ED 647F
E1EE 643F
E1EF 646C
E1F0 646B
E1F1 6459
E1F2 6465
E1F3 6477
E1F4 6573
E1F5 65A0
E1F6 66A1
E1F7 66A0
E1F8 669F
E1F9 6705
E1FA 6704
E1FB 6722
E1FC 69B1
E1FD 69B6
E1FE 69C9
E240 69A0
E241 69CE
E242 6996
E243 69B0
E244 69AC
E245 69BC
E246 6991
E247 6999
E248 698E
E249 69A7
E24A 698D
E24B 69A9
E24C 69BE
E24D 69AF
E24E 69BF
E24F 69C4
E250 69BD
E251 69A4
E252 69D4
E253 69B9
E254 69CA
E255 699A
E256 69CF
E257 69B3
E258 6993
E259 69AA
E25A 69A1
E25B 699E
E25C 69D9
E25D 6997
E25E 6990
E25F 69C2
E260 69B5
E261 69A5
E262 69C6
E263 6B4A
E264 6B4D
E265 6B4B
E266 6B9E
E267 6B9F
E268 6BA0
E269 6BC3
E26A 6BC4
E26B 6BFE
E26C 6ECE
E26D 6EF5
E26E 6EF1
E26F 6F03
E270 6F25
E271 6EF8
E272 6F37
E273 6EFB
E274 6F2E
E275 6F09
E276 6F4E
E277 6F19
E278 6F1A
E279 6F27
E27A 6F18
E27B 6F3B
E27C 6F12
E27D 6EED
E27E 6F0A
E2A1 6F36
E2A2 6F73
E2A3 6EF9
E2A4 6EEE
E2A5 6F2D
E2A6 6F40
E2A7 6F30
E2A8 6F3C
E2A9 6F35
E2AA 6EEB
E2AB 6F07
E2AC 6F0E
E2AD 6F43
E2AE 6F05
E2AF 6EFD
E2B0 6EF6
E2B1 6F39
E2B2 6F1C
E2B3 6EFC
E2B4 6F3A
E2B5 6F1F
E2B6 6F0D
E2B7 6F1E
E2B8 6F08
E2B9 6F21
E2BA 7187
E2BB 7190
E2BC 7189
E2BD 7180
E2BE 7185
E2BF 7182
E2C0 718F
E2C1 717B
E2C2 7186
E2C3 7181
E2C4 7197
E2C5 7244
E2C6 7253
E2C7 7297
E2C8 7295
E2C9 7293
E2CA 7343
E2CB 734D
E2CC 7351
E2CD 734C
E2CE 7462
E2CF 7473
E2D0 7471
E2D1 7475
E2D2 7472
E2D3 7467
E2D4 746E
E2D5 7500
E2D6 7502
E2D7 7503
E2D8 757D
E2D9 7590
E2DA 7616
E2DB 7608
E2DC 760C
E2DD 7615
E2DE 7611
E2DF 760A
E2E0 7614
E2E1 76B8
E2E2 7781
E2E3 777C
E2E4 7785
E2E5 7782
E2E6 776E
E2E7 7780
E2E8 776F
E2E9 777E
E2EA 7783
E2EB 78B2
E2EC 78AA
E2ED 78B4
E2EE 78AD
E2EF 78A8
E2F0 787E
E2F1 78AB
E2F2 789E
E2F3 78A5
E2F4 78A0
E2F5 78AC
E2F6 78A2
E2F7 78A4
E2F8 7998
E2F9 798A
E2FA 798B
E2FB 7996
E2FC 7995
E2FD 7994
E2FE 7993
E340 7997
E341 7988
E342 7992
E343 7990
E344 7A2B
E345 7A4A
E346 7A30
E347 7A2F
E348 7A28
E349 7A26
E34A 7AA8
E34B 7AAB
E34C 7AAC
E34D 7AEE
E34E 7B88
E34F 7B9C
E350 7B8A
E351 7B91
E352 7B90
E353 7B96
E354 7B8D
E355 7B8C
E356 7B9B
E357 7B8E
E358 7B85
E359 7B98
E35A 5284
E35B 7B99
E35C 7BA4
E35D 7B82
E35E 7CBB
E35F 7CBF
E360 7CBC
E361 7CBA
E362 7DA7
E363 7DB7
E364 7DC2
E365 7DA3
E366 7DAA
E367 7DC1
E368 7DC0
E369 7DC5
E36A 7D9D
E36B 7DCE
E36C 7DC4
E36D 7DC6
E36E 7DCB
E36F 7DCC
E370 7DAF
E371 7DB9
E372 7D96
E373 7DBC
E374 7D9F
E375 7DA6
E376 7DAE
E377 7DA9
E378 7DA1
E379 7DC9
E37A 7F73
E37B 7FE2
E37C 7FE3
E37D 7FE5
E37E 7FDE
E3A1 8024
E3A2 805D
E3A3 805C
E3A4 8189
E3A5 8186
E3A6 8183
E3A7 8187
E3A8 818D
E3A9 818C
E3AA 818B
E3AB 8215
E3AC 8497
E3AD 84A4
E3AE 84A1
E3AF 849F
E3B0 84BA
E3B1 84CE
E3B2 84C2
E3B3 84AC
E3B4 84AE
E3B5 84AB
E3B6 84B9
E3B7 84B4
E3B8 84C1
E3B9 84CD
E3BA 84AA
E3BB 849A
E3BC 84B1
E3BD 84D0
E3BE 849D
E3BF 84A7
E3C0 84BB
E3C1 84A2
E3C2 8494
E3C3 84C7
E3C4 84CC
E3C5 849B
E3C6 84A9
E3C7 84AF
E3C8 84A8
E3C9 84D6
E3CA 8498
E3CB 84B6
E3CC 84CF
E3CD 84A0
E3CE 84D7
E3CF 84D4
E3D0 84D2
E3D1 84DB
E3D2 84B0
E3D3 8491
E3D4 8661
E3D5 8733
E3D6 8723
E3D7 8728
E3D8 876B
E3D9 8740
E3DA 872E
E3DB 871E
E3DC 8721
E3DD 8719
E3DE 871B
E3DF 8743
E3E0 872C
E3E1 8741
E3E2 873E
E3E3 8746
E3E4 8720
E3E5 8732
E3E6 872A
E3E7 872D
E3E8 873C
E3E9 8712
E3EA 873A
E3EB 8731
E3EC 8735
E3ED 8742
E3EE 8726
E3EF 8727
E3F0 8738
E3F1 8724
E3F2 871A
E3F3 8730
E3F4 8711
E3F5 88F7
E3F6 88E7
E3F7 88F1
E3F8 88F2
E3F9 88FA
E3FA 88FE
E3FB 88EE
E3FC 88FC
E3FD 88F6
E3FE 88FB
E440 88F0
E441 88EC
E442 88EB
E443 899D
E444 89A1
E445 899F
E446 899E
E447 89E9
E448 89EB
E449 89E8
E44A 8AAB
E44B 8A99
E44C 8A8B
E44D 8A92
E44E 8A8F
E44F 8A96
E450 8C3D
E451 8C68
E452 8C69
E453 8CD5
E454 8CCF
E455 8CD7
E456 8D96
E457 8E09
E458 8E02
E459 8DFF
E45A 8E0D
E45B 8DFD
E45C 8E0A
E45D 8E03
E45E 8E07
E45F 8E06
E460 8E05
E461 8DFE
E462 8E00
E463 8E04
E464 8F10
E465 8F11
E466 8F0E
E467 8F0D
E468 9123
E469 911C
E46A 9120
E46B 9122
E46C 911F
E46D 911D
E46E 911A
E46F 9124
E470 9121
E471 911B
E472 917A
E473 9172
E474 9179
E475 9173
E476 92A5
E477 92A4
E478 9276
E479 929B
E47A 927A
E47B 92A0
E47C 9294
E47D 92AA
E47E 928D
E4A1 92A6
E4A2 929A
E4A3 92AB
E4A4 9279
E4A5 9297
E4A6 927F
E4A7 92A3
E4A8 92EE
E4A9 928E
E4AA 9282
E4AB 9295
E4AC 92A2
E4AD 927D
E4AE 9288
E4AF 92A1
E4B0 928A
E4B1 9286
E4B2 928C
E4B3 9299
E4B4 92A7
E4B5 927E
E4B6 9287
E4B7 92A9
E4B8 929D
E4B9 928B
E4BA 922D
E4BB 969E
E4BC 96A1
E4BD 96FF
E4BE 9758
E4BF 977D
E4C0 977A
E4C1 977E
E4C2 9783
E4C3 9780
E4C4 9782
E4C5 977B
E4C6 9784
E4C7 9781
E4C8 977F
E4C9 97CE
E4CA 97CD
E4CB 9816
E4CC 98AD
E4CD 98AE
E4CE 9902
E4CF 9900
E4D0 9907
E4D1 999D
E4D2 999C
E4D3 99C3
E4D4 99B9
E4D5 99BB
E4D6 99BA
E4D7 99C2
E4D8 99BD
E4D9 99C7
E4DA 9AB1
E4DB 9AE3
E4DC 9AE7
E4DD 9B3E
E4DE 9B3F
E4DF 9B60
E4E0 9B61
E4E1 9B5F
E4E2 9CF1
E4E3 9CF2
E4E4 9CF5
E4E5 9EA7
E4E6 50FF
E4E7 5103
E4E8 5130
E4E9 50F8
E4EA 5106
E4EB 5107
E4EC 50F6
E4ED 50FE
E4EE 510B
E4EF 510C
E4F0 50FD
E4F1 510A
E4F2 528B
E4F3 528C
E4F4 52F1
E4F5 52EF
E4F6 5648
E4F7 5642
E4F8 564C
E4F9 5635
E4FA 5641
E4FB 564A
E4FC 5649
E4FD 5646
E4FE 5658
E540 565A
E541 5640
E542 5633
E543 563D
E544 562C
E545 563E
E546 5638
E547 562A
E548 563A
E549 571A
E54A 58AB
E54B 589D
E54C 58B1
E54D 58A0
E54E 58A3
E54F 58AF
E550 58AC
E551 58A5
E552 58A1
E553 58FF
E554 5AFF
E555 5AF4
E556 5AFD
E557 5AF7
E558 5AF6
E559 5B03
E55A 5AF8
E55B 5B02
E55C 5AF9
E55D 5B01
E55E 5B07
E55F 5B05
E560 5B0F
E561 5C67
E562 5D99
E563 5D97
E564 5D9F
E565 5D92
E566 5DA2
E567 5D93
E568 5D95
E569 5DA0
E56A 5D9C
E56B 5DA1
E56C 5D9A
E56D 5D9E
E56E 5E69
E56F 5E5D
E570 5E60
E571 5E5C
E572 7DF3
E573 5EDB
E574 5EDE
E575 5EE1
E576 5F49
E577 5FB2
E578 618B
E579 6183
E57A 6179
E57B 61B1
E57C 61B0
E57D 61A2
E57E 6189
E5A1 619B
E5A2 6193
E5A3 61AF
E5A4 61AD
E5A5 619F
E5A6 6192
E5A7 61AA
E5A8 61A1
E5A9 618D
E5AA 6166
E5AB 61B3
E5AC 622D
E5AD 646E
E5AE 6470
E5AF 6496
E5B0 64A0
E5B1 6485
E5B2 6497
E5B3 649C
E5B4 648F
E5B5 648B
E5B6 648A
E5B7 648C
E5B8 64A3
E5B9 649F
E5BA 6468
E5BB 64B1
E5BC 6498
E5BD 6576
E5BE 657A
E5BF 6579
E5C0 657B
E5C1 65B2
E5C2 65B3
E5C3 66B5
E5C4 66B0
E5C5 66A9
E5C6 66B2
E5C7 66B7
E5C8 66AA
E5C9 66AF
E5CA 6A00
E5CB 6A06
E5CC 6A17
E5CD 69E5
E5CE 69F8
E5CF 6A15
E5D0 69F1
E5D1 69E4
E5D2 6A20
E5D3 69FF
E5D4 69EC
E5D5 69E2
E5D6 6A1B
E5D7 6A1D
E5D8 69FE
E5D9 6A27
E5DA 69F2
E5DB 69EE
E5DC 6A14
E5DD 69F7
E5DE 69E7
E5DF 6A40
E5E0 6A08
E5E1 69E6
E5E2 69FB
E5E3 6A0D
E5E4 69FC
E5E5 69EB
E5E6 6A09
E5E7 6A04
E5E8 6A18
E5E9 6A25
E5EA 6A0F
E5EB 69F6
E5EC 6A26
E5ED 6A07
E5EE 69F4
E5EF 6A16
E5F0 6B51
E5F1 6BA5
E5F2 6BA3
E5F3 6BA2
E5F4 6BA6
E5F5 6C01
E5F6 6C00
E5F7 6BFF
E5F8 6C02
E5F9 6F41
E5FA 6F26
E5FB 6F7E
E5FC 6F87
E5FD 6FC6
E5FE 6F92
E640 6F8D
E641 6F89
E642 6F8C
E643 6F62
E644 6F4F
E645 6F85
E646 6F5A
E647 6F96
E648 6F76
E649 6F6C
E64A 6F82
E64B 6F55
E64C 6F72
E64D 6F52
E64E 6F50
E64F 6F57
E650 6F94
E651 6F93
E652 6F5D
E653 6F00
E654 6F61
E655 6F6B
E656 6F7D
E657 6F67
E658 6F90
E659 6F53
E65A 6F8B
E65B 6F69
E65C 6F7F
E65D 6F95
E65E 6F63
E65F 6F77
E660 6F6A
E661 6F7B
E662 71B2
E663 71AF
E664 719B
E665 71B0
E666 71A0
E667 719A
E668 71A9
E669 71B5
E66A 719D
E66B 71A5
E66C 719E
E66D 71A4
E66E 71A1
E66F 71AA
E670 719C
E671 71A7
E672 71B3
E673 7298
E674 729A
E675 7358
E676 7352
E677 735E
E678 735F
E679 7360
E67A 735D
E67B 735B
E67C 7361
E67D 735A
E67E 7359
E6A1 7362
E6A2 7487
E6A3 7489
E6A4 748A
E6A5 7486
E6A6 7481
E6A7 747D
E6A8 7485
E6A9 7488
E6AA 747C
E6AB 7479
E6AC 7508
E6AD 7507
E6AE 757E
E6AF 7625
E6B0 761E
E6B1 7619
E6B2 761D
E6B3 761C
E6B4 7623
E6B5 761A
E6B6 7628
E6B7 761B
E6B8 769C
E6B9 769D
E6BA 769E
E6BB 769B
E6BC 778D
E6BD 778F
E6BE 7789
E6BF 7788
E6C0 78CD
E6C1 78BB
E6C2 78CF
E6C3 78CC
E6C4 78D1
E6C5 78CE
E6C6 78D4
E6C7 78C8
E6C8 78C3
E6C9 78C4
E6CA 78C9
E6CB 799A
E6CC 79A1
E6CD 79A0
E6CE 799C
E6CF 79A2
E6D0 799B
E6D1 6B76
E6D2 7A39
E6D3 7AB2
E6D4 7AB4
E6D5 7AB3
E6D6 7BB7
E6D7 7BCB
E6D8 7BBE
E6D9 7BAC
E6DA 7BCE
E6DB 7BAF
E6DC 7BB9
E6DD 7BCA
E6DE 7BB5
E6DF 7CC5
E6E0 7CC8
E6E1 7CCC
E6E2 7CCB
E6E3 7DF7
E6E4 7DDB
E6E5 7DEA
E6E6 7DE7
E6E7 7DD7
E6E8 7DE1
E6E9 7E03
E6EA 7DFA
E6EB 7DE6
E6EC 7DF6
E6ED 7DF1
E6EE 7DF0
E6EF 7DEE
E6F0 7DDF
E6F1 7F76
E6F2 7FAC
E6F3 7FB0
E6F4 7FAD
E6F5 7FED
E6F6 7FEB
E6F7 7FEA
E6F8 7FEC
E6F9 7FE6
E6FA 7FE8
E6FB 8064
E6FC 8067
E6FD 81A3
E6FE 819F
E740 819E
E741 8195
E742 81A2
E743 8199
E744 8197
E745 8216
E746 824F
E747 8253
E748 8252
E749 8250
E74A 824E
E74B 8251
E74C 8524
E74D 853B
E74E 850F
E74F 8500
E750 8529
E751 850E
E752 8509
E753 850D
E754 851F
E755 850A
E756 8527
E757 851C
E758 84FB
E759 852B
E75A 84FA
E75B 8508
E75C 850C
E75D 84F4
E75E 852A
E75F 84F2
E760 8515
E761 84F7
E762 84EB
E763 84F3
E764 84FC
E765 8512
E766 84EA
E767 84E9
E768 8516
E769 84FE
E76A 8528
E76B 851D
E76C 852E
E76D 8502
E76E 84FD
E76F 851E
E770 84F6
E771 8531
E772 8526
E773 84E7
E774 84E8
E775 84F0
E776 84EF
E777 84F9
E778 8518
E779 8520
E77A 8530
E77B 850B
E77C 8519
E77D 852F
E77E 8662
E7A1 8756
E7A2 8763
E7A3 8764
E7A4 8777
E7A5 87E1
E7A6 8773
E7A7 8758
E7A8 8754
E7A9 875B
E7AA 8752
E7AB 8761
E7AC 875A
E7AD 8751
E7AE 875E
E7AF 876D
E7B0 876A
E7B1 8750
E7B2 874E
E7B3 875F
E7B4 875D
E7B5 876F
E7B6 876C
E7B7 877A
E7B8 876E
E7B9 875C
E7BA 8765
E7BB 874F
E7BC 877B
E7BD 8775
E7BE 8762
E7BF 8767
E7C0 8769
E7C1 885A
E7C2 8905
E7C3 890C
E7C4 8914
E7C5 890B
E7C6 8917
E7C7 8918
E7C8 8919
E7C9 8906
E7CA 8916
E7CB 8911
E7CC 890E
E7CD 8909
E7CE 89A2
E7CF 89A4
E7D0 89A3
E7D1 89ED
E7D2 89F0
E7D3 89EC
E7D4 8ACF
E7D5 8AC6
E7D6 8AB8
E7D7 8AD3
E7D8 8AD1
E7D9 8AD4
E7DA 8AD5
E7DB 8ABB
E7DC 8AD7
E7DD 8ABE
E7DE 8AC0
E7DF 8AC5
E7E0 8AD8
E7E1 8AC3
E7E2 8ABA
E7E3 8ABD
E7E4 8AD9
E7E5 8C3E
E7E6 8C4D
E7E7 8C8F
E7E8 8CE5
E7E9 8CDF
E7EA 8CD9
E7EB 8CE8
E7EC 8CDA
E7ED 8CDD
E7EE 8CE7
E7EF 8DA0
E7F0 8D9C
E7F1 8DA1
E7F2 8D9B
E7F3 8E20
E7F4 8E23
E7F5 8E25
E7F6 8E24
E7F7 8E2E
E7F8 8E15
E7F9 8E1B
E7FA 8E16
E7FB 8E11
E7FC 8E19
E7FD 8E26
E7FE 8E27
E840 8E14
E841 8E12
E842 8E18
E843 8E13
E844 8E1C
E845 8E17
E846 8E1A
E847 8F2C
E848 8F24
E849 8F18
E84A 8F1A
E84B 8F20
E84C 8F23
E84D 8F16
E84E 8F17
E84F 9073
E850 9070
E851 906F
E852 9067
E853 906B
E854 912F
E855 912B
E856 9129
E857 912A
E858 9132
E859 9126
E85A 912E
E85B 9185
E85C 9186
E85D 918A
E85E 9181
E85F 9182
E860 9184
E861 9180
E862 92D0
E863 92C3
E864 92C4
E865 92C0
E866 92D9
E867 92B6
E868 92CF
E869 92F1
E86A 92DF
E86B 92D8
E86C 92E9
E86D 92D7
E86E 92DD
E86F 92CC
E870 92EF
E871 92C2
E872 92E8
E873 92CA
E874 92C8
E875 92CE
E876 92E6
E877 92CD
E878 92D5
E879 92C9
E87A 92E0
E87B 92DE
E87C 92E7
E87D 92D1
E87E 92D3
E8A1 92B5
E8A2 92E1
E8A3 92C6
E8A4 92B4
E8A5 957C
E8A6 95AC
E8A7 95AB
E8A8 95AE
E8A9 95B0
E8AA 96A4
E8AB 96A2
E8AC 96D3
E8AD 9705
E8AE 9708
E8AF 9702
E8B0 975A
E8B1 978A
E8B2 978E
E8B3 9788
E8B4 97D0
E8B5 97CF
E8B6 981E
E8B7 981D
E8B8 9826
E8B9 9829
E8BA 9828
E8BB 9820
E8BC 981B
E8BD 9827
E8BE 98B2
E8BF 9908
E8C0 98FA
E8C1 9911
E8C2 9914
E8C3 9916
E8C4 9917
E8C5 9915
E8C6 99DC
E8C7 99CD
E8C8 99CF
E8C9 99D3
E8CA 99D4
E8CB 99CE
E8CC 99C9
E8CD 99D6
E8CE 99D8
E8CF 99CB
E8D0 99D7
E8D1 99CC
E8D2 9AB3
E8D3 9AEC
E8D4 9AEB
E8D5 9AF3
E8D6 9AF2
E8D7 9AF1
E8D8 9B46
E8D9 9B43
E8DA 9B67
E8DB 9B74
E8DC 9B71
E8DD 9B66
E8DE 9B76
E8DF 9B75
E8E0 9B70
E8E1 9B68
E8E2 9B64
E8E3 9B6C
E8E4 9CFC
E8E5 9CFA
E8E6 9CFD
E8E7 9CFF
E8E8 9CF7
E8E9 9D07
E8EA 9D00
E8EB 9CF9
E8EC 9CFB
E8ED 9D08
E8EE 9D05
E8EF 9D04
E8F0 9E83
E8F1 9ED3
E8F2 9F0F
E8F3 9F10
E8F4 511C
E8F5 5113
E8F6 5117
E8F7 511A
E8F8 5111
E8F9 51DE
E8FA 5334
E8FB 53E1
E8FC 5670
E8FD 5660
E8FE 566E
E940 5673
E941 5666
E942 5663
E943 566D
E944 5672
E945 565E
E946 5677
E947 571C
E948 571B
E949 58C8
E94A 58BD
E94B 58C9
E94C 58BF
E94D 58BA
E94E 58C2
E94F 58BC
E950 58C6
E951 5B17
E952 5B19
E953 5B1B
E954 5B21
E955 5B14
E956 5B13
E957 5B10
E958 5B16
E959 5B28
E95A 5B1A
E95B 5B20
E95C 5B1E
E95D 5BEF
E95E 5DAC
E95F 5DB1
E960 5DA9
E961 5DA7
E962 5DB5
E963 5DB0
E964 5DAE
E965 5DAA
E966 5DA8
E967 5DB2
E968 5DAD
E969 5DAF
E96A 5DB4
E96B 5E67
E96C 5E68
E96D 5E66
E96E 5E6F
E96F 5EE9
E970 5EE7
E971 5EE6
E972 5EE8
E973 5EE5
E974 5F4B
E975 5FBC
E976 619D
E977 61A8
E978 6196
E979 61C5
E97A 61B4
E97B 61C6
E97C 61C1
E97D 61CC
E97E 61BA
E9A1 61BF
E9A2 61B8
E9A3 618C
E9A4 64D7
E9A5 64D6
E9A6 64D0
E9A7 64CF
E9A8 64C9
E9A9 64BD
E9AA 6489
E9AB 64C3
E9AC 64DB
E9AD 64F3
E9AE 64D9
E9AF 6533
E9B0 657F
E9B1 657C
E9B2 65A2
E9B3 66C8
E9B4 66BE
E9B5 66C0
E9B6 66CA
E9B7 66CB
E9B8 66CF
E9B9 66BD
E9BA 66BB
E9BB 66BA
E9BC 66CC
E9BD 6723
E9BE 6A34
E9BF 6A66
E9C0 6A49
E9C1 6A67
E9C2 6A32
E9C3 6A68
E9C4 6A3E
E9C5 6A5D
E9C6 6A6D
E9C7 6A76
E9C8 6A5B
E9C9 6A51
E9CA 6A28
E9CB 6A5A
E9CC 6A3B
E9CD 6A3F
E9CE 6A41
E9CF 6A6A
E9D0 6A64
E9D1 6A50
E9D2 6A4F
E9D3 6A54
E9D4 6A6F
E9D5 6A69
E9D6 6A60
E9D7 6A3C
E9D8 6A5E
E9D9 6A56
E9DA 6A55
E9DB 6A4D
E9DC 6A4E
E9DD 6A46
E9DE 6B55
E9DF 6B54
E9E0 6B56
E9E1 6BA7
E9E2 6BAA
E9E3 6BAB
E9E4 6BC8
E9E5 6BC7
E9E6 6C04
E9E7 6C03
E9E8 6C06
E9E9 6FAD
E9EA 6FCB
E9EB 6FA3
E9EC 6FC7
E9ED 6FBC
E9EE 6FCE
E9EF 6FC8
E9F0 6F5E
E9F1 6FC4
E9F2 6FBD
E9F3 6F9E
E9F4 6FCA
E9F5 6FA8
E9F6 7004
E9F7 6FA5
E9F8 6FAE
E9F9 6FBA
E9FA 6FAC
E9FB 6FAA
E9FC 6FCF
E9FD 6FBF
E9FE 6FB8
EA40 6FA2
EA41 6FC9
EA42 6FAB
EA43 6FCD
EA44 6FAF
EA45 6FB2
EA46 6FB0
EA47 71C5
EA48 71C2
EA49 71BF
EA4A 71B8
EA4B 71D6
EA4C 71C0
EA4D 71C1
EA4E 71CB
EA4F 71D4
EA50 71CA
EA51 71C7
EA52 71CF
EA53 71BD
EA54 71D8
EA55 71BC
EA56 71C6
EA57 71DA
EA58 71DB
EA59 729D
EA5A 729E
EA5B 7369
EA5C 7366
EA5D 7367
EA5E 736C
EA5F 7365
EA60 736B
EA61 736A
EA62 747F
EA63 749A
EA64 74A0
EA65 7494
EA66 7492
EA67 7495
EA68 74A1
EA69 750B
EA6A 7580
EA6B 762F
EA6C 762D
EA6D 7631
EA6E 763D
EA6F 7633
EA70 763C
EA71 7635
EA72 7632
EA73 7630
EA74 76BB
EA75 76E6
EA76 779A
EA77 779D
EA78 77A1
EA79 779C
EA7A 779B
EA7B 77A2
EA7C 77A3
EA7D 7795
EA7E 7799
EAA1 7797
EAA2 78DD
EAA3 78E9
EAA4 78E5
EAA5 78EA
EAA6 78DE
EAA7 78E3
EAA8 78DB
EAA9 78E1
EAAA 78E2
EAAB 78ED
EAAC 78DF
EAAD 78E0
EAAE 79A4
EAAF 7A44
EAB0 7A48
EAB1 7A47
EAB2 7AB6
EAB3 7AB8
EAB4 7AB5
EAB5 7AB1
EAB6 7AB7
EAB7 7BDE
EAB8 7BE3
EAB9 7BE7
EABA 7BDD
EABB 7BD5
EABC 7BE5
EABD 7BDA
EABE 7BE8
EABF 7BF9
EAC0 7BD4
EAC1 7BEA
EAC2 7BE2
EAC3 7BDC
EAC4 7BEB
EAC5 7BD8
EAC6 7BDF
EAC7 7CD2
EAC8 7CD4
EAC9 7CD7
EACA 7CD0
EACB 7CD1
EACC 7E12
EACD 7E21
EACE 7E17
EACF 7E0C
EAD0 7E1F
EAD1 7E20
EAD2 7E13
EAD3 7E0E
EAD4 7E1C
EAD5 7E15
EAD6 7E1A
EAD7 7E22
EAD8 7E0B
EAD9 7E0F
EADA 7E16
EADB 7E0D
EADC 7E14
EADD 7E25
EADE 7E24
EADF 7F43
EAE0 7F7B
EAE1 7F7C
EAE2 7F7A
EAE3 7FB1
EAE4 7FEF
EAE5 802A
EAE6 8029
EAE7 806C
EAE8 81B1
EAE9 81A6
EAEA 81AE
EAEB 81B9
EAEC 81B5
EAED 81AB
EAEE 81B0
EAEF 81AC
EAF0 81B4
EAF1 81B2
EAF2 81B7
EAF3 81A7
EAF4 81F2
EAF5 8255
EAF6 8256
EAF7 8257
EAF8 8556
EAF9 8545
EAFA 856B
EAFB 854D
EAFC 8553
EAFD 8561
EAFE 8558
EB40 8540
EB41 8546
EB42 8564
EB43 8541
EB44 8562
EB45 8544
EB46 8551
EB47 8547
EB48 8563
EB49 853E
EB4A 855B
EB4B 8571
EB4C 854E
EB4D 856E
EB4E 8575
EB4F 8555
EB50 8567
EB51 8560
EB52 858C
EB53 8566
EB54 855D
EB55 8554
EB56 8565
EB57 856C
EB58 8663
EB59 8665
EB5A 8664
EB5B 879B
EB5C 878F
EB5D 8797
EB5E 8793
EB5F 8792
EB60 8788
EB61 8781
EB62 8796
EB63 8798
EB64 8779
EB65 8787
EB66 87A3
EB67 8785
EB68 8790
EB69 8791
EB6A 879D
EB6B 8784
EB6C 8794
EB6D 879C
EB6E 879A
EB6F 8789
EB70 891E
EB71 8926
EB72 8930
EB73 892D
EB74 892E
EB75 8927
EB76 8931
EB77 8922
EB78 8929
EB79 8923
EB7A 892F
EB7B 892C
EB7C 891F
EB7D 89F1
EB7E 8AE0
EBA1 8AE2
EBA2 8AF2
EBA3 8AF4
EBA4 8AF5
EBA5 8ADD
EBA6 8B14
EBA7 8AE4
EBA8 8ADF
EBA9 8AF0
EBAA 8AC8
EBAB 8ADE
EBAC 8AE1
EBAD 8AE8
EBAE 8AFF
EBAF 8AEF
EBB0 8AFB
EBB1 8C91
EBB2 8C92
EBB3 8C90
EBB4 8CF5
EBB5 8CEE
EBB6 8CF1
EBB7 8CF0
EBB8 8CF3
EBB9 8D6C
EBBA 8D6E
EBBB 8DA5
EBBC 8DA7
EBBD 8E33
EBBE 8E3E
EBBF 8E38
EBC0 8E40
EBC1 8E45
EBC2 8E36
EBC3 8E3C
EBC4 8E3D
EBC5 8E41
EBC6 8E30
EBC7 8E3F
EBC8 8EBD
EBC9 8F36
EBCA 8F2E
EBCB 8F35
EBCC 8F32
EBCD 8F39
EBCE 8F37
EBCF 8F34
EBD0 9076
EBD1 9079
EBD2 907B
EBD3 9086
EBD4 90FA
EBD5 9133
EBD6 9135
EBD7 9136
EBD8 9193
EBD9 9190
EBDA 9191
EBDB 918D
EBDC 918F
EBDD 9327
EBDE 931E
EBDF 9308
EBE0 931F
EBE1 9306
EBE2 930F
EBE3 937A
EBE4 9338
EBE5 933C
EBE6 931B
EBE7 9323
EBE8 9312
EBE9 9301
EBEA 9346
EBEB 932D
EBEC 930E
EBED 930D
EBEE 92CB
EBEF 931D
EBF0 92FA
EBF1 9325
EBF2 9313
EBF3 92F9
EBF4 92F7
EBF5 9334
EBF6 9302
EBF7 9324
EBF8 92FF
EBF9 9329
EBFA 9339
EBFB 9335
EBFC 932A
EBFD 9314
EBFE 930C
EC40 930B
EC41 92FE
EC42 9309
EC43 9300
EC44 92FB
EC45 9316
EC46 95BC
EC47 95CD
EC48 95BE
EC49 95B9
EC4A 95BA
EC4B 95B6
EC4C 95BF
EC4D 95B5
EC4E 95BD
EC4F 96A9
EC50 96D4
EC51 970B
EC52 9712
EC53 9710
EC54 9799
EC55 9797
EC56 9794
EC57 97F0
EC58 97F8
EC59 9835
EC5A 982F
EC5B 9832
EC5C 9924
EC5D 991F
EC5E 9927
EC5F 9929
EC60 999E
EC61 99EE
EC62 99EC
EC63 99E5
EC64 99E4
EC65 99F0
EC66 99E3
EC67 99EA
EC68 99E9
EC69 99E7
EC6A 9AB9
EC6B 9ABF
EC6C 9AB4
EC6D 9ABB
EC6E 9AF6
EC6F 9AFA
EC70 9AF9
EC71 9AF7
EC72 9B33
EC73 9B80
EC74 9B85
EC75 9B87
EC76 9B7C
EC77 9B7E
EC78 9B7B
EC79 9B82
EC7A 9B93
EC7B 9B92
EC7C 9B90
EC7D 9B7A
EC7E 9B95
ECA1 9B7D
ECA2 9B88
ECA3 9D25
ECA4 9D17
ECA5 9D20
ECA6 9D1E
ECA7 9D14
ECA8 9D29
ECA9 9D1D
ECAA 9D18
ECAB 9D22
ECAC 9D10
ECAD 9D19
ECAE 9D1F
ECAF 9E88
ECB0 9E86
ECB1 9E87
ECB2 9EAE
ECB3 9EAD
ECB4 9ED5
ECB5 9ED6
ECB6 9EFA
ECB7 9F12
ECB8 9F3D
ECB9 5126
ECBA 5125
ECBB 5122
ECBC 5124
ECBD 5120
ECBE 5129
ECBF 52F4
ECC0 5693
ECC1 568C
ECC2 568D
ECC3 5686
ECC4 5684
ECC5 5683
ECC6 567E
ECC7 5682
ECC8 567F
ECC9 5681
ECCA 58D6
ECCB 58D4
ECCC 58CF
ECCD 58D2
ECCE 5B2D
ECCF 5B25
ECD0 5B32
ECD1 5B23
ECD2 5B2C
ECD3 5B27
ECD4 5B26
ECD5 5B2F
ECD6 5B2E
ECD7 5B7B
ECD8 5BF1
ECD9 5BF2
ECDA 5DB7
ECDB 5E6C
ECDC 5E6A
ECDD 5FBE
ECDE 5FBB
ECDF 61C3
ECE0 61B5
ECE1 61BC
ECE2 61E7
ECE3 61E0
ECE4 61E5
ECE5 61E4
ECE6 61E8
ECE7 61DE
ECE8 64EF
ECE9 64E9
ECEA 64E3
ECEB 64EB
ECEC 64E4
ECED 64E8
ECEE 6581
ECEF 6580
ECF0 65B6
ECF1 65DA
ECF2 66D2
ECF3 6A8D
ECF4 6A96
ECF5 6A81
ECF6 6AA5
ECF7 6A89
ECF8 6A9F
ECF9 6A9B
ECFA 6AA1
ECFB 6A9E
ECFC 6A87
ECFD 6A93
ECFE 6A8E
ED40 6A95
ED41 6A83
ED42 6AA8
ED43 6AA4
ED44 6A91
ED45 6A7F
ED46 6AA6
ED47 6A9A
ED48 6A85
ED49 6A8C
ED4A 6A92
ED4B 6B5B
ED4C 6BAD
ED4D 6C09
ED4E 6FCC
ED4F 6FA9
ED50 6FF4
ED51 6FD4
ED52 6FE3
ED53 6FDC
ED54 6FED
ED55 6FE7
ED56 6FE6
ED57 6FDE
ED58 6FF2
ED59 6FDD
ED5A 6FE2
ED5B 6FE8
ED5C 71E1
ED5D 71F1
ED5E 71E8
ED5F 71F2
ED60 71E4
ED61 71F0
ED62 71E2
ED63 7373
ED64 736E
ED65 736F
ED66 7497
ED67 74B2
ED68 74AB
ED69 7490
ED6A 74AA
ED6B 74AD
ED6C 74B1
ED6D 74A5
ED6E 74AF
ED6F 7510
ED70 7511
ED71 7512
ED72 750F
ED73 7584
ED74 7643
ED75 7648
ED76 7649
ED77 7647
ED78 76A4
ED79 76E9
ED7A 77B5
ED7B 77AB
ED7C 77B2
ED7D 77B7
ED7E 77B6
EDA1 77B4
EDA2 77B1
EDA3 77A8
EDA4 77F0
EDA5 78F3
EDA6 78FD
EDA7 7902
EDA8 78FB
EDA9 78FC
EDAA 78F2
EDAB 7905
EDAC 78F9
EDAD 78FE
EDAE 7904
EDAF 79AB
EDB0 79A8
EDB1 7A5C
EDB2 7A5B
EDB3 7A56
EDB4 7A58
EDB5 7A54
EDB6 7A5A
EDB7 7ABE
EDB8 7AC0
EDB9 7AC1
EDBA 7C05
EDBB 7C0F
EDBC 7BF2
EDBD 7C00
EDBE 7BFF
EDBF 7BFB
EDC0 7C0E
EDC1 7BF4
EDC2 7C0B
EDC3 7BF3
EDC4 7C02
EDC5 7C09
EDC6 7C03
EDC7 7C01
EDC8 7BF8
EDC9 7BFD
EDCA 7C06
EDCB 7BF0
EDCC 7BF1
EDCD 7C10
EDCE 7C0A
EDCF 7CE8
EDD0 7E2D
EDD1 7E3C
EDD2 7E42
EDD3 7E33
EDD4 9848
EDD5 7E38
EDD6 7E2A
EDD7 7E49
EDD8 7E40
EDD9 7E47
EDDA 7E29
EDDB 7E4C
EDDC 7E30
EDDD 7E3B
EDDE 7E36
EDDF 7E44
EDE0 7E3A
EDE1 7F45
EDE2 7F7F
EDE3 7F7E
EDE4 7F7D
EDE5 7FF4
EDE6 7FF2
EDE7 802C
EDE8 81BB
EDE9 81C4
EDEA 81CC
EDEB 81CA
EDEC 81C5
EDED 81C7
EDEE 81BC
EDEF 81E9
EDF0 825B
EDF1 825A
EDF2 825C
EDF3 8583
EDF4 8580
EDF5 858F
EDF6 85A7
EDF7 8595
EDF8 85A0
EDF9 858B
EDFA 85A3
EDFB 857B
EDFC 85A4
EDFD 859A
EDFE 859E
EE40 8577
EE41 857C
EE42 8589
EE43 85A1
EE44 857A
EE45 8578
EE46 8557
EE47 858E
EE48 8596
EE49 8586
EE4A 858D
EE4B 8599
EE4C 859D
EE4D 8581
EE4E 85A2
EE4F 8582
EE50 8588
EE51 8585
EE52 8579
EE53 8576
EE54 8598
EE55 8590
EE56 859F
EE57 8668
EE58 87BE
EE59 87AA
EE5A 87AD
EE5B 87C5
EE5C 87B0
EE5D 87AC
EE5E 87B9
EE5F 87B5
EE60 87BC
EE61 87AE
EE62 87C9
EE63 87C3
EE64 87C2
EE65 87CC
EE66 87B7
EE67 87AF
EE68 87C4
EE69 87CA
EE6A 87B4
EE6B 87B6
EE6C 87BF
EE6D 87B8
EE6E 87BD
EE6F 87DE
EE70 87B2
EE71 8935
EE72 8933
EE73 893C
EE74 893E
EE75 8941
EE76 8952
EE77 8937
EE78 8942
EE79 89AD
EE7A 89AF
EE7B 89AE
EE7C 89F2
EE7D 89F3
EE7E 8B1E
EEA1 8B18
EEA2 8B16
EEA3 8B11
EEA4 8B05
EEA5 8B0B
EEA6 8B22
EEA7 8B0F
EEA8 8B12
EEA9 8B15
EEAA 8B07
EEAB 8B0D
EEAC 8B08
EEAD 8B06
EEAE 8B1C
EEAF 8B13
EEB0 8B1A
EEB1 8C4F
EEB2 8C70
EEB3 8C72
EEB4 8C71
EEB5 8C6F
EEB6 8C95
EEB7 8C94
EEB8 8CF9
EEB9 8D6F
EEBA 8E4E
EEBB 8E4D
EEBC 8E53
EEBD 8E50
EEBE 8E4C
EEBF 8E47
EEC0 8F43
EEC1 8F40
EEC2 9085
EEC3 907E
EEC4 9138
EEC5 919A
EEC6 91A2
EEC7 919B
EEC8 9199
EEC9 919F
EECA 91A1
EECB 919D
EECC 91A0
EECD 93A1
EECE 9383
EECF 93AF
EED0 9364
EED1 9356
EED2 9347
EED3 937C
EED4 9358
EED5 935C
EED6 9376
EED7 9349
EED8 9350
EED9 9351
EEDA 9360
EEDB 936D
EEDC 938F
EEDD 934C
EEDE 936A
EEDF 9379
EEE0 9357
EEE1 9355
EEE2 9352
EEE3 934F
EEE4 9371
EEE5 9377
EEE6 937B
EEE7 9361
EEE8 935E
EEE9 9363
EEEA 9367
EEEB 9380
EEEC 934E
EEED 9359
EEEE 95C7
EEEF 95C0
EEF0 95C9
EEF1 95C3
EEF2 95C5
EEF3 95B7
EEF4 96AE
EEF5 96B0
EEF6 96AC
EEF7 9720
EEF8 971F
EEF9 9718
EEFA 971D
EEFB 9719
EEFC 979A
EEFD 97A1
EEFE 979C
EF40 979E
EF41 979D
EF42 97D5
EF43 97D4
EF44 97F1
EF45 9841
EF46 9844
EF47 984A
EF48 9849
EF49 9845
EF4A 9843
EF4B 9925
EF4C 992B
EF4D 992C
EF4E 992A
EF4F 9933
EF50 9932
EF51 992F
EF52 992D
EF53 9931
EF54 9930
EF55 9998
EF56 99A3
EF57 99A1
EF58 9A02
EF59 99FA
EF5A 99F4
EF5B 99F7
EF5C 99F9
EF5D 99F8
EF5E 99F6
EF5F 99FB
EF60 99FD
EF61 99FE
EF62 99FC
EF63 9A03
EF64 9ABE
EF65 9AFE
EF66 9AFD
EF67 9B01
EF68 9AFC
EF69 9B48
EF6A 9B9A
EF6B 9BA8
EF6C 9B9E
EF6D 9B9B
EF6E 9BA6
EF6F 9BA1
EF70 9BA5
EF71 9BA4
EF72 9B86
EF73 9BA2
EF74 9BA0
EF75 9BAF
EF76 9D33
EF77 9D41
EF78 9D67
EF79 9D36
EF7A 9D2E
EF7B 9D2F
EF7C 9D31
EF7D 9D38
EF7E 9D30
EFA1 9D45
EFA2 9D42
EFA3 9D43
EFA4 9D3E
EFA5 9D37
EFA6 9D40
EFA7 9D3D
EFA8 7FF5
EFA9 9D2D
EFAA 9E8A
EFAB 9E89
EFAC 9E8D
EFAD 9EB0
EFAE 9EC8
EFAF 9EDA
EFB0 9EFB
EFB1 9EFF
EFB2 9F24
EFB3 9F23
EFB4 9F22
EFB5 9F54
EFB6 9FA0
EFB7 5131
EFB8 512D
EFB9 512E
EFBA 5698
EFBB 569C
EFBC 5697
EFBD 569A
EFBE 569D
EFBF 5699
EFC0 5970
EFC1 5B3C
EFC2 5C69
EFC3 5C6A
EFC4 5DC0
EFC5 5E6D
EFC6 5E6E
EFC7 61D8
EFC8 61DF
EFC9 61ED
EFCA 61EE
EFCB 61F1
EFCC 61EA
EFCD 61F0
EFCE 61EB
EFCF 61D6
EFD0 61E9
EFD1 64FF
EFD2 6504
EFD3 64FD
EFD4 64F8
EFD5 6501
EFD6 6503
EFD7 64FC
EFD8 6594
EFD9 65DB
EFDA 66DA
EFDB 66DB
EFDC 66D8
EFDD 6AC5
EFDE 6AB9
EFDF 6ABD
EFE0 6AE1
EFE1 6AC6
EFE2 6ABA
EFE3 6AB6
EFE4 6AB7
EFE5 6AC7
EFE6 6AB4
EFE7 6AAD
EFE8 6B5E
EFE9 6BC9
EFEA 6C0B
EFEB 7007
EFEC 700C
EFED 700D
EFEE 7001
EFEF 7005
EFF0 7014
EFF1 700E
EFF2 6FFF
EFF3 7000
EFF4 6FFB
EFF5 7026
EFF6 6FFC
EFF7 6FF7
EFF8 700A
EFF9 7201
EFFA 71FF
EFFB 71F9
EFFC 7203
EFFD 71FD
EFFE 7376
F040 74B8
F041 74C0
F042 74B5
F043 74C1
F044 74BE
F045 74B6
F046 74BB
F047 74C2
F048 7514
F049 7513
F04A 765C
F04B 7664
F04C 7659
F04D 7650
F04E 7653
F04F 7657
F050 765A
F051 76A6
F052 76BD
F053 76EC
F054 77C2
F055 77BA
F056 78FF
F057 790C
F058 7913
F059 7914
F05A 7909
F05B 7910
F05C 7912
F05D 7911
F05E 79AD
F05F 79AC
F060 7A5F
F061 7C1C
F062 7C29
F063 7C19
F064 7C20
F065 7C1F
F066 7C2D
F067 7C1D
F068 7C26
F069 7C28
F06A 7C22
F06B 7C25
F06C 7C30
F06D 7E5C
F06E 7E50
F06F 7E56
F070 7E63
F071 7E58
F072 7E62
F073 7E5F
F074 7E51
F075 7E60
F076 7E57
F077 7E53
F078 7FB5
F079 7FB3
F07A 7FF7
F07B 7FF8
F07C 8075
F07D 81D1
F07E 81D2
F0A1 81D0
F0A2 825F
F0A3 825E
F0A4 85B4
F0A5 85C6
F0A6 85C0
F0A7 85C3
F0A8 85C2
F0A9 85B3
F0AA 85B5
F0AB 85BD
F0AC 85C7
F0AD 85C4
F0AE 85BF
F0AF 85CB
F0B0 85CE
F0B1 85C8
F0B2 85C5
F0B3 85B1
F0B4 85B6
F0B5 85D2
F0B6 8624
F0B7 85B8
F0B8 85B7
F0B9 85BE
F0BA 8669
F0BB 87E7
F0BC 87E6
F0BD 87E2
F0BE 87DB
F0BF 87EB
F0C0 87EA
F0C1 87E5
F0C2 87DF
F0C3 87F3
F0C4 87E4
F0C5 87D4
F0C6 87DC
F0C7 87D3
F0C8 87ED
F0C9 87D8
F0CA 87E3
F0CB 87A4
F0CC 87D7
F0CD 87D9
F0CE 8801
F0CF 87F4
F0D0 87E8
F0D1 87DD
F0D2 8953
F0D3 894B
F0D4 894F
F0D5 894C
F0D6 8946
F0D7 8950
F0D8 8951
F0D9 8949
F0DA 8B2A
F0DB 8B27
F0DC 8B23
F0DD 8B33
F0DE 8B30
F0DF 8B35
F0E0 8B47
F0E1 8B2F
F0E2 8B3C
F0E3 8B3E
F0E4 8B31
F0E5 8B25
F0E6 8B37
F0E7 8B26
F0E8 8B36
F0E9 8B2E
F0EA 8B24
F0EB 8B3B
F0EC 8B3D
F0ED 8B3A
F0EE 8C42
F0EF 8C75
F0F0 8C99
F0F1 8C98
F0F2 8C97
F0F3 8CFE
F0F4 8D04
F0F5 8D02
F0F6 8D00
F0F7 8E5C
F0F8 8E62
F0F9 8E60
F0FA 8E57
F0FB 8E56
F0FC 8E5E
F0FD 8E65
F0FE 8E67
F140 8E5B
F141 8E5A
F142 8E61
F143 8E5D
F144 8E69
F145 8E54
F146 8F46
F147 8F47
F148 8F48
F149 8F4B
F14A 9128
F14B 913A
F14C 913B
F14D 913E
F14E 91A8
F14F 91A5
F150 91A7
F151 91AF
F152 91AA
F153 93B5
F154 938C
F155 9392
F156 93B7
F157 939B
F158 939D
F159 9389
F15A 93A7
F15B 938E
F15C 93AA
F15D 939E
F15E 93A6
F15F 9395
F160 9388
F161 9399
F162 939F
F163 938D
F164 93B1
F165 9391
F166 93B2
F167 93A4
F168 93A8
F169 93B4
F16A 93A3
F16B 93A5
F16C 95D2
F16D 95D3
F16E 95D1
F16F 96B3
F170 96D7
F171 96DA
F172 5DC2
F173 96DF
F174 96D8
F175 96DD
F176 9723
F177 9722
F178 9725
F179 97AC
F17A 97AE
F17B 97A8
F17C 97AB
F17D 97A4
F17E 97AA
F1A1 97A2
F1A2 97A5
F1A3 97D7
F1A4 97D9
F1A5 97D6
F1A6 97D8
F1A7 97FA
F1A8 9850
F1A9 9851
F1AA 9852
F1AB 98B8
F1AC 9941
F1AD 993C
F1AE 993A
F1AF 9A0F
F1B0 9A0B
F1B1 9A09
F1B2 9A0D
F1B3 9A04
F1B4 9A11
F1B5 9A0A
F1B6 9A05
F1B7 9A07
F1B8 9A06
F1B9 9AC0
F1BA 9ADC
F1BB 9B08
F1BC 9B04
F1BD 9B05
F1BE 9B29
F1BF 9B35
F1C0 9B4A
F1C1 9B4C
F1C2 9B4B
F1C3 9BC7
F1C4 9BC6
F1C5 9BC3
F1C6 9BBF
F1C7 9BC1
F1C8 9BB5
F1C9 9BB8
F1CA 9BD3
F1CB 9BB6
F1CC 9BC4
F1CD 9BB9
F1CE 9BBD
F1CF 9D5C
F1D0 9D53
F1D1 9D4F
F1D2 9D4A
F1D3 9D5B
F1D4 9D4B
F1D5 9D59
F1D6 9D56
F1D7 9D4C
F1D8 9D57
F1D9 9D52
F1DA 9D54
F1DB 9D5F
F1DC 9D58
F1DD 9D5A
F1DE 9E8E
F1DF 9E8C
F1E0 9EDF
F1E1 9F01
F1E2 9F00
F1E3 9F16
F1E4 9F25
F1E5 9F2B
F1E6 9F2A
F1E7 9F29
F1E8 9F28
F1E9 9F4C
F1EA 9F55
F1EB 5134
F1EC 5135
F1ED 5296
F1EE 52F7
F1EF 53B4
F1F0 56AB
F1F1 56AD
F1F2 56A6
F1F3 56A7
F1F4 56AA
F1F5 56AC
F1F6 58DA
F1F7 58DD
F1F8 58DB
F1F9 5912
F1FA 5B3D
F1FB 5B3E
F1FC 5B3F
F1FD 5DC3
F1FE 5E70
F240 5FBF
F241 61FB
F242 6507
F243 6510
F244 650D
F245 6509
F246 650C
F247 650E
F248 6584
F249 65DE
F24A 65DD
F24B 66DE
F24C 6AE7
F24D 6AE0
F24E 6ACC
F24F 6AD1
F250 6AD9
F251 6ACB
F252 6ADF
F253 6ADC
F254 6AD0
F255 6AEB
F256 6ACF
F257 6ACD
F258 6ADE
F259 6B60
F25A 6BB0
F25B 6C0C
F25C 7019
F25D 7027
F25E 7020
F25F 7016
F260 702B
F261 7021
F262 7022
F263 7023
F264 7029
F265 7017
F266 7024
F267 701C
F268 702A
F269 720C
F26A 720A
F26B 7207
F26C 7202
F26D 7205
F26E 72A5
F26F 72A6
F270 72A4
F271 72A3
F272 72A1
F273 74CB
F274 74C5
F275 74B7
F276 74C3
F277 7516
F278 7660
F279 77C9
F27A 77CA
F27B 77C4
F27C 77F1
F27D 791D
F27E 791B
F2A1 7921
F2A2 791C
F2A3 7917
F2A4 791E
F2A5 79B0
F2A6 7A67
F2A7 7A68
F2A8 7C33
F2A9 7C3C
F2AA 7C39
F2AB 7C2C
F2AC 7C3B
F2AD 7CEC
F2AE 7CEA
F2AF 7E76
F2B0 7E75
F2B1 7E78
F2B2 7E70
F2B3 7E77
F2B4 7E6F
F2B5 7E7A
F2B6 7E72
F2B7 7E74
F2B8 7E68
F2B9 7F4B
F2BA 7F4A
F2BB 7F83
F2BC 7F86
F2BD 7FB7
F2BE 7FFD
F2BF 7FFE
F2C0 8078
F2C1 81D7
F2C2 81D5
F2C3 8264
F2C4 8261
F2C5 8263
F2C6 85EB
F2C7 85F1
F2C8 85ED
F2C9 85D9
F2CA 85E1
F2CB 85E8
F2CC 85DA
F2CD 85D7
F2CE 85EC
F2CF 85F2
F2D0 85F8
F2D1 85D8
F2D2 85DF
F2D3 85E3
F2D4 85DC
F2D5 85D1
F2D6 85F0
F2D7 85E6
F2D8 85EF
F2D9 85DE
F2DA 85E2
F2DB 8800
F2DC 87FA
F2DD 8803
F2DE 87F6
F2DF 87F7
F2E0 8809
F2E1 880C
F2E2 880B
F2E3 8806
F2E4 87FC
F2E5 8808
F2E6 87FF
F2E7 880A
F2E8 8802
F2E9 8962
F2EA 895A
F2EB 895B
F2EC 8957
F2ED 8961
F2EE 895C
F2EF 8958
F2F0 895D
F2F1 8959
F2F2 8988
F2F3 89B7
F2F4 89B6
F2F5 89F6
F2F6 8B50
F2F7 8B48
F2F8 8B4A
F2F9 8B40
F2FA 8B53
F2FB 8B56
F2FC 8B54
F2FD 8B4B
F2FE 8B55
F340 8B51
F341 8B42
F342 8B52
F343 8B57
F344 8C43
F345 8C77
F346 8C76
F347 8C9A
F348 8D06
F349 8D07
F34A 8D09
F34B 8DAC
F34C 8DAA
F34D 8DAD
F34E 8DAB
F34F 8E6D
F350 8E78
F351 8E73
F352 8E6A
F353 8E6F
F354 8E7B
F355 8EC2
F356 8F52
F357 8F51
F358 8F4F
F359 8F50
F35A 8F53
F35B 8FB4
F35C 9140
F35D 913F
F35E 91B0
F35F 91AD
F360 93DE
F361 93C7
F362 93CF
F363 93C2
F364 93DA
F365 93D0
F366 93F9
F367 93EC
F368 93CC
F369 93D9
F36A 93A9
F36B 93E6
F36C 93CA
F36D 93D4
F36E 93EE
F36F 93E3
F370 93D5
F371 93C4
F372 93CE
F373 93C0
F374 93D2
F375 93E7
F376 957D
F377 95DA
F378 95DB
F379 96E1
F37A 9729
F37B 972B
F37C 972C
F37D 9728
F37E 9726
F3A1 97B3
F3A2 97B7
F3A3 97B6
F3A4 97DD
F3A5 97DE
F3A6 97DF
F3A7 985C
F3A8 9859
F3A9 985D
F3AA 9857
F3AB 98BF
F3AC 98BD
F3AD 98BB
F3AE 98BE
F3AF 9948
F3B0 9947
F3B1 9943
F3B2 99A6
F3B3 99A7
F3B4 9A1A
F3B5 9A15
F3B6 9A25
F3B7 9A1D
F3B8 9A24
F3B9 9A1B
F3BA 9A22
F3BB 9A20
F3BC 9A27
F3BD 9A23
F3BE 9A1E
F3BF 9A1C
F3C0 9A14
F3C1 9AC2
F3C2 9B0B
F3C3 9B0A
F3C4 9B0E
F3C5 9B0C
F3C6 9B37
F3C7 9BEA
F3C8 9BEB
F3C9 9BE0
F3CA 9BDE
F3CB 9BE4
F3CC 9BE6
F3CD 9BE2
F3CE 9BF0
F3CF 9BD4
F3D0 9BD7
F3D1 9BEC
F3D2 9BDC
F3D3 9BD9
F3D4 9BE5
F3D5 9BD5
F3D6 9BE1
F3D7 9BDA
F3D8 9D77
F3D9 9D81
F3DA 9D8A
F3DB 9D84
F3DC 9D88
F3DD 9D71
F3DE 9D80
F3DF 9D78
F3E0 9D86
F3E1 9D8B
F3E2 9D8C
F3E3 9D7D
F3E4 9D6B
F3E5 9D74
F3E6 9D75
F3E7 9D70
F3E8 9D69
F3E9 9D85
F3EA 9D73
F3EB 9D7B
F3EC 9D82
F3ED 9D6F
F3EE 9D79
F3EF 9D7F
F3F0 9D87
F3F1 9D68
F3F2 9E94
F3F3 9E91
F3F4 9EC0
F3F5 9EFC
F3F6 9F2D
F3F7 9F40
F3F8 9F41
F3F9 9F4D
F3FA 9F56
F3FB 9F57
F3FC 9F58
F3FD 5337
F3FE 56B2
F440 56B5
F441 56B3
F442 58E3
F443 5B45
F444 5DC6
F445 5DC7
F446 5EEE
F447 5EEF
F448 5FC0
F449 5FC1
F44A 61F9
F44B 6517
F44C 6516
F44D 6515
F44E 6513
F44F 65DF
F450 66E8
F451 66E3
F452 66E4
F453 6AF3
F454 6AF0
F455 6AEA
F456 6AE8
F457 6AF9
F458 6AF1
F459 6AEE
F45A 6AEF
F45B 703C
F45C 7035
F45D 702F
F45E 7037
F45F 7034
F460 7031
F461 7042
F462 7038
F463 703F
F464 703A
F465 7039
F466 7040
F467 703B
F468 7033
F469 7041
F46A 7213
F46B 7214
F46C 72A8
F46D 737D
F46E 737C
F46F 74BA
F470 76AB
F471 76AA
F472 76BE
F473 76ED
F474 77CC
F475 77CE
F476 77CF
F477 77CD
F478 77F2
F479 7925
F47A 7923
F47B 7927
F47C 7928
F47D 7924
F47E 7929
F4A1 79B2
F4A2 7A6E
F4A3 7A6C
F4A4 7A6D
F4A5 7AF7
F4A6 7C49
F4A7 7C48
F4A8 7C4A
F4A9 7C47
F4AA 7C45
F4AB 7CEE
F4AC 7E7B
F4AD 7E7E
F4AE 7E81
F4AF 7E80
F4B0 7FBA
F4B1 7FFF
F4B2 8079
F4B3 81DB
F4B4 81D9
F4B5 820B
F4B6 8268
F4B7 8269
F4B8 8622
F4B9 85FF
F4BA 8601
F4BB 85FE
F4BC 861B
F4BD 8600
F4BE 85F6
F4BF 8604
F4C0 8609
F4C1 8605
F4C2 860C
F4C3 85FD
F4C4 8819
F4C5 8810
F4C6 8811
F4C7 8817
F4C8 8813
F4C9 8816
F4CA 8963
F4CB 8966
F4CC 89B9
F4CD 89F7
F4CE 8B60
F4CF 8B6A
F4D0 8B5D
F4D1 8B68
F4D2 8B63
F4D3 8B65
F4D4 8B67
F4D5 8B6D
F4D6 8DAE
F4D7 8E86
F4D8 8E88
F4D9 8E84
F4DA 8F59
F4DB 8F56
F4DC 8F57
F4DD 8F55
F4DE 8F58
F4DF 8F5A
F4E0 908D
F4E1 9143
F4E2 9141
F4E3 91B7
F4E4 91B5
F4E5 91B2
F4E6 91B3
F4E7 940B
F4E8 9413
F4E9 93FB
F4EA 9420
F4EB 940F
F4EC 9414
F4ED 93FE
F4EE 9415
F4EF 9410
F4F0 9428
F4F1 9419
F4F2 940D
F4F3 93F5
F4F4 9400
F4F5 93F7
F4F6 9407
F4F7 940E
F4F8 9416
F4F9 9412
F4FA 93FA
F4FB 9409
F4FC 93F8
F4FD 940A
F4FE 93FF
F540 93FC
F541 940C
F542 93F6
F543 9411
F544 9406
F545 95DE
F546 95E0
F547 95DF
F548 972E
F549 972F
F54A 97B9
F54B 97BB
F54C 97FD
F54D 97FE
F54E 9860
F54F 9862
F550 9863
F551 985F
F552 98C1
F553 98C2
F554 9950
F555 994E
F556 9959
F557 994C
F558 994B
F559 9953
F55A 9A32
F55B 9A34
F55C 9A31
F55D 9A2C
F55E 9A2A
F55F 9A36
F560 9A29
F561 9A2E
F562 9A38
F563 9A2D
F564 9AC7
F565 9ACA
F566 9AC6
F567 9B10
F568 9B12
F569 9B11
F56A 9C0B
F56B 9C08
F56C 9BF7
F56D 9C05
F56E 9C12
F56F 9BF8
F570 9C40
F571 9C07
F572 9C0E
F573 9C06
F574 9C17
F575 9C14
F576 9C09
F577 9D9F
F578 9D99
F579 9DA4
F57A 9D9D
F57B 9D92
F57C 9D98
F57D 9D90
F57E 9D9B
F5A1 9DA0
F5A2 9D94
F5A3 9D9C
F5A4 9DAA
F5A5 9D97
F5A6 9DA1
F5A7 9D9A
F5A8 9DA2
F5A9 9DA8
F5AA 9D9E
F5AB 9DA3
F5AC 9DBF
F5AD 9DA9
F5AE 9D96
F5AF 9DA6
F5B0 9DA7
F5B1 9E99
F5B2 9E9B
F5B3 9E9A
F5B4 9EE5
F5B5 9EE4
F5B6 9EE7
F5B7 9EE6
F5B8 9F30
F5B9 9F2E
F5BA 9F5B
F5BB 9F60
F5BC 9F5E
F5BD 9F5D
F5BE 9F59
F5BF 9F91
F5C0 513A
F5C1 5139
F5C2 5298
F5C3 5297
F5C4 56C3
F5C5 56BD
F5C6 56BE
F5C7 5B48
F5C8 5B47
F5C9 5DCB
F5CA 5DCF
F5CB 5EF1
F5CC 61FD
F5CD 651B
F5CE 6B02
F5CF 6AFC
F5D0 6B03
F5D1 6AF8
F5D2 6B00
F5D3 7043
F5D4 7044
F5D5 704A
F5D6 7048
F5D7 7049
F5D8 7045
F5D9 7046
F5DA 721D
F5DB 721A
F5DC 7219
F5DD 737E
F5DE 7517
F5DF 766A
F5E0 77D0
F5E1 792D
F5E2 7931
F5E3 792F
F5E4 7C54
F5E5 7C53
F5E6 7CF2
F5E7 7E8A
F5E8 7E87
F5E9 7E88
F5EA 7E8B
F5EB 7E86
F5EC 7E8D
F5ED 7F4D
F5EE 7FBB
F5EF 8030
F5F0 81DD
F5F1 8618
F5F2 862A
F5F3 8626
F5F4 861F
F5F5 8623
F5F6 861C
F5F7 8619
F5F8 8627
F5F9 862E
F5FA 8621
F5FB 8620
F5FC 8629
F5FD 861E
F5FE 8625
F640 8829
F641 881D
F642 881B
F643 8820
F644 8824
F645 881C
F646 882B
F647 884A
F648 896D
F649 8969
F64A 896E
F64B 896B
F64C 89FA
F64D 8B79
F64E 8B78
F64F 8B45
F650 8B7A
F651 8B7B
F652 8D10
F653 8D14
F654 8DAF
F655 8E8E
F656 8E8C
F657 8F5E
F658 8F5B
F659 8F5D
F65A 9146
F65B 9144
F65C 9145
F65D 91B9
F65E 943F
F65F 943B
F660 9436
F661 9429
F662 943D
F663 943C
F664 9430
F665 9439
F666 942A
F667 9437
F668 942C
F669 9440
F66A 9431
F66B 95E5
F66C 95E4
F66D 95E3
F66E 9735
F66F 973A
F670 97BF
F671 97E1
F672 9864
F673 98C9
F674 98C6
F675 98C0
F676 9958
F677 9956
F678 9A39
F679 9A3D
F67A 9A46
F67B 9A44
F67C 9A42
F67D 9A41
F67E 9A3A
F6A1 9A3F
F6A2 9ACD
F6A3 9B15
F6A4 9B17
F6A5 9B18
F6A6 9B16
F6A7 9B3A
F6A8 9B52
F6A9 9C2B
F6AA 9C1D
F6AB 9C1C
F6AC 9C2C
F6AD 9C23
F6AE 9C28
F6AF 9C29
F6B0 9C24
F6B1 9C21
F6B2 9DB7
F6B3 9DB6
F6B4 9DBC
F6B5 9DC1
F6B6 9DC7
F6B7 9DCA
F6B8 9DCF
F6B9 9DBE
F6BA 9DC5
F6BB 9DC3
F6BC 9DBB
F6BD 9DB5
F6BE 9DCE
F6BF 9DB9
F6C0 9DBA
F6C1 9DAC
F6C2 9DC8
F6C3 9DB1
F6C4 9DAD
F6C5 9DCC
F6C6 9DB3
F6C7 9DCD
F6C8 9DB2
F6C9 9E7A
F6CA 9E9C
F6CB 9EEB
F6CC 9EEE
F6CD 9EED
F6CE 9F1B
F6CF 9F18
F6D0 9F1A
F6D1 9F31
F6D2 9F4E
F6D3 9F65
F6D4 9F64
F6D5 9F92
F6D6 4EB9
F6D7 56C6
F6D8 56C5
F6D9 56CB
F6DA 5971
F6DB 5B4B
F6DC 5B4C
F6DD 5DD5
F6DE 5DD1
F6DF 5EF2
F6E0 6521
F6E1 6520
F6E2 6526
F6E3 6522
F6E4 6B0B
F6E5 6B08
F6E6 6B09
F6E7 6C0D
F6E8 7055
F6E9 7056
F6EA 7057
F6EB 7052
F6EC 721E
F6ED 721F
F6EE 72A9
F6EF 737F
F6F0 74D8
F6F1 74D5
F6F2 74D9
F6F3 74D7
F6F4 766D
F6F5 76AD
F6F6 7935
F6F7 79B4
F6F8 7A70
F6F9 7A71
F6FA 7C57
F6FB 7C5C
F6FC 7C59
F6FD 7C5B
F6FE 7C5A
F740 7CF4
F741 7CF1
F742 7E91
F743 7F4F
F744 7F87
F745 81DE
F746 826B
F747 8634
F748 8635
F749 8633
F74A 862C
F74B 8632
F74C 8636
F74D 882C
F74E 8828
F74F 8826
F750 882A
F751 8825
F752 8971
F753 89BF
F754 89BE
F755 89FB
F756 8B7E
F757 8B84
F758 8B82
F759 8B86
F75A 8B85
F75B 8B7F
F75C 8D15
F75D 8E95
F75E 8E94
F75F 8E9A
F760 8E92
F761 8E90
F762 8E96
F763 8E97
F764 8F60
F765 8F62
F766 9147
F767 944C
F768 9450
F769 944A
F76A 944B
F76B 944F
F76C 9447
F76D 9445
F76E 9448
F76F 9449
F770 9446
F771 973F
F772 97E3
F773 986A
F774 9869
F775 98CB
F776 9954
F777 995B
F778 9A4E
F779 9A53
F77A 9A54
F77B 9A4C
F77C 9A4F
F77D 9A48
F77E 9A4A
F7A1 9A49
F7A2 9A52
F7A3 9A50
F7A4 9AD0
F7A5 9B19
F7A6 9B2B
F7A7 9B3B
F7A8 9B56
F7A9 9B55
F7AA 9C46
F7AB 9C48
F7AC 9C3F
F7AD 9C44
F7AE 9C39
F7AF 9C33
F7B0 9C41
F7B1 9C3C
F7B2 9C37
F7B3 9C34
F7B4 9C32
F7B5 9C3D
F7B6 9C36
F7B7 9DDB
F7B8 9DD2
F7B9 9DDE
F7BA 9DDA
F7BB 9DCB
F7BC 9DD0
F7BD 9DDC
F7BE 9DD1
F7BF 9DDF
F7C0 9DE9
F7C1 9DD9
F7C2 9DD8
F7C3 9DD6
F7C4 9DF5
F7C5 9DD5
F7C6 9DDD
F7C7 9EB6
F7C8 9EF0
F7C9 9F35
F7CA 9F33
F7CB 9F32
F7CC 9F42
F7CD 9F6B
F7CE 9F95
F7CF 9FA2
F7D0 513D
F7D1 5299
F7D2 58E8
F7D3 58E7
F7D4 5972
F7D5 5B4D
F7D6 5DD8
F7D7 882F
F7D8 5F4F
F7D9 6201
F7DA 6203
F7DB 6204
F7DC 6529
F7DD 6525
F7DE 6596
F7DF 66EB
F7E0 6B11
F7E1 6B12
F7E2 6B0F
F7E3 6BCA
F7E4 705B
F7E5 705A
F7E6 7222
F7E7 7382
F7E8 7381
F7E9 7383
F7EA 7670
F7EB 77D4
F7EC 7C67
F7ED 7C66
F7EE 7E95
F7EF 826C
F7F0 863A
F7F1 8640
F7F2 8639
F7F3 863C
F7F4 8631
F7F5 863B
F7F6 863E
F7F7 8830
F7F8 8832
F7F9 882E
F7FA 8833
F7FB 8976
F7FC 8974
F7FD 8973
F7FE 89FE
F840 8B8C
F841 8B8E
F842 8B8B
F843 8B88
F844 8C45
F845 8D19
F846 8E98
F847 8F64
F848 8F63
F849 91BC
F84A 9462
F84B 9455
F84C 945D
F84D 9457
F84E 945E
F84F 97C4
F850 97C5
F851 9800
F852 9A56
F853 9A59
F854 9B1E
F855 9B1F
F856 9B20
F857 9C52
F858 9C58
F859 9C50
F85A 9C4A
F85B 9C4D
F85C 9C4B
F85D 9C55
F85E 9C59
F85F 9C4C
F860 9C4E
F861 9DFB
F862 9DF7
F863 9DEF
F864 9DE3
F865 9DEB
F866 9DF8
F867 9DE4
F868 9DF6
F869 9DE1
F86A 9DEE
F86B 9DE6
F86C 9DF2
F86D 9DF0
F86E 9DE2
F86F 9DEC
F870 9DF4
F871 9DF3
F872 9DE8
F873 9DED
F874 9EC2
F875 9ED0
F876 9EF2
F877 9EF3
F878 9F06
F879 9F1C
F87A 9F38
F87B 9F37
F87C 9F36
F87D 9F43
F87E 9F4F
F8A1 9F71
F8A2 9F70
F8A3 9F6E
F8A4 9F6F
F8A5 56D3
F8A6 56CD
F8A7 5B4E
F8A8 5C6D
F8A9 652D
F8AA 66ED
F8AB 66EE
F8AC 6B13
F8AD 705F
F8AE 7061
F8AF 705D
F8B0 7060
F8B1 7223
F8B2 74DB
F8B3 74E5
F8B4 77D5
F8B5 7938
F8B6 79B7
F8B7 79B6
F8B8 7C6A
F8B9 7E97
F8BA 7F89
F8BB 826D
F8BC 8643
F8BD 8838
F8BE 8837
F8BF 8835
F8C0 884B
F8C1 8B94
F8C2 8B95
F8C3 8E9E
F8C4 8E9F
F8C5 8EA0
F8C6 8E9D
F8C7 91BE
F8C8 91BD
F8C9 91C2
F8CA 946B
F8CB 9468
F8CC 9469
F8CD 96E5
F8CE 9746
F8CF 9743
F8D0 9747
F8D1 97C7
F8D2 97E5
F8D3 9A5E
F8D4 9AD5
F8D5 9B59
F8D6 9C63
F8D7 9C67
F8D8 9C66
F8D9 9C62
F8DA 9C5E
F8DB 9C60
F8DC 9E02
F8DD 9DFE
F8DE 9E07
F8DF 9E03
F8E0 9E06
F8E1 9E05
F8E2 9E00
F8E3 9E01
F8E4 9E09
F8E5 9DFF
F8E6 9DFD
F8E7 9E04
F8E8 9EA0
F8E9 9F1E
F8EA 9F46
F8EB 9F74
F8EC 9F75
F8ED 9F76
F8EE 56D4
F8EF 652E
F8F0 65B8
F8F1 6B18
F8F2 6B19
F8F3 6B17
F8F4 6B1A
F8F5 7062
F8F6 7226
F8F7 72AA
F8F8 77D8
F8F9 77D9
F8FA 7939
F8FB 7C69
F8FC 7C6B
F8FD 7CF6
F8FE 7E9A
F940 7E98
F941 7E9B
F942 7E99
F943 81E0
F944 81E1
F945 8646
F946 8647
F947 8648
F948 8979
F949 897A
F94A 897C
F94B 897B
F94C 89FF
F94D 8B98
F94E 8B99
F94F 8EA5
F950 8EA4
F951 8EA3
F952 946E
F953 946D
F954 946F
F955 9471
F956 9473
F957 9749
F958 9872
F959 995F
F95A 9C68
F95B 9C6E
F95C 9C6D
F95D 9E0B
F95E 9E0D
F95F 9E10
F960 9E0F
F961 9E12
F962 9E11
F963 9EA1
F964 9EF5
F965 9F09
F966 9F47
F967 9F78
F968 9F7B
F969 9F7A
F96A 9F79
F96B 571E
F96C 7066
F96D 7C6F
F96E 883C
F96F 8DB2
F970 8EA6
F971 91C3
F972 9474
F973 9478
F974 9476
F975 9475
F976 9A60
F977 9C74
F978 9C73
F979 9C71
F97A 9C75
F97B 9E14
F97C 9E13
F97D 9EF6
F97E 9F0A
F9A1 9FA4
F9A2 7068
F9A3 7065
F9A4 7CF7
F9A5 866A
F9A6 883E
F9A7 883D
F9A8 883F
F9A9 8B9E
F9AA 8C9C
F9AB 8EA9
F9AC 8EC9
F9AD 974B
F9AE 9873
F9AF 9874
F9B0 98CC
F9B1 9961
F9B2 99AB
F9B3 9A64
F9B4 9A66
F9B5 9A67
F9B6 9B24
F9B7 9E15
F9B8 9E17
F9B9 9F48
F9BA 6207
F9BB 6B1E
F9BC 7227
F9BD 864C
F9BE 8EA8
F9BF 9482
F9C0 9480
F9C1 9481
F9C2 9A69
F9C3 9A68
F9C4 9B2E
F9C5 9E19
F9C6 7229
F9C7 864B
F9C8 8B9F
F9C9 9483
F9CA 9C79
F9CB 9EB7
F9CC 7675
F9CD 9A6B
F9CE 9C7A
F9CF 9E1D
F9D0 7069
F9D1 706A
F9D2 9EA4
F9D3 9F7E
F9D4 9F49
F9D5 9F98
F9D6 7881
F9D7 92B9
F9D8 88CF
F9D9 58BB
F9DA 6052
F9DB 7CA7
F9DC 5AFA
F9DD 2554
F9DE 2566
F9DF 2557
F9E0 2560
F9E1 256C
F9E2 2563
F9E3 255A
F9E4 2569
F9E5 255D
F9E6 2552
F9E7 2564
F9E8 2555
F9E9 255E
F9EA 256A
F9EB 2561
F9EC 2558
F9ED 2567
F9EE 255B
F9EF 2553
F9F0 2565
F9F1 2556
F9F2 255F
F9F3 256B
F9F4 2562
F9F5 2559
F9F6 2568
F9F7 255C
F9F8 2551
F9F9 2550
F9FA 256D
F9FB 256E
F9FC 2570
F9FD 256F
F9FE 2593
| 136,914 | 13,778 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_ioctl.py | import array
import unittest
from test.support import import_module, get_attribute
import os, struct
fcntl = import_module('fcntl')
termios = import_module('termios')
get_attribute(termios, 'TIOCGPGRP') #Can't run tests without this feature
if __name__ == 'PYOBJ.COM':
import fcntl
import termios
try:
tty = open("/dev/tty", "rb")
except OSError:
# todo: gh-runners fail on skiptest cosmo issue #431
import sys
sys.exit()
raise unittest.SkipTest("Unable to open /dev/tty")
else:
# Skip if another process is in foreground
r = fcntl.ioctl(tty, termios.TIOCGPGRP, " ")
tty.close()
rpgrp = struct.unpack("i", r)[0]
if rpgrp not in (os.getpgrp(), os.getsid(0)):
raise unittest.SkipTest("Neither the process group nor the session "
"are attached to /dev/tty")
del tty, r, rpgrp
try:
import pty
except ImportError:
pty = None
class IoctlTests(unittest.TestCase):
def test_ioctl(self):
# If this process has been put into the background, TIOCGPGRP returns
# the session ID instead of the process group id.
ids = (os.getpgrp(), os.getsid(0))
with open("/dev/tty", "rb") as tty:
r = fcntl.ioctl(tty, termios.TIOCGPGRP, " ")
rpgrp = struct.unpack("i", r)[0]
self.assertIn(rpgrp, ids)
def _check_ioctl_mutate_len(self, nbytes=None):
buf = array.array('i')
intsize = buf.itemsize
ids = (os.getpgrp(), os.getsid(0))
# A fill value unlikely to be in `ids`
fill = -12345
if nbytes is not None:
# Extend the buffer so that it is exactly `nbytes` bytes long
buf.extend([fill] * (nbytes // intsize))
self.assertEqual(len(buf) * intsize, nbytes) # sanity check
else:
buf.append(fill)
with open("/dev/tty", "rb") as tty:
r = fcntl.ioctl(tty, termios.TIOCGPGRP, buf, 1)
rpgrp = buf[0]
self.assertEqual(r, 0)
self.assertIn(rpgrp, ids)
def test_ioctl_mutate(self):
self._check_ioctl_mutate_len()
def test_ioctl_mutate_1024(self):
# Issue #9758: a mutable buffer of exactly 1024 bytes wouldn't be
# copied back after the system call.
self._check_ioctl_mutate_len(1024)
def test_ioctl_mutate_2048(self):
# Test with a larger buffer, just for the record.
self._check_ioctl_mutate_len(2048)
def test_ioctl_signed_unsigned_code_param(self):
if not pty or not hasattr(os, 'openpty'):
raise unittest.SkipTest('pty module required')
mfd, sfd = pty.openpty()
try:
if termios.TIOCSWINSZ < 0:
set_winsz_opcode_maybe_neg = termios.TIOCSWINSZ
set_winsz_opcode_pos = termios.TIOCSWINSZ & 0xffffffff
else:
set_winsz_opcode_pos = termios.TIOCSWINSZ
set_winsz_opcode_maybe_neg, = struct.unpack("i",
struct.pack("I", termios.TIOCSWINSZ))
our_winsz = struct.pack("HHHH",80,25,0,0)
# test both with a positive and potentially negative ioctl code
new_winsz = fcntl.ioctl(mfd, set_winsz_opcode_pos, our_winsz)
new_winsz = fcntl.ioctl(mfd, set_winsz_opcode_maybe_neg, our_winsz)
finally:
os.close(mfd)
os.close(sfd)
if __name__ == "__main__":
unittest.main()
| 3,453 | 99 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/make_ssl_certs.py | """Make the custom certificate and private key files used by test_ssl
and friends."""
import os
import pprint
import shutil
import tempfile
from subprocess import *
req_template = """
[ default ]
base_url = http://testca.pythontest.net/testca
[req]
distinguished_name = req_distinguished_name
prompt = no
[req_distinguished_name]
C = XY
L = Castle Anthrax
O = Python Software Foundation
CN = {hostname}
[req_x509_extensions_simple]
subjectAltName = @san
[req_x509_extensions_full]
subjectAltName = @san
keyUsage = critical,keyEncipherment,digitalSignature
extendedKeyUsage = serverAuth,clientAuth
basicConstraints = critical,CA:false
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always,issuer:always
authorityInfoAccess = @issuer_ocsp_info
crlDistributionPoints = @crl_info
[ issuer_ocsp_info ]
caIssuers;URI.0 = $base_url/pycacert.cer
OCSP;URI.0 = $base_url/ocsp/
[ crl_info ]
URI.0 = $base_url/revocation.crl
[san]
DNS.1 = {hostname}
{extra_san}
[dir_sect]
C = XY
L = Castle Anthrax
O = Python Software Foundation
CN = dirname example
[princ_name]
realm = EXP:0, GeneralString:KERBEROS.REALM
principal_name = EXP:1, SEQUENCE:principal_seq
[principal_seq]
name_type = EXP:0, INTEGER:1
name_string = EXP:1, SEQUENCE:principals
[principals]
princ1 = GeneralString:username
[ ca ]
default_ca = CA_default
[ CA_default ]
dir = cadir
database = $dir/index.txt
crlnumber = $dir/crl.txt
default_md = sha256
default_days = 3600
default_crl_days = 3600
certificate = pycacert.pem
private_key = pycakey.pem
serial = $dir/serial
RANDFILE = $dir/.rand
policy = policy_match
[ policy_match ]
countryName = match
stateOrProvinceName = optional
organizationName = match
organizationalUnitName = optional
commonName = supplied
emailAddress = optional
[ policy_anything ]
countryName = optional
stateOrProvinceName = optional
localityName = optional
organizationName = optional
organizationalUnitName = optional
commonName = supplied
emailAddress = optional
[ v3_ca ]
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid:always,issuer
basicConstraints = CA:true
"""
here = os.path.abspath(os.path.dirname(__file__))
def make_cert_key(hostname, sign=False, extra_san='',
ext='req_x509_extensions_full', key='rsa:3072'):
print("creating cert for " + hostname)
tempnames = []
for i in range(3):
with tempfile.NamedTemporaryFile(delete=False) as f:
tempnames.append(f.name)
req_file, cert_file, key_file = tempnames
try:
req = req_template.format(hostname=hostname, extra_san=extra_san)
with open(req_file, 'w') as f:
f.write(req)
args = ['req', '-new', '-days', '3650', '-nodes',
'-newkey', key, '-keyout', key_file,
'-extensions', ext,
'-config', req_file]
if sign:
with tempfile.NamedTemporaryFile(delete=False) as f:
tempnames.append(f.name)
reqfile = f.name
args += ['-out', reqfile ]
else:
args += ['-x509', '-out', cert_file ]
check_call(['openssl'] + args)
if sign:
args = [
'ca',
'-config', req_file,
'-extensions', ext,
'-out', cert_file,
'-outdir', 'cadir',
'-policy', 'policy_anything',
'-batch', '-infiles', reqfile
]
check_call(['openssl'] + args)
with open(cert_file, 'r') as f:
cert = f.read()
with open(key_file, 'r') as f:
key = f.read()
return cert, key
finally:
for name in tempnames:
os.remove(name)
TMP_CADIR = 'cadir'
def unmake_ca():
shutil.rmtree(TMP_CADIR)
def make_ca():
os.mkdir(TMP_CADIR)
with open(os.path.join('cadir','index.txt'),'a+') as f:
pass # empty file
with open(os.path.join('cadir','crl.txt'),'a+') as f:
f.write("00")
with open(os.path.join('cadir','index.txt.attr'),'w+') as f:
f.write('unique_subject = no')
with tempfile.NamedTemporaryFile("w") as t:
t.write(req_template.format(hostname='our-ca-server', extra_san=''))
t.flush()
with tempfile.NamedTemporaryFile() as f:
args = ['req', '-new', '-days', '3650', '-extensions', 'v3_ca', '-nodes',
'-newkey', 'rsa:3072', '-keyout', 'pycakey.pem',
'-out', f.name,
'-subj', '/C=XY/L=Castle Anthrax/O=Python Software Foundation CA/CN=our-ca-server']
check_call(['openssl'] + args)
args = ['ca', '-config', t.name, '-create_serial',
'-out', 'pycacert.pem', '-batch', '-outdir', TMP_CADIR,
'-keyfile', 'pycakey.pem', '-days', '3650',
'-selfsign', '-extensions', 'v3_ca', '-infiles', f.name ]
check_call(['openssl'] + args)
args = ['ca', '-config', t.name, '-gencrl', '-out', 'revocation.crl']
check_call(['openssl'] + args)
# capath hashes depend on subject!
check_call([
'openssl', 'x509', '-in', 'pycacert.pem', '-out', 'capath/ceff1710.0'
])
shutil.copy('capath/ceff1710.0', 'capath/b1930218.0')
def print_cert(path):
import _ssl
pprint.pprint(_ssl._test_decode_cert(path))
if __name__ == '__main__':
os.chdir(here)
cert, key = make_cert_key('localhost', ext='req_x509_extensions_simple')
with open('ssl_cert.pem', 'w') as f:
f.write(cert)
with open('ssl_key.pem', 'w') as f:
f.write(key)
print("password protecting ssl_key.pem in ssl_key.passwd.pem")
check_call(['openssl','rsa','-in','ssl_key.pem','-out','ssl_key.passwd.pem','-des3','-passout','pass:somepass'])
check_call(['openssl','rsa','-in','ssl_key.pem','-out','keycert.passwd.pem','-des3','-passout','pass:somepass'])
with open('keycert.pem', 'w') as f:
f.write(key)
f.write(cert)
with open('keycert.passwd.pem', 'a+') as f:
f.write(cert)
# For certificate matching tests
make_ca()
cert, key = make_cert_key('fakehostname', ext='req_x509_extensions_simple')
with open('keycert2.pem', 'w') as f:
f.write(key)
f.write(cert)
cert, key = make_cert_key('localhost', True)
with open('keycert3.pem', 'w') as f:
f.write(key)
f.write(cert)
cert, key = make_cert_key('fakehostname', True)
with open('keycert4.pem', 'w') as f:
f.write(key)
f.write(cert)
cert, key = make_cert_key(
'localhost-ecc', True, key='param:secp384r1.pem'
)
with open('keycertecc.pem', 'w') as f:
f.write(key)
f.write(cert)
extra_san = [
'otherName.1 = 1.2.3.4;UTF8:some other identifier',
'otherName.2 = 1.3.6.1.5.2.2;SEQUENCE:princ_name',
'email.1 = [email protected]',
'DNS.2 = www.example.org',
# GEN_X400
'dirName.1 = dir_sect',
# GEN_EDIPARTY
'URI.1 = https://www.python.org/',
'IP.1 = 127.0.0.1',
'IP.2 = ::1',
'RID.1 = 1.2.3.4.5',
]
cert, key = make_cert_key('allsans', extra_san='\n'.join(extra_san))
with open('allsans.pem', 'w') as f:
f.write(key)
f.write(cert)
extra_san = [
# könig (king)
'DNS.2 = xn--knig-5qa.idn.pythontest.net',
# königsgäÃchen (king's alleyway)
'DNS.3 = xn--knigsgsschen-lcb0w.idna2003.pythontest.net',
'DNS.4 = xn--knigsgchen-b4a3dun.idna2008.pythontest.net',
# βÏÎ»Î¿Ï (marble)
'DNS.5 = xn--nxasmq6b.idna2003.pythontest.net',
'DNS.6 = xn--nxasmm1c.idna2008.pythontest.net',
]
# IDN SANS, signed
cert, key = make_cert_key('idnsans', True, extra_san='\n'.join(extra_san))
with open('idnsans.pem', 'w') as f:
f.write(key)
f.write(cert)
unmake_ca()
print("update Lib/test/test_ssl.py and Lib/test/test_asyncio/util.py")
print_cert('keycert.pem')
print_cert('keycert3.pem')
| 8,722 | 283 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/nokia.pem | # Certificate for projects.developer.nokia.com:443 (see issue 13034)
-----BEGIN CERTIFICATE-----
MIIFLDCCBBSgAwIBAgIQLubqdkCgdc7lAF9NfHlUmjANBgkqhkiG9w0BAQUFADCB
vDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL
ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug
YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDE2MDQGA1UEAxMt
VmVyaVNpZ24gQ2xhc3MgMyBJbnRlcm5hdGlvbmFsIFNlcnZlciBDQSAtIEczMB4X
DTExMDkyMTAwMDAwMFoXDTEyMDkyMDIzNTk1OVowcTELMAkGA1UEBhMCRkkxDjAM
BgNVBAgTBUVzcG9vMQ4wDAYDVQQHFAVFc3BvbzEOMAwGA1UEChQFTm9raWExCzAJ
BgNVBAsUAkJJMSUwIwYDVQQDFBxwcm9qZWN0cy5kZXZlbG9wZXIubm9raWEuY29t
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCr92w1bpHYSYxUEx8N/8Iddda2
lYi+aXNtQfV/l2Fw9Ykv3Ipw4nLeGTj18FFlAZgMdPRlgrzF/NNXGw/9l3/qKdow
CypkQf8lLaxb9Ze1E/KKmkRJa48QTOqvo6GqKuTI6HCeGlG1RxDb8YSKcQWLiytn
yj3Wp4MgRQO266xmMQIDAQABo4IB9jCCAfIwQQYDVR0RBDowOIIccHJvamVjdHMu
ZGV2ZWxvcGVyLm5va2lhLmNvbYIYcHJvamVjdHMuZm9ydW0ubm9raWEuY29tMAkG
A1UdEwQCMAAwCwYDVR0PBAQDAgWgMEEGA1UdHwQ6MDgwNqA0oDKGMGh0dHA6Ly9T
VlJJbnRsLUczLWNybC52ZXJpc2lnbi5jb20vU1ZSSW50bEczLmNybDBEBgNVHSAE
PTA7MDkGC2CGSAGG+EUBBxcDMCowKAYIKwYBBQUHAgEWHGh0dHBzOi8vd3d3LnZl
cmlzaWduLmNvbS9ycGEwKAYDVR0lBCEwHwYJYIZIAYb4QgQBBggrBgEFBQcDAQYI
KwYBBQUHAwIwcgYIKwYBBQUHAQEEZjBkMCQGCCsGAQUFBzABhhhodHRwOi8vb2Nz
cC52ZXJpc2lnbi5jb20wPAYIKwYBBQUHMAKGMGh0dHA6Ly9TVlJJbnRsLUczLWFp
YS52ZXJpc2lnbi5jb20vU1ZSSW50bEczLmNlcjBuBggrBgEFBQcBDARiMGChXqBc
MFowWDBWFglpbWFnZS9naWYwITAfMAcGBSsOAwIaBBRLa7kolgYMu9BSOJsprEsH
iyEFGDAmFiRodHRwOi8vbG9nby52ZXJpc2lnbi5jb20vdnNsb2dvMS5naWYwDQYJ
KoZIhvcNAQEFBQADggEBACQuPyIJqXwUyFRWw9x5yDXgMW4zYFopQYOw/ItRY522
O5BsySTh56BWS6mQB07XVfxmYUGAvRQDA5QHpmY8jIlNwSmN3s8RKo+fAtiNRlcL
x/mWSfuMs3D/S6ev3D6+dpEMZtjrhOdctsarMKp8n/hPbwhAbg5hVjpkW5n8vz2y
0KxvvkA1AxpLwpVv7OlK17ttzIHw8bp9HTlHBU5s8bKz4a565V/a5HI0CSEv/+0y
ko4/ghTnZc1CkmUngKKeFMSah/mT/xAh8XnE2l1AazFa8UKuYki1e+ArHaGZc4ix
UYOtiRphwfuYQhRZ7qX9q2MMkCMI65XNK/SaFrAbbG0=
-----END CERTIFICATE-----
| 1,923 | 32 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_popen.py | """Basic tests for os.popen()
Particularly useful for platforms that fake popen.
"""
import unittest
from test import support
import os, sys
# Test that command-lines get down as we expect.
# To do this we execute:
# python -c "import sys;print(sys.argv)" {rest_of_commandline}
# This results in Python being spawned and printing the sys.argv list.
# We can then eval() the result of this, and see what each argv was.
python = sys.executable
if ' ' in python:
python = '"' + python + '"' # quote embedded space for cmdline
class PopenTest(unittest.TestCase):
def _do_test_commandline(self, cmdline, expected):
cmd = '%s -c "import sys; print(sys.argv)" %s'
cmd = cmd % (python, cmdline)
with os.popen(cmd) as p:
data = p.read()
got = eval(data)[1:] # strip off argv[0]
self.assertEqual(got, expected)
def test_popen(self):
self.assertRaises(TypeError, os.popen)
self._do_test_commandline(
"foo bar",
["foo", "bar"]
)
self._do_test_commandline(
'foo "spam and eggs" "silly walk"',
["foo", "spam and eggs", "silly walk"]
)
self._do_test_commandline(
'foo "a \\"quoted\\" arg" bar',
["foo", 'a "quoted" arg', "bar"]
)
support.reap_children()
def test_return_code(self):
self.assertEqual(os.popen("exit 0").close(), None)
if os.name == 'nt':
self.assertEqual(os.popen("exit 42").close(), 42)
else:
self.assertEqual(os.popen("exit 42").close(), 42 << 8)
def test_contextmanager(self):
with os.popen("echo hello") as f:
self.assertEqual(f.read(), "hello\n")
def test_iterating(self):
with os.popen("echo hello") as f:
self.assertEqual(list(f), ["hello\n"])
def test_keywords(self):
with os.popen(cmd="exit 0", mode="w", buffering=-1):
pass
if __name__ == "__main__":
unittest.main()
| 2,025 | 66 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/doctest_aliases.py | # Used by test_doctest.py.
class TwoNames:
'''f() and g() are two names for the same method'''
def f(self):
'''
>>> print(TwoNames().f())
f
'''
return 'f'
g = f # define an alias for f
| 240 | 14 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/mock_socket.py | """Mock socket module used by the smtpd and smtplib tests.
"""
# imported for _GLOBAL_DEFAULT_TIMEOUT
import socket as socket_module
# Mock socket module
_defaulttimeout = None
_reply_data = None
# This is used to queue up data to be read through socket.makefile, typically
# *before* the socket object is even created. It is intended to handle a single
# line which the socket will feed on recv() or makefile().
def reply_with(line):
global _reply_data
_reply_data = line
class MockFile:
"""Mock file object returned by MockSocket.makefile().
"""
def __init__(self, lines):
self.lines = lines
def readline(self, limit=-1):
result = self.lines.pop(0) + b'\r\n'
if limit >= 0:
# Re-insert the line, removing the \r\n we added.
self.lines.insert(0, result[limit:-2])
result = result[:limit]
return result
def close(self):
pass
class MockSocket:
"""Mock socket object used by smtpd and smtplib tests.
"""
def __init__(self, family=None):
global _reply_data
self.family = family
self.output = []
self.lines = []
if _reply_data:
self.lines.append(_reply_data)
_reply_data = None
self.conn = None
self.timeout = None
def queue_recv(self, line):
self.lines.append(line)
def recv(self, bufsize, flags=None):
data = self.lines.pop(0) + b'\r\n'
return data
def fileno(self):
return 0
def settimeout(self, timeout):
if timeout is None:
self.timeout = _defaulttimeout
else:
self.timeout = timeout
def gettimeout(self):
return self.timeout
def setsockopt(self, level, optname, value):
pass
def getsockopt(self, level, optname, buflen=None):
return 0
def bind(self, address):
pass
def accept(self):
self.conn = MockSocket()
return self.conn, 'c'
def getsockname(self):
return ('0.0.0.0', 0)
def setblocking(self, flag):
pass
def listen(self, backlog):
pass
def makefile(self, mode='r', bufsize=-1):
handle = MockFile(self.lines)
return handle
def sendall(self, buffer, flags=None):
self.last = data
self.output.append(data)
return len(data)
def send(self, data, flags=None):
self.last = data
self.output.append(data)
return len(data)
def getpeername(self):
return ('peer-address', 'peer-port')
def close(self):
pass
def socket(family=None, type=None, proto=None):
return MockSocket(family)
def create_connection(address, timeout=socket_module._GLOBAL_DEFAULT_TIMEOUT,
source_address=None):
try:
int_port = int(address[1])
except ValueError:
raise error
ms = MockSocket()
if timeout is socket_module._GLOBAL_DEFAULT_TIMEOUT:
timeout = getdefaulttimeout()
ms.settimeout(timeout)
return ms
def setdefaulttimeout(timeout):
global _defaulttimeout
_defaulttimeout = timeout
def getdefaulttimeout():
return _defaulttimeout
def getfqdn():
return ""
def gethostname():
pass
def gethostbyname(name):
return ""
def getaddrinfo(*args, **kw):
return socket_module.getaddrinfo(*args, **kw)
gaierror = socket_module.gaierror
error = socket_module.error
# Constants
AF_INET = socket_module.AF_INET
AF_INET6 = socket_module.AF_INET6
SOCK_STREAM = socket_module.SOCK_STREAM
SOL_SOCKET = None
SO_REUSEADDR = None
| 3,611 | 160 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_regrtest.py | """
Tests of regrtest.py.
Note: test_regrtest cannot be run twice in parallel.
"""
import contextlib
import faulthandler
import io
import os.path
import platform
import re
import subprocess
import sys
import sysconfig
import tempfile
import textwrap
import unittest
from test import libregrtest
from test import support
from test.libregrtest import utils
Py_DEBUG = hasattr(sys, 'getobjects')
ROOT_DIR = os.path.join(os.path.dirname(__file__), '..', '..')
ROOT_DIR = os.path.abspath(os.path.normpath(ROOT_DIR))
TEST_INTERRUPTED = textwrap.dedent("""
from signal import SIGINT
try:
from _testcapi import raise_signal
raise_signal(SIGINT)
except ImportError:
import os
os.kill(os.getpid(), SIGINT)
""")
class ParseArgsTestCase(unittest.TestCase):
"""
Test regrtest's argument parsing, function _parse_args().
"""
def checkError(self, args, msg):
with support.captured_stderr() as err, self.assertRaises(SystemExit):
libregrtest._parse_args(args)
self.assertIn(msg, err.getvalue())
def test_help(self):
for opt in '-h', '--help':
with self.subTest(opt=opt):
with support.captured_stdout() as out, \
self.assertRaises(SystemExit):
libregrtest._parse_args([opt])
self.assertIn('Run Python regression tests.', out.getvalue())
@unittest.skipUnless(hasattr(faulthandler, 'dump_traceback_later'),
"faulthandler.dump_traceback_later() required")
def test_timeout(self):
ns = libregrtest._parse_args(['--timeout', '4.2'])
self.assertEqual(ns.timeout, 4.2)
self.checkError(['--timeout'], 'expected one argument')
self.checkError(['--timeout', 'foo'], 'invalid float value')
def test_wait(self):
ns = libregrtest._parse_args(['--wait'])
self.assertTrue(ns.wait)
def test_worker_args(self):
ns = libregrtest._parse_args(['--worker-args', '[[], {}]'])
self.assertEqual(ns.worker_args, '[[], {}]')
self.checkError(['--worker-args'], 'expected one argument')
def test_start(self):
for opt in '-S', '--start':
with self.subTest(opt=opt):
ns = libregrtest._parse_args([opt, 'foo'])
self.assertEqual(ns.start, 'foo')
self.checkError([opt], 'expected one argument')
def test_verbose(self):
ns = libregrtest._parse_args(['-v'])
self.assertEqual(ns.verbose, 1)
ns = libregrtest._parse_args(['-vvv'])
self.assertEqual(ns.verbose, 3)
ns = libregrtest._parse_args(['--verbose'])
self.assertEqual(ns.verbose, 1)
ns = libregrtest._parse_args(['--verbose'] * 3)
self.assertEqual(ns.verbose, 3)
ns = libregrtest._parse_args([])
self.assertEqual(ns.verbose, 0)
def test_verbose2(self):
for opt in '-w', '--verbose2':
with self.subTest(opt=opt):
ns = libregrtest._parse_args([opt])
self.assertTrue(ns.verbose2)
def test_verbose3(self):
for opt in '-W', '--verbose3':
with self.subTest(opt=opt):
ns = libregrtest._parse_args([opt])
self.assertTrue(ns.verbose3)
def test_quiet(self):
for opt in '-q', '--quiet':
with self.subTest(opt=opt):
ns = libregrtest._parse_args([opt])
self.assertTrue(ns.quiet)
self.assertEqual(ns.verbose, 0)
def test_slow(self):
for opt in '-o', '--slowest':
with self.subTest(opt=opt):
ns = libregrtest._parse_args([opt])
self.assertTrue(ns.print_slow)
def test_header(self):
ns = libregrtest._parse_args(['--header'])
self.assertTrue(ns.header)
ns = libregrtest._parse_args(['--verbose'])
self.assertTrue(ns.header)
def test_randomize(self):
for opt in '-r', '--randomize':
with self.subTest(opt=opt):
ns = libregrtest._parse_args([opt])
self.assertTrue(ns.randomize)
def test_randseed(self):
ns = libregrtest._parse_args(['--randseed', '12345'])
self.assertEqual(ns.random_seed, 12345)
self.assertTrue(ns.randomize)
self.checkError(['--randseed'], 'expected one argument')
self.checkError(['--randseed', 'foo'], 'invalid int value')
def test_fromfile(self):
for opt in '-f', '--fromfile':
with self.subTest(opt=opt):
ns = libregrtest._parse_args([opt, 'foo'])
self.assertEqual(ns.fromfile, 'foo')
self.checkError([opt], 'expected one argument')
self.checkError([opt, 'foo', '-s'], "don't go together")
def test_exclude(self):
for opt in '-x', '--exclude':
with self.subTest(opt=opt):
ns = libregrtest._parse_args([opt])
self.assertTrue(ns.exclude)
def test_single(self):
for opt in '-s', '--single':
with self.subTest(opt=opt):
ns = libregrtest._parse_args([opt])
self.assertTrue(ns.single)
self.checkError([opt, '-f', 'foo'], "don't go together")
def test_match(self):
for opt in '-m', '--match':
with self.subTest(opt=opt):
ns = libregrtest._parse_args([opt, 'pattern'])
self.assertEqual(ns.match_tests, ['pattern'])
self.checkError([opt], 'expected one argument')
ns = libregrtest._parse_args(['-m', 'pattern1',
'-m', 'pattern2'])
self.assertEqual(ns.match_tests, ['pattern1', 'pattern2'])
self.addCleanup(support.unlink, support.TESTFN)
with open(support.TESTFN, "w") as fp:
print('matchfile1', file=fp)
print('matchfile2', file=fp)
filename = os.path.abspath(support.TESTFN)
ns = libregrtest._parse_args(['-m', 'match',
'--matchfile', filename])
self.assertEqual(ns.match_tests,
['match', 'matchfile1', 'matchfile2'])
def test_failfast(self):
for opt in '-G', '--failfast':
with self.subTest(opt=opt):
ns = libregrtest._parse_args([opt, '-v'])
self.assertTrue(ns.failfast)
ns = libregrtest._parse_args([opt, '-W'])
self.assertTrue(ns.failfast)
self.checkError([opt], '-G/--failfast needs either -v or -W')
def test_use(self):
for opt in '-u', '--use':
with self.subTest(opt=opt):
ns = libregrtest._parse_args([opt, 'gui,network'])
self.assertEqual(ns.use_resources, ['gui', 'network'])
ns = libregrtest._parse_args([opt, 'gui,none,network'])
self.assertEqual(ns.use_resources, ['network'])
expected = list(libregrtest.ALL_RESOURCES)
expected.remove('gui')
ns = libregrtest._parse_args([opt, 'all,-gui'])
self.assertEqual(ns.use_resources, expected)
self.checkError([opt], 'expected one argument')
self.checkError([opt, 'foo'], 'invalid resource')
# all + a resource not part of "all"
ns = libregrtest._parse_args([opt, 'all,tzdata'])
self.assertEqual(ns.use_resources,
list(libregrtest.ALL_RESOURCES) + ['tzdata'])
# test another resource which is not part of "all"
ns = libregrtest._parse_args([opt, 'extralargefile'])
self.assertEqual(ns.use_resources, ['extralargefile'])
def test_memlimit(self):
for opt in '-M', '--memlimit':
with self.subTest(opt=opt):
ns = libregrtest._parse_args([opt, '4G'])
self.assertEqual(ns.memlimit, '4G')
self.checkError([opt], 'expected one argument')
def test_testdir(self):
ns = libregrtest._parse_args(['--testdir', 'foo'])
self.assertEqual(ns.testdir, os.path.join(support.SAVEDCWD, 'foo'))
self.checkError(['--testdir'], 'expected one argument')
def test_runleaks(self):
for opt in '-L', '--runleaks':
with self.subTest(opt=opt):
ns = libregrtest._parse_args([opt])
self.assertTrue(ns.runleaks)
def test_huntrleaks(self):
for opt in '-R', '--huntrleaks':
with self.subTest(opt=opt):
ns = libregrtest._parse_args([opt, ':'])
self.assertEqual(ns.huntrleaks, (5, 4, 'reflog.txt'))
ns = libregrtest._parse_args([opt, '6:'])
self.assertEqual(ns.huntrleaks, (6, 4, 'reflog.txt'))
ns = libregrtest._parse_args([opt, ':3'])
self.assertEqual(ns.huntrleaks, (5, 3, 'reflog.txt'))
ns = libregrtest._parse_args([opt, '6:3:leaks.log'])
self.assertEqual(ns.huntrleaks, (6, 3, 'leaks.log'))
self.checkError([opt], 'expected one argument')
self.checkError([opt, '6'],
'needs 2 or 3 colon-separated arguments')
self.checkError([opt, 'foo:'], 'invalid huntrleaks value')
self.checkError([opt, '6:foo'], 'invalid huntrleaks value')
def test_multiprocess(self):
for opt in '-j', '--multiprocess':
with self.subTest(opt=opt):
ns = libregrtest._parse_args([opt, '2'])
self.assertEqual(ns.use_mp, 2)
self.checkError([opt], 'expected one argument')
self.checkError([opt, 'foo'], 'invalid int value')
self.checkError([opt, '2', '-T'], "don't go together")
self.checkError([opt, '2', '-l'], "don't go together")
self.checkError([opt, '0', '-T'], "don't go together")
self.checkError([opt, '0', '-l'], "don't go together")
def test_coverage(self):
for opt in '-T', '--coverage':
with self.subTest(opt=opt):
ns = libregrtest._parse_args([opt])
self.assertTrue(ns.trace)
def test_coverdir(self):
for opt in '-D', '--coverdir':
with self.subTest(opt=opt):
ns = libregrtest._parse_args([opt, 'foo'])
self.assertEqual(ns.coverdir,
os.path.join(support.SAVEDCWD, 'foo'))
self.checkError([opt], 'expected one argument')
def test_nocoverdir(self):
for opt in '-N', '--nocoverdir':
with self.subTest(opt=opt):
ns = libregrtest._parse_args([opt])
self.assertIsNone(ns.coverdir)
def test_threshold(self):
for opt in '-t', '--threshold':
with self.subTest(opt=opt):
ns = libregrtest._parse_args([opt, '1000'])
self.assertEqual(ns.threshold, 1000)
self.checkError([opt], 'expected one argument')
self.checkError([opt, 'foo'], 'invalid int value')
def test_nowindows(self):
for opt in '-n', '--nowindows':
with self.subTest(opt=opt):
with contextlib.redirect_stderr(io.StringIO()) as stderr:
ns = libregrtest._parse_args([opt])
self.assertTrue(ns.nowindows)
err = stderr.getvalue()
self.assertIn('the --nowindows (-n) option is deprecated', err)
def test_forever(self):
for opt in '-F', '--forever':
with self.subTest(opt=opt):
ns = libregrtest._parse_args([opt])
self.assertTrue(ns.forever)
def test_unrecognized_argument(self):
self.checkError(['--xxx'], 'usage:')
def test_long_option__partial(self):
ns = libregrtest._parse_args(['--qui'])
self.assertTrue(ns.quiet)
self.assertEqual(ns.verbose, 0)
def test_two_options(self):
ns = libregrtest._parse_args(['--quiet', '--exclude'])
self.assertTrue(ns.quiet)
self.assertEqual(ns.verbose, 0)
self.assertTrue(ns.exclude)
def test_option_with_empty_string_value(self):
ns = libregrtest._parse_args(['--start', ''])
self.assertEqual(ns.start, '')
def test_arg(self):
ns = libregrtest._parse_args(['foo'])
self.assertEqual(ns.args, ['foo'])
def test_option_and_arg(self):
ns = libregrtest._parse_args(['--quiet', 'foo'])
self.assertTrue(ns.quiet)
self.assertEqual(ns.verbose, 0)
self.assertEqual(ns.args, ['foo'])
def test_arg_option_arg(self):
ns = libregrtest._parse_args(['test_unaryop', '-v', 'test_binop'])
self.assertEqual(ns.verbose, 1)
self.assertEqual(ns.args, ['test_unaryop', 'test_binop'])
def test_unknown_option(self):
self.checkError(['--unknown-option'],
'unrecognized arguments: --unknown-option')
class BaseTestCase(unittest.TestCase):
TEST_UNIQUE_ID = 1
TESTNAME_PREFIX = 'test_regrtest_'
TESTNAME_REGEX = r'test_[a-zA-Z0-9_]+'
def setUp(self):
self.testdir = os.path.realpath(os.path.dirname(__file__))
self.tmptestdir = tempfile.mkdtemp()
self.addCleanup(support.rmtree, self.tmptestdir)
def create_test(self, name=None, code=None):
if not name:
name = 'noop%s' % BaseTestCase.TEST_UNIQUE_ID
BaseTestCase.TEST_UNIQUE_ID += 1
if code is None:
code = textwrap.dedent("""
import unittest
class Tests(unittest.TestCase):
def test_empty_test(self):
pass
""")
# test_regrtest cannot be run twice in parallel because
# of setUp() and create_test()
name = self.TESTNAME_PREFIX + name
path = os.path.join(self.tmptestdir, name + '.py')
self.addCleanup(support.unlink, path)
# Use 'x' mode to ensure that we do not override existing tests
try:
with open(path, 'x', encoding='utf-8') as fp:
fp.write(code)
except PermissionError as exc:
if not sysconfig.is_python_build():
self.skipTest("cannot write %s: %s" % (path, exc))
raise
return name
def regex_search(self, regex, output):
match = re.search(regex, output, re.MULTILINE)
if not match:
self.fail("%r not found in %r" % (regex, output))
return match
def check_line(self, output, regex):
regex = re.compile(r'^' + regex, re.MULTILINE)
self.assertRegex(output, regex)
def parse_executed_tests(self, output):
regex = (r'^[0-9]+:[0-9]+:[0-9]+ (?:load avg: [0-9]+\.[0-9]{2} )?\[ *[0-9]+(?:/ *[0-9]+)*\] (%s)'
% self.TESTNAME_REGEX)
parser = re.finditer(regex, output, re.MULTILINE)
return list(match.group(1) for match in parser)
def check_executed_tests(self, output, tests, skipped=(), failed=(),
env_changed=(), omitted=(),
rerun=(), no_test_ran=(),
randomize=False, interrupted=False,
fail_env_changed=False):
if isinstance(tests, str):
tests = [tests]
if isinstance(skipped, str):
skipped = [skipped]
if isinstance(failed, str):
failed = [failed]
if isinstance(env_changed, str):
env_changed = [env_changed]
if isinstance(omitted, str):
omitted = [omitted]
if isinstance(rerun, str):
rerun = [rerun]
if isinstance(no_test_ran, str):
no_test_ran = [no_test_ran]
executed = self.parse_executed_tests(output)
if randomize:
self.assertEqual(set(executed), set(tests), output)
else:
self.assertEqual(executed, tests, output)
def plural(count):
return 's' if count != 1 else ''
def list_regex(line_format, tests):
count = len(tests)
names = ' '.join(sorted(tests))
regex = line_format % (count, plural(count))
regex = r'%s:\n %s$' % (regex, names)
return regex
if skipped:
regex = list_regex('%s test%s skipped', skipped)
self.check_line(output, regex)
if failed:
regex = list_regex('%s test%s failed', failed)
self.check_line(output, regex)
if env_changed:
regex = list_regex('%s test%s altered the execution environment',
env_changed)
self.check_line(output, regex)
if omitted:
regex = list_regex('%s test%s omitted', omitted)
self.check_line(output, regex)
if rerun:
regex = list_regex('%s re-run test%s', rerun)
self.check_line(output, regex)
self.check_line(output, "Re-running failed tests in verbose mode")
for name in rerun:
regex = "Re-running test %r in verbose mode" % name
self.check_line(output, regex)
if no_test_ran:
regex = list_regex('%s test%s run no tests', no_test_ran)
self.check_line(output, regex)
good = (len(tests) - len(skipped) - len(failed)
- len(omitted) - len(env_changed) - len(no_test_ran))
if good:
regex = r'%s test%s OK\.$' % (good, plural(good))
if not skipped and not failed and good > 1:
regex = 'All %s' % regex
self.check_line(output, regex)
if interrupted:
self.check_line(output, 'Test suite interrupted by signal SIGINT.')
result = []
if failed:
result.append('FAILURE')
elif fail_env_changed and env_changed:
result.append('ENV CHANGED')
if interrupted:
result.append('INTERRUPTED')
if not any((good, result, failed, interrupted, skipped,
env_changed, fail_env_changed)):
result.append("NO TEST RUN")
elif not result:
result.append('SUCCESS')
result = ', '.join(result)
if rerun:
self.check_line(output, 'Tests result: %s' % result)
result = 'FAILURE then %s' % result
self.check_line(output, 'Tests result: %s' % result)
def parse_random_seed(self, output):
match = self.regex_search(r'Using random seed ([0-9]+)', output)
randseed = int(match.group(1))
self.assertTrue(0 <= randseed <= 10000000, randseed)
return randseed
def run_command(self, args, input=None, exitcode=0, **kw):
if not input:
input = ''
if 'stderr' not in kw:
kw['stderr'] = subprocess.PIPE
proc = subprocess.run(args,
universal_newlines=True,
input=input,
stdout=subprocess.PIPE,
**kw)
if proc.returncode != exitcode:
msg = ("Command %s failed with exit code %s\n"
"\n"
"stdout:\n"
"---\n"
"%s\n"
"---\n"
% (str(args), proc.returncode, proc.stdout))
if proc.stderr:
msg += ("\n"
"stderr:\n"
"---\n"
"%s"
"---\n"
% proc.stderr)
self.fail(msg)
return proc
def run_python(self, args, **kw):
args = [sys.executable, '-X', 'faulthandler', '-I', *args]
proc = self.run_command(args, **kw)
return proc.stdout
class ProgramsTestCase(BaseTestCase):
"""
Test various ways to run the Python test suite. Use options close
to options used on the buildbot.
"""
NTEST = 4
def setUp(self):
super().setUp()
# Create NTEST tests doing nothing
self.tests = [self.create_test() for index in range(self.NTEST)]
self.python_args = ['-Wd', '-E', '-bb']
self.regrtest_args = ['-uall', '-rwW',
'--testdir=%s' % self.tmptestdir]
if hasattr(faulthandler, 'dump_traceback_later'):
self.regrtest_args.extend(('--timeout', '3600', '-j4'))
if sys.platform == 'win32':
self.regrtest_args.append('-n')
def check_output(self, output):
self.parse_random_seed(output)
self.check_executed_tests(output, self.tests, randomize=True)
def run_tests(self, args):
output = self.run_python(args)
self.check_output(output)
def test_script_regrtest(self):
# Lib/test/regrtest.py
script = os.path.join(self.testdir, 'regrtest.py')
args = [*self.python_args, script, *self.regrtest_args, *self.tests]
self.run_tests(args)
def test_module_test(self):
# -m test
args = [*self.python_args, '-m', 'test',
*self.regrtest_args, *self.tests]
self.run_tests(args)
def test_module_regrtest(self):
# -m test.regrtest
args = [*self.python_args, '-m', 'test.regrtest',
*self.regrtest_args, *self.tests]
self.run_tests(args)
def test_module_autotest(self):
# -m test.autotest
args = [*self.python_args, '-m', 'test.autotest',
*self.regrtest_args, *self.tests]
self.run_tests(args)
def test_module_from_test_autotest(self):
# from test import autotest
code = 'from test import autotest'
args = [*self.python_args, '-c', code,
*self.regrtest_args, *self.tests]
self.run_tests(args)
def test_script_autotest(self):
# Lib/test/autotest.py
script = os.path.join(self.testdir, 'autotest.py')
args = [*self.python_args, script, *self.regrtest_args, *self.tests]
self.run_tests(args)
@unittest.skipUnless(sysconfig.is_python_build(),
'run_tests.py script is not installed')
def test_tools_script_run_tests(self):
# Tools/scripts/run_tests.py
script = os.path.join(ROOT_DIR, 'Tools', 'scripts', 'run_tests.py')
args = [script, *self.regrtest_args, *self.tests]
self.run_tests(args)
def run_batch(self, *args):
proc = self.run_command(args)
self.check_output(proc.stdout)
@unittest.skipUnless(sysconfig.is_python_build(),
'test.bat script is not installed')
@unittest.skipUnless(sys.platform == 'win32', 'Windows only')
def test_tools_buildbot_test(self):
# Tools\buildbot\test.bat
script = os.path.join(ROOT_DIR, 'Tools', 'buildbot', 'test.bat')
test_args = ['--testdir=%s' % self.tmptestdir]
if platform.architecture()[0] == '64bit':
test_args.append('-x64') # 64-bit build
if not Py_DEBUG:
test_args.append('+d') # Release build, use python.exe
self.run_batch(script, *test_args, *self.tests)
@unittest.skipUnless(sys.platform == 'win32', 'Windows only')
def test_pcbuild_rt(self):
# PCbuild\rt.bat
script = os.path.join(ROOT_DIR, r'PCbuild\rt.bat')
if not os.path.isfile(script):
self.skipTest(f'File "{script}" does not exist')
rt_args = ["-q"] # Quick, don't run tests twice
if platform.architecture()[0] == '64bit':
rt_args.append('-x64') # 64-bit build
if Py_DEBUG:
rt_args.append('-d') # Debug build, use python_d.exe
self.run_batch(script, *rt_args, *self.regrtest_args, *self.tests)
class ArgsTestCase(BaseTestCase):
"""
Test arguments of the Python test suite.
"""
def run_tests(self, *testargs, **kw):
cmdargs = ['-m', 'test', '--testdir=%s' % self.tmptestdir, *testargs]
return self.run_python(cmdargs, **kw)
def test_failing_test(self):
# test a failing test
code = textwrap.dedent("""
import unittest
class FailingTest(unittest.TestCase):
def test_failing(self):
self.fail("bug")
""")
test_ok = self.create_test('ok')
test_failing = self.create_test('failing', code=code)
tests = [test_ok, test_failing]
output = self.run_tests(*tests, exitcode=2)
self.check_executed_tests(output, tests, failed=test_failing)
def test_resources(self):
# test -u command line option
tests = {}
for resource in ('audio', 'network'):
code = textwrap.dedent("""
from test import support; support.requires(%r)
import unittest
class PassingTest(unittest.TestCase):
def test_pass(self):
pass
""" % resource)
tests[resource] = self.create_test(resource, code)
test_names = sorted(tests.values())
# -u all: 2 resources enabled
output = self.run_tests('-u', 'all', *test_names)
self.check_executed_tests(output, test_names)
# -u audio: 1 resource enabled
output = self.run_tests('-uaudio', *test_names)
self.check_executed_tests(output, test_names,
skipped=tests['network'])
# no option: 0 resources enabled
output = self.run_tests(*test_names)
self.check_executed_tests(output, test_names,
skipped=test_names)
def test_random(self):
# test -r and --randseed command line option
code = textwrap.dedent("""
import random
print("TESTRANDOM: %s" % random.randint(1, 1000))
""")
test = self.create_test('random', code)
# first run to get the output with the random seed
output = self.run_tests('-r', test)
randseed = self.parse_random_seed(output)
match = self.regex_search(r'TESTRANDOM: ([0-9]+)', output)
test_random = int(match.group(1))
# try to reproduce with the random seed
output = self.run_tests('-r', '--randseed=%s' % randseed, test)
randseed2 = self.parse_random_seed(output)
self.assertEqual(randseed2, randseed)
match = self.regex_search(r'TESTRANDOM: ([0-9]+)', output)
test_random2 = int(match.group(1))
self.assertEqual(test_random2, test_random)
def test_fromfile(self):
# test --fromfile
tests = [self.create_test() for index in range(5)]
# Write the list of files using a format similar to regrtest output:
# [1/2] test_1
# [2/2] test_2
filename = support.TESTFN
self.addCleanup(support.unlink, filename)
# test format '0:00:00 [2/7] test_opcodes -- test_grammar took 0 sec'
with open(filename, "w") as fp:
previous = None
for index, name in enumerate(tests, 1):
line = ("00:00:%02i [%s/%s] %s"
% (index, index, len(tests), name))
if previous:
line += " -- %s took 0 sec" % previous
print(line, file=fp)
previous = name
output = self.run_tests('--fromfile', filename)
self.check_executed_tests(output, tests)
# test format '[2/7] test_opcodes'
with open(filename, "w") as fp:
for index, name in enumerate(tests, 1):
print("[%s/%s] %s" % (index, len(tests), name), file=fp)
output = self.run_tests('--fromfile', filename)
self.check_executed_tests(output, tests)
# test format 'test_opcodes'
with open(filename, "w") as fp:
for name in tests:
print(name, file=fp)
output = self.run_tests('--fromfile', filename)
self.check_executed_tests(output, tests)
# test format 'Lib/test/test_opcodes.py'
with open(filename, "w") as fp:
for name in tests:
print('Lib/test/%s.py' % name, file=fp)
output = self.run_tests('--fromfile', filename)
self.check_executed_tests(output, tests)
def test_interrupted(self):
code = TEST_INTERRUPTED
test = self.create_test('sigint', code=code)
output = self.run_tests(test, exitcode=130)
self.check_executed_tests(output, test, omitted=test,
interrupted=True)
def test_slowest(self):
# test --slowest
tests = [self.create_test() for index in range(3)]
output = self.run_tests("--slowest", *tests)
self.check_executed_tests(output, tests)
regex = ('10 slowest tests:\n'
'(?:- %s: .*\n){%s}'
% (self.TESTNAME_REGEX, len(tests)))
self.check_line(output, regex)
def test_slow_interrupted(self):
# Issue #25373: test --slowest with an interrupted test
code = TEST_INTERRUPTED
test = self.create_test("sigint", code=code)
try:
import _thread
import threading
tests = (False, True)
except ImportError:
tests = (False,)
for multiprocessing in tests:
if multiprocessing:
args = ("--slowest", "-j2", test)
else:
args = ("--slowest", test)
output = self.run_tests(*args, exitcode=130)
self.check_executed_tests(output, test,
omitted=test, interrupted=True)
regex = ('10 slowest tests:\n')
self.check_line(output, regex)
def test_coverage(self):
# test --coverage
test = self.create_test('coverage')
output = self.run_tests("--coverage", test)
self.check_executed_tests(output, [test])
regex = (r'lines +cov% +module +\(path\)\n'
r'(?: *[0-9]+ *[0-9]{1,2}% *[^ ]+ +\([^)]+\)+)+')
self.check_line(output, regex)
def test_wait(self):
# test --wait
test = self.create_test('wait')
output = self.run_tests("--wait", test, input='key')
self.check_line(output, 'Press any key to continue')
def test_forever(self):
# test --forever
code = textwrap.dedent("""
import builtins
import unittest
class ForeverTester(unittest.TestCase):
def test_run(self):
# Store the state in the builtins module, because the test
# module is reload at each run
if 'RUN' in builtins.__dict__:
builtins.__dict__['RUN'] += 1
if builtins.__dict__['RUN'] >= 3:
self.fail("fail at the 3rd runs")
else:
builtins.__dict__['RUN'] = 1
""")
test = self.create_test('forever', code=code)
output = self.run_tests('--forever', test, exitcode=2)
self.check_executed_tests(output, [test]*3, failed=test)
def check_leak(self, code, what):
test = self.create_test('huntrleaks', code=code)
filename = 'reflog.txt'
self.addCleanup(support.unlink, filename)
output = self.run_tests('--huntrleaks', '3:3:', test,
exitcode=2,
stderr=subprocess.STDOUT)
self.check_executed_tests(output, [test], failed=test)
line = 'beginning 6 repetitions\n123456\n......\n'
self.check_line(output, re.escape(line))
line2 = '%s leaked [1, 1, 1] %s, sum=3\n' % (test, what)
self.assertIn(line2, output)
with open(filename) as fp:
reflog = fp.read()
self.assertIn(line2, reflog)
@unittest.skipUnless(Py_DEBUG, 'need a debug build')
def test_huntrleaks(self):
# test --huntrleaks
code = textwrap.dedent("""
import unittest
GLOBAL_LIST = []
class RefLeakTest(unittest.TestCase):
def test_leak(self):
GLOBAL_LIST.append(object())
""")
self.check_leak(code, 'references')
@unittest.skipUnless(Py_DEBUG, 'need a debug build')
def test_huntrleaks_fd_leak(self):
# test --huntrleaks for file descriptor leak
code = textwrap.dedent("""
import os
import unittest
class FDLeakTest(unittest.TestCase):
def test_leak(self):
fd = os.open(__file__, os.O_RDONLY)
# bug: never close the file descriptor
""")
self.check_leak(code, 'file descriptors')
def test_list_tests(self):
# test --list-tests
tests = [self.create_test() for i in range(5)]
output = self.run_tests('--list-tests', *tests)
self.assertEqual(output.rstrip().splitlines(),
tests)
def test_list_cases(self):
# test --list-cases
code = textwrap.dedent("""
import unittest
class Tests(unittest.TestCase):
def test_method1(self):
pass
def test_method2(self):
pass
""")
testname = self.create_test(code=code)
# Test --list-cases
all_methods = ['%s.Tests.test_method1' % testname,
'%s.Tests.test_method2' % testname]
output = self.run_tests('--list-cases', testname)
self.assertEqual(output.splitlines(), all_methods)
# Test --list-cases with --match
all_methods = ['%s.Tests.test_method1' % testname]
output = self.run_tests('--list-cases',
'-m', 'test_method1',
testname)
self.assertEqual(output.splitlines(), all_methods)
def test_crashed(self):
# Any code which causes a crash
code = 'import faulthandler; faulthandler._sigsegv()'
crash_test = self.create_test(name="crash", code=code)
ok_test = self.create_test(name="ok")
tests = [crash_test, ok_test]
output = self.run_tests("-j2", *tests, exitcode=2)
self.check_executed_tests(output, tests, failed=crash_test,
randomize=True)
def parse_methods(self, output):
regex = re.compile("^(test[^ ]+).*ok$", flags=re.MULTILINE)
return [match.group(1) for match in regex.finditer(output)]
def test_matchfile(self):
code = textwrap.dedent("""
import unittest
class Tests(unittest.TestCase):
def test_method1(self):
pass
def test_method2(self):
pass
def test_method3(self):
pass
def test_method4(self):
pass
""")
all_methods = ['test_method1', 'test_method2',
'test_method3', 'test_method4']
testname = self.create_test(code=code)
# by default, all methods should be run
output = self.run_tests("-v", testname)
methods = self.parse_methods(output)
self.assertEqual(methods, all_methods)
# only run a subset
filename = support.TESTFN
self.addCleanup(support.unlink, filename)
subset = [
# only match the method name
'test_method1',
# match the full identifier
'%s.Tests.test_method3' % testname]
with open(filename, "w") as fp:
for name in subset:
print(name, file=fp)
output = self.run_tests("-v", "--matchfile", filename, testname)
methods = self.parse_methods(output)
subset = ['test_method1', 'test_method3']
self.assertEqual(methods, subset)
def test_env_changed(self):
code = textwrap.dedent("""
import unittest
class Tests(unittest.TestCase):
def test_env_changed(self):
open("env_changed", "w").close()
""")
testname = self.create_test(code=code)
# don't fail by default
output = self.run_tests(testname)
self.check_executed_tests(output, [testname], env_changed=testname)
# fail with --fail-env-changed
output = self.run_tests("--fail-env-changed", testname, exitcode=3)
self.check_executed_tests(output, [testname], env_changed=testname,
fail_env_changed=True)
def test_rerun_fail(self):
code = textwrap.dedent("""
import unittest
class Tests(unittest.TestCase):
def test_bug(self):
# test always fail
self.fail("bug")
""")
testname = self.create_test(code=code)
output = self.run_tests("-w", testname, exitcode=2)
self.check_executed_tests(output, [testname],
failed=testname, rerun=testname)
def test_no_tests_ran(self):
code = textwrap.dedent("""
import unittest
class Tests(unittest.TestCase):
def test_bug(self):
pass
""")
testname = self.create_test(code=code)
output = self.run_tests(testname, "-m", "nosuchtest", exitcode=0)
self.check_executed_tests(output, [testname], no_test_ran=testname)
def test_no_tests_ran_multiple_tests_nonexistent(self):
code = textwrap.dedent("""
import unittest
class Tests(unittest.TestCase):
def test_bug(self):
pass
""")
testname = self.create_test(code=code)
testname2 = self.create_test(code=code)
output = self.run_tests(testname, testname2, "-m", "nosuchtest", exitcode=0)
self.check_executed_tests(output, [testname, testname2],
no_test_ran=[testname, testname2])
def test_no_test_ran_some_test_exist_some_not(self):
code = textwrap.dedent("""
import unittest
class Tests(unittest.TestCase):
def test_bug(self):
pass
""")
testname = self.create_test(code=code)
other_code = textwrap.dedent("""
import unittest
class Tests(unittest.TestCase):
def test_other_bug(self):
pass
""")
testname2 = self.create_test(code=other_code)
output = self.run_tests(testname, testname2, "-m", "nosuchtest",
"-m", "test_other_bug", exitcode=0)
self.check_executed_tests(output, [testname, testname2],
no_test_ran=[testname])
class TestUtils(unittest.TestCase):
def test_format_duration(self):
self.assertEqual(utils.format_duration(0),
'0 ms')
self.assertEqual(utils.format_duration(1e-9),
'1 ms')
self.assertEqual(utils.format_duration(10e-3),
'10 ms')
self.assertEqual(utils.format_duration(1.5),
'1 sec 500 ms')
self.assertEqual(utils.format_duration(1),
'1 sec')
self.assertEqual(utils.format_duration(2 * 60),
'2 min')
self.assertEqual(utils.format_duration(2 * 60 + 1),
'2 min 1 sec')
self.assertEqual(utils.format_duration(3 * 3600),
'3 hour')
self.assertEqual(utils.format_duration(3 * 3600 + 2 * 60 + 1),
'3 hour 2 min')
self.assertEqual(utils.format_duration(3 * 3600 + 1),
'3 hour 1 sec')
if __name__ == '__main__':
unittest.main()
| 40,414 | 1,091 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_wsgiref.py | import cosmo
from unittest import mock
from test import support
from test.test_httpservers import NoLogRequestHandler
from unittest import TestCase
from wsgiref.util import setup_testing_defaults
from wsgiref.headers import Headers
from wsgiref.handlers import BaseHandler, BaseCGIHandler, SimpleHandler
from wsgiref import util
from wsgiref.validate import validator
from wsgiref.simple_server import WSGIServer, WSGIRequestHandler
from wsgiref.simple_server import make_server
from http.client import HTTPConnection
from io import StringIO, BytesIO, BufferedReader
from socketserver import BaseServer
from platform import python_implementation
import os
import re
import signal
import sys
import unittest
class MockServer(WSGIServer):
"""Non-socket HTTP server"""
def __init__(self, server_address, RequestHandlerClass):
BaseServer.__init__(self, server_address, RequestHandlerClass)
self.server_bind()
def server_bind(self):
host, port = self.server_address
self.server_name = host
self.server_port = port
self.setup_environ()
class MockHandler(WSGIRequestHandler):
"""Non-socket HTTP handler"""
def setup(self):
self.connection = self.request
self.rfile, self.wfile = self.connection
def finish(self):
pass
def hello_app(environ,start_response):
start_response("200 OK", [
('Content-Type','text/plain'),
('Date','Mon, 05 Jun 2006 18:49:54 GMT')
])
return [b"Hello, world!"]
def header_app(environ, start_response):
start_response("200 OK", [
('Content-Type', 'text/plain'),
('Date', 'Mon, 05 Jun 2006 18:49:54 GMT')
])
return [';'.join([
environ['HTTP_X_TEST_HEADER'], environ['QUERY_STRING'],
environ['PATH_INFO']
]).encode('iso-8859-1')]
def run_amock(app=hello_app, data=b"GET / HTTP/1.0\n\n"):
server = make_server("", 80, app, MockServer, MockHandler)
inp = BufferedReader(BytesIO(data))
out = BytesIO()
olderr = sys.stderr
err = sys.stderr = StringIO()
try:
server.finish_request((inp, out), ("127.0.0.1",8888))
finally:
sys.stderr = olderr
return out.getvalue(), err.getvalue()
def compare_generic_iter(make_it,match):
"""Utility to compare a generic 2.1/2.2+ iterator with an iterable
If running under Python 2.2+, this tests the iterator using iter()/next(),
as well as __getitem__. 'make_it' must be a function returning a fresh
iterator to be tested (since this may test the iterator twice)."""
it = make_it()
n = 0
for item in match:
if not it[n]==item: raise AssertionError
n+=1
try:
it[n]
except IndexError:
pass
else:
raise AssertionError("Too many items from __getitem__",it)
try:
iter, StopIteration
except NameError:
pass
else:
# Only test iter mode under 2.2+
it = make_it()
if not iter(it) is it: raise AssertionError
for item in match:
if not next(it) == item: raise AssertionError
try:
next(it)
except StopIteration:
pass
else:
raise AssertionError("Too many items from .__next__()", it)
class IntegrationTests(TestCase):
def check_hello(self, out, has_length=True):
pyver = (python_implementation() + "/" +
sys.version.split()[0])
self.assertEqual(out,
("HTTP/1.0 200 OK\r\n"
"Server: WSGIServer/0.2 " + pyver +"\r\n"
"Content-Type: text/plain\r\n"
"Date: Mon, 05 Jun 2006 18:49:54 GMT\r\n" +
(has_length and "Content-Length: 13\r\n" or "") +
"\r\n"
"Hello, world!").encode("iso-8859-1")
)
def test_plain_hello(self):
out, err = run_amock()
self.check_hello(out)
def test_environ(self):
request = (
b"GET /p%61th/?query=test HTTP/1.0\n"
b"X-Test-Header: Python test \n"
b"X-Test-Header: Python test 2\n"
b"Content-Length: 0\n\n"
)
out, err = run_amock(header_app, request)
self.assertEqual(
out.splitlines()[-1],
b"Python test,Python test 2;query=test;/path/"
)
def test_request_length(self):
out, err = run_amock(data=b"GET " + (b"x" * 65537) + b" HTTP/1.0\n\n")
self.assertEqual(out.splitlines()[0],
b"HTTP/1.0 414 Request-URI Too Long")
def test_validated_hello(self):
out, err = run_amock(validator(hello_app))
# the middleware doesn't support len(), so content-length isn't there
self.check_hello(out, has_length=False)
def test_simple_validation_error(self):
def bad_app(environ,start_response):
start_response("200 OK", ('Content-Type','text/plain'))
return ["Hello, world!"]
out, err = run_amock(validator(bad_app))
self.assertTrue(out.endswith(
b"A server error occurred. Please contact the administrator."
))
self.assertEqual(
err.splitlines()[-2],
"AssertionError: Headers (('Content-Type', 'text/plain')) must"
" be of type list: <class 'tuple'>"
)
@unittest.skipIf(cosmo.MODE in ('tiny', 'rel'),
"no asserts in rel mode")
def test_status_validation_errors(self):
def create_bad_app(status):
def bad_app(environ, start_response):
start_response(status, [("Content-Type", "text/plain; charset=utf-8")])
return [b"Hello, world!"]
return bad_app
tests = [
('200', 'AssertionError: Status must be at least 4 characters'),
('20X OK', 'AssertionError: Status message must begin w/3-digit code'),
('200OK', 'AssertionError: Status message must have a space after code'),
]
for status, exc_message in tests:
with self.subTest(status=status):
out, err = run_amock(create_bad_app(status))
print("got", out)
self.assertTrue(out.endswith(
b"A server error occurred. Please contact the administrator."
))
self.assertEqual(err.splitlines()[-2], exc_message)
def test_wsgi_input(self):
def bad_app(e,s):
e["wsgi.input"].read()
s("200 OK", [("Content-Type", "text/plain; charset=utf-8")])
return [b"data"]
out, err = run_amock(validator(bad_app))
self.assertTrue(out.endswith(
b"A server error occurred. Please contact the administrator."
))
self.assertEqual(
err.splitlines()[-2], "AssertionError"
)
def test_bytes_validation(self):
def app(e, s):
s("200 OK", [
("Content-Type", "text/plain; charset=utf-8"),
("Date", "Wed, 24 Dec 2008 13:29:32 GMT"),
])
return [b"data"]
out, err = run_amock(validator(app))
self.assertTrue(err.endswith('"GET / HTTP/1.0" 200 4\n'))
ver = sys.version.split()[0].encode('ascii')
py = python_implementation().encode('ascii')
pyver = py + b"/" + ver
self.assertEqual(
b"HTTP/1.0 200 OK\r\n"
b"Server: WSGIServer/0.2 "+ pyver + b"\r\n"
b"Content-Type: text/plain; charset=utf-8\r\n"
b"Date: Wed, 24 Dec 2008 13:29:32 GMT\r\n"
b"\r\n"
b"data",
out)
def test_cp1252_url(self):
def app(e, s):
s("200 OK", [
("Content-Type", "text/plain"),
("Date", "Wed, 24 Dec 2008 13:29:32 GMT"),
])
# PEP3333 says environ variables are decoded as latin1.
# Encode as latin1 to get original bytes
return [e["PATH_INFO"].encode("latin1")]
out, err = run_amock(
validator(app), data=b"GET /\x80%80 HTTP/1.0")
self.assertEqual(
[
b"HTTP/1.0 200 OK",
mock.ANY,
b"Content-Type: text/plain",
b"Date: Wed, 24 Dec 2008 13:29:32 GMT",
b"",
b"/\x80\x80",
],
out.splitlines())
def test_interrupted_write(self):
# BaseHandler._write() and _flush() have to write all data, even if
# it takes multiple send() calls. Test this by interrupting a send()
# call with a Unix signal.
threading = support.import_module("threading")
pthread_kill = support.get_attribute(signal, "pthread_kill")
def app(environ, start_response):
start_response("200 OK", [])
return [b'\0' * support.SOCK_MAX_SIZE]
class WsgiHandler(NoLogRequestHandler, WSGIRequestHandler):
pass
server = make_server(support.HOST, 0, app, handler_class=WsgiHandler)
self.addCleanup(server.server_close)
interrupted = threading.Event()
def signal_handler(signum, frame):
interrupted.set()
original = signal.signal(signal.SIGUSR1, signal_handler)
self.addCleanup(signal.signal, signal.SIGUSR1, original)
received = None
main_thread = threading.get_ident()
def run_client():
http = HTTPConnection(*server.server_address)
http.request("GET", "/")
with http.getresponse() as response:
response.read(100)
# The main thread should now be blocking in a send() system
# call. But in theory, it could get interrupted by other
# signals, and then retried. So keep sending the signal in a
# loop, in case an earlier signal happens to be delivered at
# an inconvenient moment.
while True:
pthread_kill(main_thread, signal.SIGUSR1)
if interrupted.wait(timeout=float(1)):
break
nonlocal received
received = len(response.read())
http.close()
background = threading.Thread(target=run_client)
background.start()
server.handle_request()
background.join()
self.assertEqual(received, support.SOCK_MAX_SIZE - 100)
class UtilityTests(TestCase):
def checkShift(self,sn_in,pi_in,part,sn_out,pi_out):
env = {'SCRIPT_NAME':sn_in,'PATH_INFO':pi_in}
util.setup_testing_defaults(env)
self.assertEqual(util.shift_path_info(env),part)
self.assertEqual(env['PATH_INFO'],pi_out)
self.assertEqual(env['SCRIPT_NAME'],sn_out)
return env
def checkDefault(self, key, value, alt=None):
# Check defaulting when empty
env = {}
util.setup_testing_defaults(env)
if isinstance(value, StringIO):
self.assertIsInstance(env[key], StringIO)
elif isinstance(value,BytesIO):
self.assertIsInstance(env[key],BytesIO)
else:
self.assertEqual(env[key], value)
# Check existing value
env = {key:alt}
util.setup_testing_defaults(env)
self.assertIs(env[key], alt)
def checkCrossDefault(self,key,value,**kw):
util.setup_testing_defaults(kw)
self.assertEqual(kw[key],value)
def checkAppURI(self,uri,**kw):
util.setup_testing_defaults(kw)
self.assertEqual(util.application_uri(kw),uri)
def checkReqURI(self,uri,query=1,**kw):
util.setup_testing_defaults(kw)
self.assertEqual(util.request_uri(kw,query),uri)
def checkFW(self,text,size,match):
def make_it(text=text,size=size):
return util.FileWrapper(StringIO(text),size)
compare_generic_iter(make_it,match)
it = make_it()
self.assertFalse(it.filelike.closed)
for item in it:
pass
self.assertFalse(it.filelike.closed)
it.close()
self.assertTrue(it.filelike.closed)
def testSimpleShifts(self):
self.checkShift('','/', '', '/', '')
self.checkShift('','/x', 'x', '/x', '')
self.checkShift('/','', None, '/', '')
self.checkShift('/a','/x/y', 'x', '/a/x', '/y')
self.checkShift('/a','/x/', 'x', '/a/x', '/')
def testNormalizedShifts(self):
self.checkShift('/a/b', '/../y', '..', '/a', '/y')
self.checkShift('', '/../y', '..', '', '/y')
self.checkShift('/a/b', '//y', 'y', '/a/b/y', '')
self.checkShift('/a/b', '//y/', 'y', '/a/b/y', '/')
self.checkShift('/a/b', '/./y', 'y', '/a/b/y', '')
self.checkShift('/a/b', '/./y/', 'y', '/a/b/y', '/')
self.checkShift('/a/b', '///./..//y/.//', '..', '/a', '/y/')
self.checkShift('/a/b', '///', '', '/a/b/', '')
self.checkShift('/a/b', '/.//', '', '/a/b/', '')
self.checkShift('/a/b', '/x//', 'x', '/a/b/x', '/')
self.checkShift('/a/b', '/.', None, '/a/b', '')
def testDefaults(self):
for key, value in [
('SERVER_NAME','127.0.0.1'),
('SERVER_PORT', '80'),
('SERVER_PROTOCOL','HTTP/1.0'),
('HTTP_HOST','127.0.0.1'),
('REQUEST_METHOD','GET'),
('SCRIPT_NAME',''),
('PATH_INFO','/'),
('wsgi.version', (1,0)),
('wsgi.run_once', 0),
('wsgi.multithread', 0),
('wsgi.multiprocess', 0),
('wsgi.input', BytesIO()),
('wsgi.errors', StringIO()),
('wsgi.url_scheme','http'),
]:
self.checkDefault(key,value)
def testCrossDefaults(self):
self.checkCrossDefault('HTTP_HOST',"foo.bar",SERVER_NAME="foo.bar")
self.checkCrossDefault('wsgi.url_scheme',"https",HTTPS="on")
self.checkCrossDefault('wsgi.url_scheme',"https",HTTPS="1")
self.checkCrossDefault('wsgi.url_scheme',"https",HTTPS="yes")
self.checkCrossDefault('wsgi.url_scheme',"http",HTTPS="foo")
self.checkCrossDefault('SERVER_PORT',"80",HTTPS="foo")
self.checkCrossDefault('SERVER_PORT',"443",HTTPS="on")
def testGuessScheme(self):
self.assertEqual(util.guess_scheme({}), "http")
self.assertEqual(util.guess_scheme({'HTTPS':"foo"}), "http")
self.assertEqual(util.guess_scheme({'HTTPS':"on"}), "https")
self.assertEqual(util.guess_scheme({'HTTPS':"yes"}), "https")
self.assertEqual(util.guess_scheme({'HTTPS':"1"}), "https")
def testAppURIs(self):
self.checkAppURI("http://127.0.0.1/")
self.checkAppURI("http://127.0.0.1/spam", SCRIPT_NAME="/spam")
self.checkAppURI("http://127.0.0.1/sp%E4m", SCRIPT_NAME="/sp\xe4m")
self.checkAppURI("http://spam.example.com:2071/",
HTTP_HOST="spam.example.com:2071", SERVER_PORT="2071")
self.checkAppURI("http://spam.example.com/",
SERVER_NAME="spam.example.com")
self.checkAppURI("http://127.0.0.1/",
HTTP_HOST="127.0.0.1", SERVER_NAME="spam.example.com")
self.checkAppURI("https://127.0.0.1/", HTTPS="on")
self.checkAppURI("http://127.0.0.1:8000/", SERVER_PORT="8000",
HTTP_HOST=None)
def testReqURIs(self):
self.checkReqURI("http://127.0.0.1/")
self.checkReqURI("http://127.0.0.1/spam", SCRIPT_NAME="/spam")
self.checkReqURI("http://127.0.0.1/sp%E4m", SCRIPT_NAME="/sp\xe4m")
self.checkReqURI("http://127.0.0.1/spammity/spam",
SCRIPT_NAME="/spammity", PATH_INFO="/spam")
self.checkReqURI("http://127.0.0.1/spammity/sp%E4m",
SCRIPT_NAME="/spammity", PATH_INFO="/sp\xe4m")
self.checkReqURI("http://127.0.0.1/spammity/spam;ham",
SCRIPT_NAME="/spammity", PATH_INFO="/spam;ham")
self.checkReqURI("http://127.0.0.1/spammity/spam;cookie=1234,5678",
SCRIPT_NAME="/spammity", PATH_INFO="/spam;cookie=1234,5678")
self.checkReqURI("http://127.0.0.1/spammity/spam?say=ni",
SCRIPT_NAME="/spammity", PATH_INFO="/spam",QUERY_STRING="say=ni")
self.checkReqURI("http://127.0.0.1/spammity/spam?s%E4y=ni",
SCRIPT_NAME="/spammity", PATH_INFO="/spam",QUERY_STRING="s%E4y=ni")
self.checkReqURI("http://127.0.0.1/spammity/spam", 0,
SCRIPT_NAME="/spammity", PATH_INFO="/spam",QUERY_STRING="say=ni")
def testFileWrapper(self):
self.checkFW("xyz"*50, 120, ["xyz"*40,"xyz"*10])
def testHopByHop(self):
for hop in (
"Connection Keep-Alive Proxy-Authenticate Proxy-Authorization "
"TE Trailers Transfer-Encoding Upgrade"
).split():
for alt in hop, hop.title(), hop.upper(), hop.lower():
self.assertTrue(util.is_hop_by_hop(alt))
# Not comprehensive, just a few random header names
for hop in (
"Accept Cache-Control Date Pragma Trailer Via Warning"
).split():
for alt in hop, hop.title(), hop.upper(), hop.lower():
self.assertFalse(util.is_hop_by_hop(alt))
class HeaderTests(TestCase):
def testMappingInterface(self):
test = [('x','y')]
self.assertEqual(len(Headers()), 0)
self.assertEqual(len(Headers([])),0)
self.assertEqual(len(Headers(test[:])),1)
self.assertEqual(Headers(test[:]).keys(), ['x'])
self.assertEqual(Headers(test[:]).values(), ['y'])
self.assertEqual(Headers(test[:]).items(), test)
self.assertIsNot(Headers(test).items(), test) # must be copy!
h = Headers()
del h['foo'] # should not raise an error
h['Foo'] = 'bar'
for m in h.__contains__, h.get, h.get_all, h.__getitem__:
self.assertTrue(m('foo'))
self.assertTrue(m('Foo'))
self.assertTrue(m('FOO'))
self.assertFalse(m('bar'))
self.assertEqual(h['foo'],'bar')
h['foo'] = 'baz'
self.assertEqual(h['FOO'],'baz')
self.assertEqual(h.get_all('foo'),['baz'])
self.assertEqual(h.get("foo","whee"), "baz")
self.assertEqual(h.get("zoo","whee"), "whee")
self.assertEqual(h.setdefault("foo","whee"), "baz")
self.assertEqual(h.setdefault("zoo","whee"), "whee")
self.assertEqual(h["foo"],"baz")
self.assertEqual(h["zoo"],"whee")
def testRequireList(self):
self.assertRaises(TypeError, Headers, "foo")
def testExtras(self):
h = Headers()
self.assertEqual(str(h),'\r\n')
h.add_header('foo','bar',baz="spam")
self.assertEqual(h['foo'], 'bar; baz="spam"')
self.assertEqual(str(h),'foo: bar; baz="spam"\r\n\r\n')
h.add_header('Foo','bar',cheese=None)
self.assertEqual(h.get_all('foo'),
['bar; baz="spam"', 'bar; cheese'])
self.assertEqual(str(h),
'foo: bar; baz="spam"\r\n'
'Foo: bar; cheese\r\n'
'\r\n'
)
class ErrorHandler(BaseCGIHandler):
"""Simple handler subclass for testing BaseHandler"""
# BaseHandler records the OS environment at import time, but envvars
# might have been changed later by other tests, which trips up
# HandlerTests.testEnviron().
os_environ = dict(os.environ.items())
def __init__(self,**kw):
setup_testing_defaults(kw)
BaseCGIHandler.__init__(
self, BytesIO(), BytesIO(), StringIO(), kw,
multithread=True, multiprocess=True
)
class TestHandler(ErrorHandler):
"""Simple handler subclass for testing BaseHandler, w/error passthru"""
def handle_error(self):
raise # for testing, we want to see what's happening
class HandlerTests(TestCase):
def checkEnvironAttrs(self, handler):
env = handler.environ
for attr in [
'version','multithread','multiprocess','run_once','file_wrapper'
]:
if attr=='file_wrapper' and handler.wsgi_file_wrapper is None:
continue
self.assertEqual(getattr(handler,'wsgi_'+attr),env['wsgi.'+attr])
def checkOSEnviron(self,handler):
empty = {}; setup_testing_defaults(empty)
env = handler.environ
from os import environ
for k,v in environ.items():
if k not in empty:
self.assertEqual(env[k],v)
for k,v in empty.items():
self.assertIn(k, env)
def testEnviron(self):
h = TestHandler(X="Y")
h.setup_environ()
self.checkEnvironAttrs(h)
self.checkOSEnviron(h)
self.assertEqual(h.environ["X"],"Y")
def testCGIEnviron(self):
h = BaseCGIHandler(None,None,None,{})
h.setup_environ()
for key in 'wsgi.url_scheme', 'wsgi.input', 'wsgi.errors':
self.assertIn(key, h.environ)
def testScheme(self):
h=TestHandler(HTTPS="on"); h.setup_environ()
self.assertEqual(h.environ['wsgi.url_scheme'],'https')
h=TestHandler(); h.setup_environ()
self.assertEqual(h.environ['wsgi.url_scheme'],'http')
def testAbstractMethods(self):
h = BaseHandler()
for name in [
'_flush','get_stdin','get_stderr','add_cgi_vars'
]:
self.assertRaises(NotImplementedError, getattr(h,name))
self.assertRaises(NotImplementedError, h._write, "test")
def testContentLength(self):
# Demo one reason iteration is better than write()... ;)
def trivial_app1(e,s):
s('200 OK',[])
return [e['wsgi.url_scheme'].encode('iso-8859-1')]
def trivial_app2(e,s):
s('200 OK',[])(e['wsgi.url_scheme'].encode('iso-8859-1'))
return []
def trivial_app3(e,s):
s('200 OK',[])
return ['\u0442\u0435\u0441\u0442'.encode("utf-8")]
def trivial_app4(e,s):
# Simulate a response to a HEAD request
s('200 OK',[('Content-Length', '12345')])
return []
h = TestHandler()
h.run(trivial_app1)
self.assertEqual(h.stdout.getvalue(),
("Status: 200 OK\r\n"
"Content-Length: 4\r\n"
"\r\n"
"http").encode("iso-8859-1"))
h = TestHandler()
h.run(trivial_app2)
self.assertEqual(h.stdout.getvalue(),
("Status: 200 OK\r\n"
"\r\n"
"http").encode("iso-8859-1"))
h = TestHandler()
h.run(trivial_app3)
self.assertEqual(h.stdout.getvalue(),
b'Status: 200 OK\r\n'
b'Content-Length: 8\r\n'
b'\r\n'
b'\xd1\x82\xd0\xb5\xd1\x81\xd1\x82')
h = TestHandler()
h.run(trivial_app4)
self.assertEqual(h.stdout.getvalue(),
b'Status: 200 OK\r\n'
b'Content-Length: 12345\r\n'
b'\r\n')
def testBasicErrorOutput(self):
def non_error_app(e,s):
s('200 OK',[])
return []
def error_app(e,s):
raise AssertionError("This should be caught by handler")
h = ErrorHandler()
h.run(non_error_app)
self.assertEqual(h.stdout.getvalue(),
("Status: 200 OK\r\n"
"Content-Length: 0\r\n"
"\r\n").encode("iso-8859-1"))
self.assertEqual(h.stderr.getvalue(),"")
h = ErrorHandler()
h.run(error_app)
self.assertEqual(h.stdout.getvalue(),
("Status: %s\r\n"
"Content-Type: text/plain\r\n"
"Content-Length: %d\r\n"
"\r\n" % (h.error_status,len(h.error_body))).encode('iso-8859-1')
+ h.error_body)
self.assertIn("AssertionError", h.stderr.getvalue())
def testErrorAfterOutput(self):
MSG = b"Some output has been sent"
def error_app(e,s):
s("200 OK",[])(MSG)
raise AssertionError("This should be caught by handler")
h = ErrorHandler()
h.run(error_app)
self.assertEqual(h.stdout.getvalue(),
("Status: 200 OK\r\n"
"\r\n".encode("iso-8859-1")+MSG))
self.assertIn("AssertionError", h.stderr.getvalue())
def testHeaderFormats(self):
def non_error_app(e,s):
s('200 OK',[])
return []
stdpat = (
r"HTTP/%s 200 OK\r\n"
r"Date: \w{3}, [ 0123]\d \w{3} \d{4} \d\d:\d\d:\d\d GMT\r\n"
r"%s" r"Content-Length: 0\r\n" r"\r\n"
)
shortpat = (
"Status: 200 OK\r\n" "Content-Length: 0\r\n" "\r\n"
).encode("iso-8859-1")
for ssw in "FooBar/1.0", None:
sw = ssw and "Server: %s\r\n" % ssw or ""
for version in "1.0", "1.1":
for proto in "HTTP/0.9", "HTTP/1.0", "HTTP/1.1":
h = TestHandler(SERVER_PROTOCOL=proto)
h.origin_server = False
h.http_version = version
h.server_software = ssw
h.run(non_error_app)
self.assertEqual(shortpat,h.stdout.getvalue())
h = TestHandler(SERVER_PROTOCOL=proto)
h.origin_server = True
h.http_version = version
h.server_software = ssw
h.run(non_error_app)
if proto=="HTTP/0.9":
self.assertEqual(h.stdout.getvalue(),b"")
else:
self.assertTrue(
re.match((stdpat%(version,sw)).encode("iso-8859-1"),
h.stdout.getvalue()),
((stdpat%(version,sw)).encode("iso-8859-1"),
h.stdout.getvalue())
)
def testBytesData(self):
def app(e, s):
s("200 OK", [
("Content-Type", "text/plain; charset=utf-8"),
])
return [b"data"]
h = TestHandler()
h.run(app)
self.assertEqual(b"Status: 200 OK\r\n"
b"Content-Type: text/plain; charset=utf-8\r\n"
b"Content-Length: 4\r\n"
b"\r\n"
b"data",
h.stdout.getvalue())
def testCloseOnError(self):
side_effects = {'close_called': False}
MSG = b"Some output has been sent"
def error_app(e,s):
s("200 OK",[])(MSG)
class CrashyIterable(object):
def __iter__(self):
while True:
yield b'blah'
raise AssertionError("This should be caught by handler")
def close(self):
side_effects['close_called'] = True
return CrashyIterable()
h = ErrorHandler()
h.run(error_app)
self.assertEqual(side_effects['close_called'], True)
def testPartialWrite(self):
written = bytearray()
class PartialWriter:
def write(self, b):
partial = b[:7]
written.extend(partial)
return len(partial)
def flush(self):
pass
environ = {"SERVER_PROTOCOL": "HTTP/1.0"}
h = SimpleHandler(BytesIO(), PartialWriter(), sys.stderr, environ)
msg = "should not do partial writes"
with self.assertWarnsRegex(DeprecationWarning, msg):
h.run(hello_app)
self.assertEqual(b"HTTP/1.0 200 OK\r\n"
b"Content-Type: text/plain\r\n"
b"Date: Mon, 05 Jun 2006 18:49:54 GMT\r\n"
b"Content-Length: 13\r\n"
b"\r\n"
b"Hello, world!",
written)
if __name__ == "__main__":
unittest.main()
| 27,879 | 788 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_ast.py | import ast
import dis
import os
import sys
import unittest
import weakref
from test import support
def to_tuple(t):
if t is None or isinstance(t, (str, int, complex)):
return t
elif isinstance(t, list):
return [to_tuple(e) for e in t]
result = [t.__class__.__name__]
if hasattr(t, 'lineno') and hasattr(t, 'col_offset'):
result.append((t.lineno, t.col_offset))
if t._fields is None:
return tuple(result)
for f in t._fields:
result.append(to_tuple(getattr(t, f)))
return tuple(result)
# These tests are compiled through "exec"
# There should be at least one test per statement
exec_tests = [
# None
"None",
# FunctionDef
"def f(): pass",
# FunctionDef with arg
"def f(a): pass",
# FunctionDef with arg and default value
"def f(a=0): pass",
# FunctionDef with varargs
"def f(*args): pass",
# FunctionDef with kwargs
"def f(**kwargs): pass",
# FunctionDef with all kind of args
"def f(a, b=1, c=None, d=[], e={}, *args, f=42, **kwargs): pass",
# ClassDef
"class C:pass",
# ClassDef, new style class
"class C(object): pass",
# Return
"def f():return 1",
# Delete
"del v",
# Assign
"v = 1",
# AugAssign
"v += 1",
# For
"for v in v:pass",
# While
"while v:pass",
# If
"if v:pass",
# With
"with x as y: pass",
"with x as y, z as q: pass",
# Raise
"raise Exception('string')",
# TryExcept
"try:\n pass\nexcept Exception:\n pass",
# TryFinally
"try:\n pass\nfinally:\n pass",
# Assert
"assert v",
# Import
"import sys",
# ImportFrom
"from sys import v",
# Global
"global v",
# Expr
"1",
# Pass,
"pass",
# Break
"for v in v:break",
# Continue
"for v in v:continue",
# for statements with naked tuples (see http://bugs.python.org/issue6704)
"for a,b in c: pass",
"[(a,b) for a,b in c]",
"((a,b) for a,b in c)",
"((a,b) for (a,b) in c)",
# Multiline generator expression (test for .lineno & .col_offset)
"""(
(
Aa
,
Bb
)
for
Aa
,
Bb in Cc
)""",
# dictcomp
"{a : b for w in x for m in p if g}",
# dictcomp with naked tuple
"{a : b for v,w in x}",
# setcomp
"{r for l in x if g}",
# setcomp with naked tuple
"{r for l,m in x}",
# AsyncFunctionDef
"async def f():\n await something()",
# AsyncFor
"async def f():\n async for e in i: 1\n else: 2",
# AsyncWith
"async def f():\n async with a as b: 1",
# PEP 448: Additional Unpacking Generalizations
"{**{1:2}, 2:3}",
"{*{1, 2}, 3}",
# Asynchronous comprehensions
"async def f():\n [i async for b in c]",
]
# These are compiled through "single"
# because of overlap with "eval", it just tests what
# can't be tested with "eval"
single_tests = [
"1+2"
]
# These are compiled through "eval"
# It should test all expressions
eval_tests = [
# None
"None",
# BoolOp
"a and b",
# BinOp
"a + b",
# UnaryOp
"not v",
# Lambda
"lambda:None",
# Dict
"{ 1:2 }",
# Empty dict
"{}",
# Set
"{None,}",
# Multiline dict (test for .lineno & .col_offset)
"""{
1
:
2
}""",
# ListComp
"[a for b in c if d]",
# GeneratorExp
"(a for b in c if d)",
# Yield - yield expressions can't work outside a function
#
# Compare
"1 < 2 < 3",
# Call
"f(1,2,c=3,*d,**e)",
# Num
"10",
# Str
"'string'",
# Attribute
"a.b",
# Subscript
"a[b:c]",
# Name
"v",
# List
"[1,2,3]",
# Empty list
"[]",
# Tuple
"1,2,3",
# Tuple
"(1,2,3)",
# Empty tuple
"()",
# Combination
"a.b.c.d(a.b[1:2])",
]
# TODO: expr_context, slice, boolop, operator, unaryop, cmpop, comprehension
# excepthandler, arguments, keywords, alias
class AST_Tests(unittest.TestCase):
def _assertTrueorder(self, ast_node, parent_pos):
if not isinstance(ast_node, ast.AST) or ast_node._fields is None:
return
if isinstance(ast_node, (ast.expr, ast.stmt, ast.excepthandler)):
node_pos = (ast_node.lineno, ast_node.col_offset)
self.assertTrue(node_pos >= parent_pos)
parent_pos = (ast_node.lineno, ast_node.col_offset)
for name in ast_node._fields:
value = getattr(ast_node, name)
if isinstance(value, list):
for child in value:
self._assertTrueorder(child, parent_pos)
elif value is not None:
self._assertTrueorder(value, parent_pos)
def test_AST_objects(self):
x = ast.AST()
self.assertEqual(x._fields, ())
x.foobar = 42
self.assertEqual(x.foobar, 42)
self.assertEqual(x.__dict__["foobar"], 42)
with self.assertRaises(AttributeError):
x.vararg
with self.assertRaises(TypeError):
# "_ast.AST constructor takes 0 positional arguments"
ast.AST(2)
def test_AST_garbage_collection(self):
class X:
pass
a = ast.AST()
a.x = X()
a.x.a = a
ref = weakref.ref(a.x)
del a
support.gc_collect()
self.assertIsNone(ref())
def test_snippets(self):
for input, output, kind in ((exec_tests, exec_results, "exec"),
(single_tests, single_results, "single"),
(eval_tests, eval_results, "eval")):
for i, o in zip(input, output):
with self.subTest(action="parsing", input=i):
ast_tree = compile(i, "?", kind, ast.PyCF_ONLY_AST)
self.assertEqual(to_tuple(ast_tree), o)
self._assertTrueorder(ast_tree, (0, 0))
with self.subTest(action="compiling", input=i, kind=kind):
compile(ast_tree, "?", kind)
def test_slice(self):
slc = ast.parse("x[::]").body[0].value.slice
self.assertIsNone(slc.upper)
self.assertIsNone(slc.lower)
self.assertIsNone(slc.step)
def test_from_import(self):
im = ast.parse("from . import y").body[0]
self.assertIsNone(im.module)
def test_non_interned_future_from_ast(self):
mod = ast.parse("from __future__ import division")
self.assertIsInstance(mod.body[0], ast.ImportFrom)
mod.body[0].module = " __future__ ".strip()
compile(mod, "<test>", "exec")
def test_base_classes(self):
self.assertTrue(issubclass(ast.For, ast.stmt))
self.assertTrue(issubclass(ast.Name, ast.expr))
self.assertTrue(issubclass(ast.stmt, ast.AST))
self.assertTrue(issubclass(ast.expr, ast.AST))
self.assertTrue(issubclass(ast.comprehension, ast.AST))
self.assertTrue(issubclass(ast.Gt, ast.AST))
def test_field_attr_existence(self):
for name, item in ast.__dict__.items():
if isinstance(item, type) and name != 'AST' and name[0].isupper():
x = item()
if isinstance(x, ast.AST):
self.assertEqual(type(x._fields), tuple)
def test_arguments(self):
x = ast.arguments()
self.assertEqual(x._fields, ('args', 'vararg', 'kwonlyargs',
'kw_defaults', 'kwarg', 'defaults'))
with self.assertRaises(AttributeError):
x.vararg
x = ast.arguments(*range(1, 7))
self.assertEqual(x.vararg, 2)
def test_field_attr_writable(self):
x = ast.Num()
# We can assign to _fields
x._fields = 666
self.assertEqual(x._fields, 666)
def test_classattrs(self):
x = ast.Num()
self.assertEqual(x._fields, ('n',))
with self.assertRaises(AttributeError):
x.n
x = ast.Num(42)
self.assertEqual(x.n, 42)
with self.assertRaises(AttributeError):
x.lineno
with self.assertRaises(AttributeError):
x.foobar
x = ast.Num(lineno=2)
self.assertEqual(x.lineno, 2)
x = ast.Num(42, lineno=0)
self.assertEqual(x.lineno, 0)
self.assertEqual(x._fields, ('n',))
self.assertEqual(x.n, 42)
self.assertRaises(TypeError, ast.Num, 1, 2)
self.assertRaises(TypeError, ast.Num, 1, 2, lineno=0)
def test_module(self):
body = [ast.Num(42)]
x = ast.Module(body)
self.assertEqual(x.body, body)
def test_nodeclasses(self):
# Zero arguments constructor explicitly allowed
x = ast.BinOp()
self.assertEqual(x._fields, ('left', 'op', 'right'))
# Random attribute allowed too
x.foobarbaz = 5
self.assertEqual(x.foobarbaz, 5)
n1 = ast.Num(1)
n3 = ast.Num(3)
addop = ast.Add()
x = ast.BinOp(n1, addop, n3)
self.assertEqual(x.left, n1)
self.assertEqual(x.op, addop)
self.assertEqual(x.right, n3)
x = ast.BinOp(1, 2, 3)
self.assertEqual(x.left, 1)
self.assertEqual(x.op, 2)
self.assertEqual(x.right, 3)
x = ast.BinOp(1, 2, 3, lineno=0)
self.assertEqual(x.left, 1)
self.assertEqual(x.op, 2)
self.assertEqual(x.right, 3)
self.assertEqual(x.lineno, 0)
# node raises exception when not given enough arguments
self.assertRaises(TypeError, ast.BinOp, 1, 2)
# node raises exception when given too many arguments
self.assertRaises(TypeError, ast.BinOp, 1, 2, 3, 4)
# node raises exception when not given enough arguments
self.assertRaises(TypeError, ast.BinOp, 1, 2, lineno=0)
# node raises exception when given too many arguments
self.assertRaises(TypeError, ast.BinOp, 1, 2, 3, 4, lineno=0)
# can set attributes through kwargs too
x = ast.BinOp(left=1, op=2, right=3, lineno=0)
self.assertEqual(x.left, 1)
self.assertEqual(x.op, 2)
self.assertEqual(x.right, 3)
self.assertEqual(x.lineno, 0)
# Random kwargs also allowed
x = ast.BinOp(1, 2, 3, foobarbaz=42)
self.assertEqual(x.foobarbaz, 42)
def test_no_fields(self):
# this used to fail because Sub._fields was None
x = ast.Sub()
self.assertEqual(x._fields, ())
def test_pickling(self):
import pickle
mods = [pickle]
try:
import cPickle
mods.append(cPickle)
except ImportError:
pass
protocols = [0, 1, 2]
for mod in mods:
for protocol in protocols:
for ast in (compile(i, "?", "exec", 0x400) for i in exec_tests):
ast2 = mod.loads(mod.dumps(ast, protocol))
self.assertEqual(to_tuple(ast2), to_tuple(ast))
def test_invalid_sum(self):
pos = dict(lineno=2, col_offset=3)
m = ast.Module([ast.Expr(ast.expr(**pos), **pos)])
with self.assertRaises(TypeError) as cm:
compile(m, "<test>", "exec")
self.assertIn("but got <_ast.expr", str(cm.exception))
def test_invalid_identitifer(self):
m = ast.Module([ast.Expr(ast.Name(42, ast.Load()))])
ast.fix_missing_locations(m)
with self.assertRaises(TypeError) as cm:
compile(m, "<test>", "exec")
self.assertIn("identifier must be of type str", str(cm.exception))
def test_invalid_string(self):
m = ast.Module([ast.Expr(ast.Str(42))])
ast.fix_missing_locations(m)
with self.assertRaises(TypeError) as cm:
compile(m, "<test>", "exec")
self.assertIn("string must be of type str", str(cm.exception))
def test_empty_yield_from(self):
# Issue 16546: yield from value is not optional.
empty_yield_from = ast.parse("def f():\n yield from g()")
empty_yield_from.body[0].body[0].value.value = None
with self.assertRaises(ValueError) as cm:
compile(empty_yield_from, "<test>", "exec")
self.assertIn("field value is required", str(cm.exception))
@support.cpython_only
def test_issue31592(self):
# There shouldn't be an assertion failure in case of a bad
# unicodedata.normalize().
import unicodedata
def bad_normalize(*args):
return None
with support.swap_attr(unicodedata, 'normalize', bad_normalize):
self.assertRaises(TypeError, ast.parse, '\u03D5')
class ASTHelpers_Test(unittest.TestCase):
def test_parse(self):
a = ast.parse('foo(1 + 1)')
b = compile('foo(1 + 1)', '<unknown>', 'exec', ast.PyCF_ONLY_AST)
self.assertEqual(ast.dump(a), ast.dump(b))
def test_parse_in_error(self):
try:
1/0
except Exception:
with self.assertRaises(SyntaxError) as e:
ast.literal_eval(r"'\U'")
self.assertIsNotNone(e.exception.__context__)
def test_dump(self):
node = ast.parse('spam(eggs, "and cheese")')
self.assertEqual(ast.dump(node),
"Module(body=[Expr(value=Call(func=Name(id='spam', ctx=Load()), "
"args=[Name(id='eggs', ctx=Load()), Str(s='and cheese')], "
"keywords=[]))])"
)
self.assertEqual(ast.dump(node, annotate_fields=False),
"Module([Expr(Call(Name('spam', Load()), [Name('eggs', Load()), "
"Str('and cheese')], []))])"
)
self.assertEqual(ast.dump(node, include_attributes=True),
"Module(body=[Expr(value=Call(func=Name(id='spam', ctx=Load(), "
"lineno=1, col_offset=0), args=[Name(id='eggs', ctx=Load(), "
"lineno=1, col_offset=5), Str(s='and cheese', lineno=1, "
"col_offset=11)], keywords=[], "
"lineno=1, col_offset=0), lineno=1, col_offset=0)])"
)
def test_copy_location(self):
src = ast.parse('1 + 1', mode='eval')
src.body.right = ast.copy_location(ast.Num(2), src.body.right)
self.assertEqual(ast.dump(src, include_attributes=True),
'Expression(body=BinOp(left=Num(n=1, lineno=1, col_offset=0), '
'op=Add(), right=Num(n=2, lineno=1, col_offset=4), lineno=1, '
'col_offset=0))'
)
def test_fix_missing_locations(self):
src = ast.parse('write("spam")')
src.body.append(ast.Expr(ast.Call(ast.Name('spam', ast.Load()),
[ast.Str('eggs')], [])))
self.assertEqual(src, ast.fix_missing_locations(src))
self.assertEqual(ast.dump(src, include_attributes=True),
"Module(body=[Expr(value=Call(func=Name(id='write', ctx=Load(), "
"lineno=1, col_offset=0), args=[Str(s='spam', lineno=1, "
"col_offset=6)], keywords=[], "
"lineno=1, col_offset=0), lineno=1, col_offset=0), "
"Expr(value=Call(func=Name(id='spam', ctx=Load(), lineno=1, "
"col_offset=0), args=[Str(s='eggs', lineno=1, col_offset=0)], "
"keywords=[], lineno=1, "
"col_offset=0), lineno=1, col_offset=0)])"
)
def test_increment_lineno(self):
src = ast.parse('1 + 1', mode='eval')
self.assertEqual(ast.increment_lineno(src, n=3), src)
self.assertEqual(ast.dump(src, include_attributes=True),
'Expression(body=BinOp(left=Num(n=1, lineno=4, col_offset=0), '
'op=Add(), right=Num(n=1, lineno=4, col_offset=4), lineno=4, '
'col_offset=0))'
)
# issue10869: do not increment lineno of root twice
src = ast.parse('1 + 1', mode='eval')
self.assertEqual(ast.increment_lineno(src.body, n=3), src.body)
self.assertEqual(ast.dump(src, include_attributes=True),
'Expression(body=BinOp(left=Num(n=1, lineno=4, col_offset=0), '
'op=Add(), right=Num(n=1, lineno=4, col_offset=4), lineno=4, '
'col_offset=0))'
)
def test_iter_fields(self):
node = ast.parse('foo()', mode='eval')
d = dict(ast.iter_fields(node.body))
self.assertEqual(d.pop('func').id, 'foo')
self.assertEqual(d, {'keywords': [], 'args': []})
def test_iter_child_nodes(self):
node = ast.parse("spam(23, 42, eggs='leek')", mode='eval')
self.assertEqual(len(list(ast.iter_child_nodes(node.body))), 4)
iterator = ast.iter_child_nodes(node.body)
self.assertEqual(next(iterator).id, 'spam')
self.assertEqual(next(iterator).n, 23)
self.assertEqual(next(iterator).n, 42)
self.assertEqual(ast.dump(next(iterator)),
"keyword(arg='eggs', value=Str(s='leek'))"
)
def test_get_docstring(self):
node = ast.parse('def foo():\n """line one\n line two"""')
self.assertEqual(ast.get_docstring(node.body[0]),
'line one\nline two')
node = ast.parse('async def foo():\n """spam\n ham"""')
self.assertEqual(ast.get_docstring(node.body[0]), 'spam\nham')
def test_literal_eval(self):
self.assertEqual(ast.literal_eval('[1, 2, 3]'), [1, 2, 3])
self.assertEqual(ast.literal_eval('{"foo": 42}'), {"foo": 42})
self.assertEqual(ast.literal_eval('(True, False, None)'), (True, False, None))
self.assertEqual(ast.literal_eval('{1, 2, 3}'), {1, 2, 3})
self.assertEqual(ast.literal_eval('b"hi"'), b"hi")
self.assertRaises(ValueError, ast.literal_eval, 'foo()')
self.assertEqual(ast.literal_eval('-6'), -6)
self.assertEqual(ast.literal_eval('-6j+3'), 3-6j)
self.assertEqual(ast.literal_eval('3.25'), 3.25)
def test_literal_eval_issue4907(self):
self.assertEqual(ast.literal_eval('2j'), 2j)
self.assertEqual(ast.literal_eval('10 + 2j'), 10 + 2j)
self.assertEqual(ast.literal_eval('1.5 - 2j'), 1.5 - 2j)
def test_bad_integer(self):
# issue13436: Bad error message with invalid numeric values
body = [ast.ImportFrom(module='time',
names=[ast.alias(name='sleep')],
level=None,
lineno=None, col_offset=None)]
mod = ast.Module(body)
with self.assertRaises(ValueError) as cm:
compile(mod, 'test', 'exec')
self.assertIn("invalid integer value: None", str(cm.exception))
def test_level_as_none(self):
body = [ast.ImportFrom(module='time',
names=[ast.alias(name='sleep')],
level=None,
lineno=0, col_offset=0)]
mod = ast.Module(body)
code = compile(mod, 'test', 'exec')
ns = {}
exec(code, ns)
self.assertIn('sleep', ns)
class ASTValidatorTests(unittest.TestCase):
def mod(self, mod, msg=None, mode="exec", *, exc=ValueError):
mod.lineno = mod.col_offset = 0
ast.fix_missing_locations(mod)
with self.assertRaises(exc) as cm:
compile(mod, "<test>", mode)
if msg is not None:
self.assertIn(msg, str(cm.exception))
def expr(self, node, msg=None, *, exc=ValueError):
mod = ast.Module([ast.Expr(node)])
self.mod(mod, msg, exc=exc)
def stmt(self, stmt, msg=None):
mod = ast.Module([stmt])
self.mod(mod, msg)
def test_module(self):
m = ast.Interactive([ast.Expr(ast.Name("x", ast.Store()))])
self.mod(m, "must have Load context", "single")
m = ast.Expression(ast.Name("x", ast.Store()))
self.mod(m, "must have Load context", "eval")
def _check_arguments(self, fac, check):
def arguments(args=None, vararg=None,
kwonlyargs=None, kwarg=None,
defaults=None, kw_defaults=None):
if args is None:
args = []
if kwonlyargs is None:
kwonlyargs = []
if defaults is None:
defaults = []
if kw_defaults is None:
kw_defaults = []
args = ast.arguments(args, vararg, kwonlyargs, kw_defaults,
kwarg, defaults)
return fac(args)
args = [ast.arg("x", ast.Name("x", ast.Store()))]
check(arguments(args=args), "must have Load context")
check(arguments(kwonlyargs=args), "must have Load context")
check(arguments(defaults=[ast.Num(3)]),
"more positional defaults than args")
check(arguments(kw_defaults=[ast.Num(4)]),
"length of kwonlyargs is not the same as kw_defaults")
args = [ast.arg("x", ast.Name("x", ast.Load()))]
check(arguments(args=args, defaults=[ast.Name("x", ast.Store())]),
"must have Load context")
args = [ast.arg("a", ast.Name("x", ast.Load())),
ast.arg("b", ast.Name("y", ast.Load()))]
check(arguments(kwonlyargs=args,
kw_defaults=[None, ast.Name("x", ast.Store())]),
"must have Load context")
def test_funcdef(self):
a = ast.arguments([], None, [], [], None, [])
f = ast.FunctionDef("x", a, [], [], None)
self.stmt(f, "empty body on FunctionDef")
f = ast.FunctionDef("x", a, [ast.Pass()], [ast.Name("x", ast.Store())],
None)
self.stmt(f, "must have Load context")
f = ast.FunctionDef("x", a, [ast.Pass()], [],
ast.Name("x", ast.Store()))
self.stmt(f, "must have Load context")
def fac(args):
return ast.FunctionDef("x", args, [ast.Pass()], [], None)
self._check_arguments(fac, self.stmt)
def test_classdef(self):
def cls(bases=None, keywords=None, body=None, decorator_list=None):
if bases is None:
bases = []
if keywords is None:
keywords = []
if body is None:
body = [ast.Pass()]
if decorator_list is None:
decorator_list = []
return ast.ClassDef("myclass", bases, keywords,
body, decorator_list)
self.stmt(cls(bases=[ast.Name("x", ast.Store())]),
"must have Load context")
self.stmt(cls(keywords=[ast.keyword("x", ast.Name("x", ast.Store()))]),
"must have Load context")
self.stmt(cls(body=[]), "empty body on ClassDef")
self.stmt(cls(body=[None]), "None disallowed")
self.stmt(cls(decorator_list=[ast.Name("x", ast.Store())]),
"must have Load context")
def test_delete(self):
self.stmt(ast.Delete([]), "empty targets on Delete")
self.stmt(ast.Delete([None]), "None disallowed")
self.stmt(ast.Delete([ast.Name("x", ast.Load())]),
"must have Del context")
def test_assign(self):
self.stmt(ast.Assign([], ast.Num(3)), "empty targets on Assign")
self.stmt(ast.Assign([None], ast.Num(3)), "None disallowed")
self.stmt(ast.Assign([ast.Name("x", ast.Load())], ast.Num(3)),
"must have Store context")
self.stmt(ast.Assign([ast.Name("x", ast.Store())],
ast.Name("y", ast.Store())),
"must have Load context")
def test_augassign(self):
aug = ast.AugAssign(ast.Name("x", ast.Load()), ast.Add(),
ast.Name("y", ast.Load()))
self.stmt(aug, "must have Store context")
aug = ast.AugAssign(ast.Name("x", ast.Store()), ast.Add(),
ast.Name("y", ast.Store()))
self.stmt(aug, "must have Load context")
def test_for(self):
x = ast.Name("x", ast.Store())
y = ast.Name("y", ast.Load())
p = ast.Pass()
self.stmt(ast.For(x, y, [], []), "empty body on For")
self.stmt(ast.For(ast.Name("x", ast.Load()), y, [p], []),
"must have Store context")
self.stmt(ast.For(x, ast.Name("y", ast.Store()), [p], []),
"must have Load context")
e = ast.Expr(ast.Name("x", ast.Store()))
self.stmt(ast.For(x, y, [e], []), "must have Load context")
self.stmt(ast.For(x, y, [p], [e]), "must have Load context")
def test_while(self):
self.stmt(ast.While(ast.Num(3), [], []), "empty body on While")
self.stmt(ast.While(ast.Name("x", ast.Store()), [ast.Pass()], []),
"must have Load context")
self.stmt(ast.While(ast.Num(3), [ast.Pass()],
[ast.Expr(ast.Name("x", ast.Store()))]),
"must have Load context")
def test_if(self):
self.stmt(ast.If(ast.Num(3), [], []), "empty body on If")
i = ast.If(ast.Name("x", ast.Store()), [ast.Pass()], [])
self.stmt(i, "must have Load context")
i = ast.If(ast.Num(3), [ast.Expr(ast.Name("x", ast.Store()))], [])
self.stmt(i, "must have Load context")
i = ast.If(ast.Num(3), [ast.Pass()],
[ast.Expr(ast.Name("x", ast.Store()))])
self.stmt(i, "must have Load context")
def test_with(self):
p = ast.Pass()
self.stmt(ast.With([], [p]), "empty items on With")
i = ast.withitem(ast.Num(3), None)
self.stmt(ast.With([i], []), "empty body on With")
i = ast.withitem(ast.Name("x", ast.Store()), None)
self.stmt(ast.With([i], [p]), "must have Load context")
i = ast.withitem(ast.Num(3), ast.Name("x", ast.Load()))
self.stmt(ast.With([i], [p]), "must have Store context")
def test_raise(self):
r = ast.Raise(None, ast.Num(3))
self.stmt(r, "Raise with cause but no exception")
r = ast.Raise(ast.Name("x", ast.Store()), None)
self.stmt(r, "must have Load context")
r = ast.Raise(ast.Num(4), ast.Name("x", ast.Store()))
self.stmt(r, "must have Load context")
def test_try(self):
p = ast.Pass()
t = ast.Try([], [], [], [p])
self.stmt(t, "empty body on Try")
t = ast.Try([ast.Expr(ast.Name("x", ast.Store()))], [], [], [p])
self.stmt(t, "must have Load context")
t = ast.Try([p], [], [], [])
self.stmt(t, "Try has neither except handlers nor finalbody")
t = ast.Try([p], [], [p], [p])
self.stmt(t, "Try has orelse but no except handlers")
t = ast.Try([p], [ast.ExceptHandler(None, "x", [])], [], [])
self.stmt(t, "empty body on ExceptHandler")
e = [ast.ExceptHandler(ast.Name("x", ast.Store()), "y", [p])]
self.stmt(ast.Try([p], e, [], []), "must have Load context")
e = [ast.ExceptHandler(None, "x", [p])]
t = ast.Try([p], e, [ast.Expr(ast.Name("x", ast.Store()))], [p])
self.stmt(t, "must have Load context")
t = ast.Try([p], e, [p], [ast.Expr(ast.Name("x", ast.Store()))])
self.stmt(t, "must have Load context")
def test_assert(self):
self.stmt(ast.Assert(ast.Name("x", ast.Store()), None),
"must have Load context")
assrt = ast.Assert(ast.Name("x", ast.Load()),
ast.Name("y", ast.Store()))
self.stmt(assrt, "must have Load context")
def test_import(self):
self.stmt(ast.Import([]), "empty names on Import")
def test_importfrom(self):
imp = ast.ImportFrom(None, [ast.alias("x", None)], -42)
self.stmt(imp, "Negative ImportFrom level")
self.stmt(ast.ImportFrom(None, [], 0), "empty names on ImportFrom")
def test_global(self):
self.stmt(ast.Global([]), "empty names on Global")
def test_nonlocal(self):
self.stmt(ast.Nonlocal([]), "empty names on Nonlocal")
def test_expr(self):
e = ast.Expr(ast.Name("x", ast.Store()))
self.stmt(e, "must have Load context")
def test_boolop(self):
b = ast.BoolOp(ast.And(), [])
self.expr(b, "less than 2 values")
b = ast.BoolOp(ast.And(), [ast.Num(3)])
self.expr(b, "less than 2 values")
b = ast.BoolOp(ast.And(), [ast.Num(4), None])
self.expr(b, "None disallowed")
b = ast.BoolOp(ast.And(), [ast.Num(4), ast.Name("x", ast.Store())])
self.expr(b, "must have Load context")
def test_unaryop(self):
u = ast.UnaryOp(ast.Not(), ast.Name("x", ast.Store()))
self.expr(u, "must have Load context")
def test_lambda(self):
a = ast.arguments([], None, [], [], None, [])
self.expr(ast.Lambda(a, ast.Name("x", ast.Store())),
"must have Load context")
def fac(args):
return ast.Lambda(args, ast.Name("x", ast.Load()))
self._check_arguments(fac, self.expr)
def test_ifexp(self):
l = ast.Name("x", ast.Load())
s = ast.Name("y", ast.Store())
for args in (s, l, l), (l, s, l), (l, l, s):
self.expr(ast.IfExp(*args), "must have Load context")
def test_dict(self):
d = ast.Dict([], [ast.Name("x", ast.Load())])
self.expr(d, "same number of keys as values")
d = ast.Dict([ast.Name("x", ast.Load())], [None])
self.expr(d, "None disallowed")
def test_set(self):
self.expr(ast.Set([None]), "None disallowed")
s = ast.Set([ast.Name("x", ast.Store())])
self.expr(s, "must have Load context")
def _check_comprehension(self, fac):
self.expr(fac([]), "comprehension with no generators")
g = ast.comprehension(ast.Name("x", ast.Load()),
ast.Name("x", ast.Load()), [], 0)
self.expr(fac([g]), "must have Store context")
g = ast.comprehension(ast.Name("x", ast.Store()),
ast.Name("x", ast.Store()), [], 0)
self.expr(fac([g]), "must have Load context")
x = ast.Name("x", ast.Store())
y = ast.Name("y", ast.Load())
g = ast.comprehension(x, y, [None], 0)
self.expr(fac([g]), "None disallowed")
g = ast.comprehension(x, y, [ast.Name("x", ast.Store())], 0)
self.expr(fac([g]), "must have Load context")
def _simple_comp(self, fac):
g = ast.comprehension(ast.Name("x", ast.Store()),
ast.Name("x", ast.Load()), [], 0)
self.expr(fac(ast.Name("x", ast.Store()), [g]),
"must have Load context")
def wrap(gens):
return fac(ast.Name("x", ast.Store()), gens)
self._check_comprehension(wrap)
def test_listcomp(self):
self._simple_comp(ast.ListComp)
def test_setcomp(self):
self._simple_comp(ast.SetComp)
def test_generatorexp(self):
self._simple_comp(ast.GeneratorExp)
def test_dictcomp(self):
g = ast.comprehension(ast.Name("y", ast.Store()),
ast.Name("p", ast.Load()), [], 0)
c = ast.DictComp(ast.Name("x", ast.Store()),
ast.Name("y", ast.Load()), [g])
self.expr(c, "must have Load context")
c = ast.DictComp(ast.Name("x", ast.Load()),
ast.Name("y", ast.Store()), [g])
self.expr(c, "must have Load context")
def factory(comps):
k = ast.Name("x", ast.Load())
v = ast.Name("y", ast.Load())
return ast.DictComp(k, v, comps)
self._check_comprehension(factory)
def test_yield(self):
self.expr(ast.Yield(ast.Name("x", ast.Store())), "must have Load")
self.expr(ast.YieldFrom(ast.Name("x", ast.Store())), "must have Load")
def test_compare(self):
left = ast.Name("x", ast.Load())
comp = ast.Compare(left, [ast.In()], [])
self.expr(comp, "no comparators")
comp = ast.Compare(left, [ast.In()], [ast.Num(4), ast.Num(5)])
self.expr(comp, "different number of comparators and operands")
comp = ast.Compare(ast.Num("blah"), [ast.In()], [left])
self.expr(comp, "non-numeric", exc=TypeError)
comp = ast.Compare(left, [ast.In()], [ast.Num("blah")])
self.expr(comp, "non-numeric", exc=TypeError)
def test_call(self):
func = ast.Name("x", ast.Load())
args = [ast.Name("y", ast.Load())]
keywords = [ast.keyword("w", ast.Name("z", ast.Load()))]
call = ast.Call(ast.Name("x", ast.Store()), args, keywords)
self.expr(call, "must have Load context")
call = ast.Call(func, [None], keywords)
self.expr(call, "None disallowed")
bad_keywords = [ast.keyword("w", ast.Name("z", ast.Store()))]
call = ast.Call(func, args, bad_keywords)
self.expr(call, "must have Load context")
def test_num(self):
class subint(int):
pass
class subfloat(float):
pass
class subcomplex(complex):
pass
for obj in "0", "hello", subint(), subfloat(), subcomplex():
self.expr(ast.Num(obj), "non-numeric", exc=TypeError)
def test_attribute(self):
attr = ast.Attribute(ast.Name("x", ast.Store()), "y", ast.Load())
self.expr(attr, "must have Load context")
def test_subscript(self):
sub = ast.Subscript(ast.Name("x", ast.Store()), ast.Index(ast.Num(3)),
ast.Load())
self.expr(sub, "must have Load context")
x = ast.Name("x", ast.Load())
sub = ast.Subscript(x, ast.Index(ast.Name("y", ast.Store())),
ast.Load())
self.expr(sub, "must have Load context")
s = ast.Name("x", ast.Store())
for args in (s, None, None), (None, s, None), (None, None, s):
sl = ast.Slice(*args)
self.expr(ast.Subscript(x, sl, ast.Load()),
"must have Load context")
sl = ast.ExtSlice([])
self.expr(ast.Subscript(x, sl, ast.Load()), "empty dims on ExtSlice")
sl = ast.ExtSlice([ast.Index(s)])
self.expr(ast.Subscript(x, sl, ast.Load()), "must have Load context")
def test_starred(self):
left = ast.List([ast.Starred(ast.Name("x", ast.Load()), ast.Store())],
ast.Store())
assign = ast.Assign([left], ast.Num(4))
self.stmt(assign, "must have Store context")
def _sequence(self, fac):
self.expr(fac([None], ast.Load()), "None disallowed")
self.expr(fac([ast.Name("x", ast.Store())], ast.Load()),
"must have Load context")
def test_list(self):
self._sequence(ast.List)
def test_tuple(self):
self._sequence(ast.Tuple)
def test_nameconstant(self):
self.expr(ast.NameConstant(4), "singleton must be True, False, or None")
def test_stdlib_validates(self):
stdlib = os.path.dirname(ast.__file__)
tests = [fn for fn in os.listdir(stdlib) if fn.endswith(".py")]
tests.extend(["test/test_grammar.py", "test/test_unpack_ex.py"])
for module in tests:
fn = os.path.join(stdlib, module)
with open(fn, "r", encoding="utf-8") as fp:
source = fp.read()
mod = ast.parse(source, fn)
compile(mod, fn, "exec")
class ConstantTests(unittest.TestCase):
"""Tests on the ast.Constant node type."""
def compile_constant(self, value):
tree = ast.parse("x = 123")
node = tree.body[0].value
new_node = ast.Constant(value=value)
ast.copy_location(new_node, node)
tree.body[0].value = new_node
code = compile(tree, "<string>", "exec")
ns = {}
exec(code, ns)
return ns['x']
def test_validation(self):
with self.assertRaises(TypeError) as cm:
self.compile_constant([1, 2, 3])
self.assertEqual(str(cm.exception),
"got an invalid type in Constant: list")
def test_singletons(self):
for const in (None, False, True, Ellipsis, b'', frozenset()):
with self.subTest(const=const):
value = self.compile_constant(const)
self.assertIs(value, const)
def test_values(self):
nested_tuple = (1,)
nested_frozenset = frozenset({1})
for level in range(3):
nested_tuple = (nested_tuple, 2)
nested_frozenset = frozenset({nested_frozenset, 2})
values = (123, 123.0, 123j,
"unicode", b'bytes',
tuple("tuple"), frozenset("frozenset"),
nested_tuple, nested_frozenset)
for value in values:
with self.subTest(value=value):
result = self.compile_constant(value)
self.assertEqual(result, value)
def test_assign_to_constant(self):
tree = ast.parse("x = 1")
target = tree.body[0].targets[0]
new_target = ast.Constant(value=1)
ast.copy_location(new_target, target)
tree.body[0].targets[0] = new_target
with self.assertRaises(ValueError) as cm:
compile(tree, "string", "exec")
self.assertEqual(str(cm.exception),
"expression which can't be assigned "
"to in Store context")
def test_get_docstring(self):
tree = ast.parse("'docstring'\nx = 1")
self.assertEqual(ast.get_docstring(tree), 'docstring')
tree.body[0].value = ast.Constant(value='constant docstring')
self.assertEqual(ast.get_docstring(tree), 'constant docstring')
def get_load_const(self, tree):
# Compile to bytecode, disassemble and get parameter of LOAD_CONST
# instructions
co = compile(tree, '<string>', 'exec')
consts = []
for instr in dis.get_instructions(co):
if instr.opname == 'LOAD_CONST':
consts.append(instr.argval)
return consts
@support.cpython_only
def test_load_const(self):
consts = [None,
True, False,
124,
2.0,
3j,
"unicode",
b'bytes',
(1, 2, 3)]
code = '\n'.join(['x={!r}'.format(const) for const in consts])
code += '\nx = ...'
consts.extend((Ellipsis, None))
tree = ast.parse(code)
self.assertEqual(self.get_load_const(tree),
consts)
# Replace expression nodes with constants
for assign, const in zip(tree.body, consts):
assert isinstance(assign, ast.Assign), ast.dump(assign)
new_node = ast.Constant(value=const)
ast.copy_location(new_node, assign.value)
assign.value = new_node
self.assertEqual(self.get_load_const(tree),
consts)
def test_literal_eval(self):
tree = ast.parse("1 + 2")
binop = tree.body[0].value
new_left = ast.Constant(value=10)
ast.copy_location(new_left, binop.left)
binop.left = new_left
new_right = ast.Constant(value=20)
ast.copy_location(new_right, binop.right)
binop.right = new_right
self.assertEqual(ast.literal_eval(binop), 30)
def main():
if __name__ != '__main__':
return
if sys.argv[1:] == ['-g']:
for statements, kind in ((exec_tests, "exec"), (single_tests, "single"),
(eval_tests, "eval")):
print(kind+"_results = [")
for statement in statements:
tree = ast.parse(statement, "?", kind)
print("%r," % (to_tuple(tree),))
print("]")
print("main()")
raise SystemExit
unittest.main()
#### EVERYTHING BELOW IS GENERATED #####
exec_results = [
('Module', [('Expr', (1, 0), ('NameConstant', (1, 0), None))]),
('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [], None, [], [], None, []), [('Pass', (1, 9))], [], None)]),
('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [('arg', (1, 6), 'a', None)], None, [], [], None, []), [('Pass', (1, 10))], [], None)]),
('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [('arg', (1, 6), 'a', None)], None, [], [], None, [('Num', (1, 8), 0)]), [('Pass', (1, 12))], [], None)]),
('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [], ('arg', (1, 7), 'args', None), [], [], None, []), [('Pass', (1, 14))], [], None)]),
('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [], None, [], [], ('arg', (1, 8), 'kwargs', None), []), [('Pass', (1, 17))], [], None)]),
('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [('arg', (1, 6), 'a', None), ('arg', (1, 9), 'b', None), ('arg', (1, 14), 'c', None), ('arg', (1, 22), 'd', None), ('arg', (1, 28), 'e', None)], ('arg', (1, 35), 'args', None), [('arg', (1, 41), 'f', None)], [('Num', (1, 43), 42)], ('arg', (1, 49), 'kwargs', None), [('Num', (1, 11), 1), ('NameConstant', (1, 16), None), ('List', (1, 24), [], ('Load',)), ('Dict', (1, 30), [], [])]), [('Pass', (1, 58))], [], None)]),
('Module', [('ClassDef', (1, 0), 'C', [], [], [('Pass', (1, 8))], [])]),
('Module', [('ClassDef', (1, 0), 'C', [('Name', (1, 8), 'object', ('Load',))], [], [('Pass', (1, 17))], [])]),
('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [], None, [], [], None, []), [('Return', (1, 8), ('Num', (1, 15), 1))], [], None)]),
('Module', [('Delete', (1, 0), [('Name', (1, 4), 'v', ('Del',))])]),
('Module', [('Assign', (1, 0), [('Name', (1, 0), 'v', ('Store',))], ('Num', (1, 4), 1))]),
('Module', [('AugAssign', (1, 0), ('Name', (1, 0), 'v', ('Store',)), ('Add',), ('Num', (1, 5), 1))]),
('Module', [('For', (1, 0), ('Name', (1, 4), 'v', ('Store',)), ('Name', (1, 9), 'v', ('Load',)), [('Pass', (1, 11))], [])]),
('Module', [('While', (1, 0), ('Name', (1, 6), 'v', ('Load',)), [('Pass', (1, 8))], [])]),
('Module', [('If', (1, 0), ('Name', (1, 3), 'v', ('Load',)), [('Pass', (1, 5))], [])]),
('Module', [('With', (1, 0), [('withitem', ('Name', (1, 5), 'x', ('Load',)), ('Name', (1, 10), 'y', ('Store',)))], [('Pass', (1, 13))])]),
('Module', [('With', (1, 0), [('withitem', ('Name', (1, 5), 'x', ('Load',)), ('Name', (1, 10), 'y', ('Store',))), ('withitem', ('Name', (1, 13), 'z', ('Load',)), ('Name', (1, 18), 'q', ('Store',)))], [('Pass', (1, 21))])]),
('Module', [('Raise', (1, 0), ('Call', (1, 6), ('Name', (1, 6), 'Exception', ('Load',)), [('Str', (1, 16), 'string')], []), None)]),
('Module', [('Try', (1, 0), [('Pass', (2, 2))], [('ExceptHandler', (3, 0), ('Name', (3, 7), 'Exception', ('Load',)), None, [('Pass', (4, 2))])], [], [])]),
('Module', [('Try', (1, 0), [('Pass', (2, 2))], [], [], [('Pass', (4, 2))])]),
('Module', [('Assert', (1, 0), ('Name', (1, 7), 'v', ('Load',)), None)]),
('Module', [('Import', (1, 0), [('alias', 'sys', None)])]),
('Module', [('ImportFrom', (1, 0), 'sys', [('alias', 'v', None)], 0)]),
('Module', [('Global', (1, 0), ['v'])]),
('Module', [('Expr', (1, 0), ('Num', (1, 0), 1))]),
('Module', [('Pass', (1, 0))]),
('Module', [('For', (1, 0), ('Name', (1, 4), 'v', ('Store',)), ('Name', (1, 9), 'v', ('Load',)), [('Break', (1, 11))], [])]),
('Module', [('For', (1, 0), ('Name', (1, 4), 'v', ('Store',)), ('Name', (1, 9), 'v', ('Load',)), [('Continue', (1, 11))], [])]),
('Module', [('For', (1, 0), ('Tuple', (1, 4), [('Name', (1, 4), 'a', ('Store',)), ('Name', (1, 6), 'b', ('Store',))], ('Store',)), ('Name', (1, 11), 'c', ('Load',)), [('Pass', (1, 14))], [])]),
('Module', [('Expr', (1, 0), ('ListComp', (1, 1), ('Tuple', (1, 2), [('Name', (1, 2), 'a', ('Load',)), ('Name', (1, 4), 'b', ('Load',))], ('Load',)), [('comprehension', ('Tuple', (1, 11), [('Name', (1, 11), 'a', ('Store',)), ('Name', (1, 13), 'b', ('Store',))], ('Store',)), ('Name', (1, 18), 'c', ('Load',)), [], 0)]))]),
('Module', [('Expr', (1, 0), ('GeneratorExp', (1, 1), ('Tuple', (1, 2), [('Name', (1, 2), 'a', ('Load',)), ('Name', (1, 4), 'b', ('Load',))], ('Load',)), [('comprehension', ('Tuple', (1, 11), [('Name', (1, 11), 'a', ('Store',)), ('Name', (1, 13), 'b', ('Store',))], ('Store',)), ('Name', (1, 18), 'c', ('Load',)), [], 0)]))]),
('Module', [('Expr', (1, 0), ('GeneratorExp', (1, 1), ('Tuple', (1, 2), [('Name', (1, 2), 'a', ('Load',)), ('Name', (1, 4), 'b', ('Load',))], ('Load',)), [('comprehension', ('Tuple', (1, 12), [('Name', (1, 12), 'a', ('Store',)), ('Name', (1, 14), 'b', ('Store',))], ('Store',)), ('Name', (1, 20), 'c', ('Load',)), [], 0)]))]),
('Module', [('Expr', (1, 0), ('GeneratorExp', (2, 4), ('Tuple', (3, 4), [('Name', (3, 4), 'Aa', ('Load',)), ('Name', (5, 7), 'Bb', ('Load',))], ('Load',)), [('comprehension', ('Tuple', (8, 4), [('Name', (8, 4), 'Aa', ('Store',)), ('Name', (10, 4), 'Bb', ('Store',))], ('Store',)), ('Name', (10, 10), 'Cc', ('Load',)), [], 0)]))]),
('Module', [('Expr', (1, 0), ('DictComp', (1, 0), ('Name', (1, 1), 'a', ('Load',)), ('Name', (1, 5), 'b', ('Load',)), [('comprehension', ('Name', (1, 11), 'w', ('Store',)), ('Name', (1, 16), 'x', ('Load',)), [], 0), ('comprehension', ('Name', (1, 22), 'm', ('Store',)), ('Name', (1, 27), 'p', ('Load',)), [('Name', (1, 32), 'g', ('Load',))], 0)]))]),
('Module', [('Expr', (1, 0), ('DictComp', (1, 0), ('Name', (1, 1), 'a', ('Load',)), ('Name', (1, 5), 'b', ('Load',)), [('comprehension', ('Tuple', (1, 11), [('Name', (1, 11), 'v', ('Store',)), ('Name', (1, 13), 'w', ('Store',))], ('Store',)), ('Name', (1, 18), 'x', ('Load',)), [], 0)]))]),
('Module', [('Expr', (1, 0), ('SetComp', (1, 0), ('Name', (1, 1), 'r', ('Load',)), [('comprehension', ('Name', (1, 7), 'l', ('Store',)), ('Name', (1, 12), 'x', ('Load',)), [('Name', (1, 17), 'g', ('Load',))], 0)]))]),
('Module', [('Expr', (1, 0), ('SetComp', (1, 0), ('Name', (1, 1), 'r', ('Load',)), [('comprehension', ('Tuple', (1, 7), [('Name', (1, 7), 'l', ('Store',)), ('Name', (1, 9), 'm', ('Store',))], ('Store',)), ('Name', (1, 14), 'x', ('Load',)), [], 0)]))]),
('Module', [('AsyncFunctionDef', (1, 6), 'f', ('arguments', [], None, [], [], None, []), [('Expr', (2, 1), ('Await', (2, 1), ('Call', (2, 7), ('Name', (2, 7), 'something', ('Load',)), [], [])))], [], None)]),
('Module', [('AsyncFunctionDef', (1, 6), 'f', ('arguments', [], None, [], [], None, []), [('AsyncFor', (2, 7), ('Name', (2, 11), 'e', ('Store',)), ('Name', (2, 16), 'i', ('Load',)), [('Expr', (2, 19), ('Num', (2, 19), 1))], [('Expr', (3, 7), ('Num', (3, 7), 2))])], [], None)]),
('Module', [('AsyncFunctionDef', (1, 6), 'f', ('arguments', [], None, [], [], None, []), [('AsyncWith', (2, 7), [('withitem', ('Name', (2, 12), 'a', ('Load',)), ('Name', (2, 17), 'b', ('Store',)))], [('Expr', (2, 20), ('Num', (2, 20), 1))])], [], None)]),
('Module', [('Expr', (1, 0), ('Dict', (1, 0), [None, ('Num', (1, 10), 2)], [('Dict', (1, 3), [('Num', (1, 4), 1)], [('Num', (1, 6), 2)]), ('Num', (1, 12), 3)]))]),
('Module', [('Expr', (1, 0), ('Set', (1, 0), [('Starred', (1, 1), ('Set', (1, 2), [('Num', (1, 3), 1), ('Num', (1, 6), 2)]), ('Load',)), ('Num', (1, 10), 3)]))]),
('Module', [('AsyncFunctionDef', (1, 6), 'f', ('arguments', [], None, [], [], None, []), [('Expr', (2, 1), ('ListComp', (2, 2), ('Name', (2, 2), 'i', ('Load',)), [('comprehension', ('Name', (2, 14), 'b', ('Store',)), ('Name', (2, 19), 'c', ('Load',)), [], 1)]))], [], None)]),
]
single_results = [
('Interactive', [('Expr', (1, 0), ('BinOp', (1, 0), ('Num', (1, 0), 1), ('Add',), ('Num', (1, 2), 2)))]),
]
eval_results = [
('Expression', ('NameConstant', (1, 0), None)),
('Expression', ('BoolOp', (1, 0), ('And',), [('Name', (1, 0), 'a', ('Load',)), ('Name', (1, 6), 'b', ('Load',))])),
('Expression', ('BinOp', (1, 0), ('Name', (1, 0), 'a', ('Load',)), ('Add',), ('Name', (1, 4), 'b', ('Load',)))),
('Expression', ('UnaryOp', (1, 0), ('Not',), ('Name', (1, 4), 'v', ('Load',)))),
('Expression', ('Lambda', (1, 0), ('arguments', [], None, [], [], None, []), ('NameConstant', (1, 7), None))),
('Expression', ('Dict', (1, 0), [('Num', (1, 2), 1)], [('Num', (1, 4), 2)])),
('Expression', ('Dict', (1, 0), [], [])),
('Expression', ('Set', (1, 0), [('NameConstant', (1, 1), None)])),
('Expression', ('Dict', (1, 0), [('Num', (2, 6), 1)], [('Num', (4, 10), 2)])),
('Expression', ('ListComp', (1, 1), ('Name', (1, 1), 'a', ('Load',)), [('comprehension', ('Name', (1, 7), 'b', ('Store',)), ('Name', (1, 12), 'c', ('Load',)), [('Name', (1, 17), 'd', ('Load',))], 0)])),
('Expression', ('GeneratorExp', (1, 1), ('Name', (1, 1), 'a', ('Load',)), [('comprehension', ('Name', (1, 7), 'b', ('Store',)), ('Name', (1, 12), 'c', ('Load',)), [('Name', (1, 17), 'd', ('Load',))], 0)])),
('Expression', ('Compare', (1, 0), ('Num', (1, 0), 1), [('Lt',), ('Lt',)], [('Num', (1, 4), 2), ('Num', (1, 8), 3)])),
('Expression', ('Call', (1, 0), ('Name', (1, 0), 'f', ('Load',)), [('Num', (1, 2), 1), ('Num', (1, 4), 2), ('Starred', (1, 10), ('Name', (1, 11), 'd', ('Load',)), ('Load',))], [('keyword', 'c', ('Num', (1, 8), 3)), ('keyword', None, ('Name', (1, 15), 'e', ('Load',)))])),
('Expression', ('Num', (1, 0), 10)),
('Expression', ('Str', (1, 0), 'string')),
('Expression', ('Attribute', (1, 0), ('Name', (1, 0), 'a', ('Load',)), 'b', ('Load',))),
('Expression', ('Subscript', (1, 0), ('Name', (1, 0), 'a', ('Load',)), ('Slice', ('Name', (1, 2), 'b', ('Load',)), ('Name', (1, 4), 'c', ('Load',)), None), ('Load',))),
('Expression', ('Name', (1, 0), 'v', ('Load',))),
('Expression', ('List', (1, 0), [('Num', (1, 1), 1), ('Num', (1, 3), 2), ('Num', (1, 5), 3)], ('Load',))),
('Expression', ('List', (1, 0), [], ('Load',))),
('Expression', ('Tuple', (1, 0), [('Num', (1, 0), 1), ('Num', (1, 2), 2), ('Num', (1, 4), 3)], ('Load',))),
('Expression', ('Tuple', (1, 1), [('Num', (1, 1), 1), ('Num', (1, 3), 2), ('Num', (1, 5), 3)], ('Load',))),
('Expression', ('Tuple', (1, 0), [], ('Load',))),
('Expression', ('Call', (1, 0), ('Attribute', (1, 0), ('Attribute', (1, 0), ('Attribute', (1, 0), ('Name', (1, 0), 'a', ('Load',)), 'b', ('Load',)), 'c', ('Load',)), 'd', ('Load',)), [('Subscript', (1, 8), ('Attribute', (1, 8), ('Name', (1, 8), 'a', ('Load',)), 'b', ('Load',)), ('Slice', ('Num', (1, 12), 1), ('Num', (1, 14), 2), None), ('Load',))], [])),
]
main()
| 50,121 | 1,171 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_abstract_numbers.py | """Unit tests for numbers.py."""
import math
import operator
import unittest
from numbers import Complex, Real, Rational, Integral
class TestNumbers(unittest.TestCase):
def test_int(self):
self.assertTrue(issubclass(int, Integral))
self.assertTrue(issubclass(int, Complex))
self.assertEqual(7, int(7).real)
self.assertEqual(0, int(7).imag)
self.assertEqual(7, int(7).conjugate())
self.assertEqual(-7, int(-7).conjugate())
self.assertEqual(7, int(7).numerator)
self.assertEqual(1, int(7).denominator)
def test_float(self):
self.assertFalse(issubclass(float, Rational))
self.assertTrue(issubclass(float, Real))
self.assertEqual(7.3, float(7.3).real)
self.assertEqual(0, float(7.3).imag)
self.assertEqual(7.3, float(7.3).conjugate())
self.assertEqual(-7.3, float(-7.3).conjugate())
def test_complex(self):
self.assertFalse(issubclass(complex, Real))
self.assertTrue(issubclass(complex, Complex))
c1, c2 = complex(3, 2), complex(4,1)
# XXX: This is not ideal, but see the comment in math_trunc().
self.assertRaises(TypeError, math.trunc, c1)
self.assertRaises(TypeError, operator.mod, c1, c2)
self.assertRaises(TypeError, divmod, c1, c2)
self.assertRaises(TypeError, operator.floordiv, c1, c2)
self.assertRaises(TypeError, float, c1)
self.assertRaises(TypeError, int, c1)
if __name__ == "__main__":
unittest.main()
| 1,528 | 45 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_dis.py | # Minimal tests for dis module
from test.support import captured_stdout
from test.bytecode_helper import BytecodeTestCase
import difflib
import unittest
import sys
import cosmo
import dis
import io
import re
import types
import contextlib
def get_tb():
def _error():
try:
1 / 0
except Exception as e:
tb = e.__traceback__
return tb
tb = _error()
while tb.tb_next:
tb = tb.tb_next
return tb
TRACEBACK_CODE = get_tb().tb_frame.f_code
class _C:
def __init__(self, x):
self.x = x == 1
@staticmethod
def sm(x):
x = x == 1
@classmethod
def cm(cls, x):
cls.x = x == 1
dis_c_instance_method = """\
%3d 0 LOAD_FAST 1 (x)
2 LOAD_CONST 1 (1)
4 COMPARE_OP 2 (==)
6 LOAD_FAST 0 (self)
8 STORE_ATTR 0 (x)
10 LOAD_CONST 0 (None)
12 RETURN_VALUE
""" % (_C.__init__.__code__.co_firstlineno + 1,)
dis_c_instance_method_bytes = """\
0 LOAD_FAST 1 (1)
2 LOAD_CONST 1 (1)
4 COMPARE_OP 2 (==)
6 LOAD_FAST 0 (0)
8 STORE_ATTR 0 (0)
10 LOAD_CONST 0 (0)
12 RETURN_VALUE
"""
dis_c_class_method = """\
%3d 0 LOAD_FAST 1 (x)
2 LOAD_CONST 1 (1)
4 COMPARE_OP 2 (==)
6 LOAD_FAST 0 (cls)
8 STORE_ATTR 0 (x)
10 LOAD_CONST 0 (None)
12 RETURN_VALUE
""" % (_C.cm.__code__.co_firstlineno + 2,)
dis_c_static_method = """\
%3d 0 LOAD_FAST 0 (x)
2 LOAD_CONST 1 (1)
4 COMPARE_OP 2 (==)
6 STORE_FAST 0 (x)
8 LOAD_CONST 0 (None)
10 RETURN_VALUE
""" % (_C.sm.__code__.co_firstlineno + 2,)
# Class disassembling info has an extra newline at end.
dis_c = """\
Disassembly of %s:
%s
Disassembly of %s:
%s
Disassembly of %s:
%s
""" % (_C.__init__.__name__, dis_c_instance_method,
_C.cm.__name__, dis_c_class_method,
_C.sm.__name__, dis_c_static_method)
def _f(a):
print(a)
return 1
dis_f = """\
%3d 0 LOAD_GLOBAL 0 (print)
2 LOAD_FAST 0 (a)
4 CALL_FUNCTION 1
6 POP_TOP
%3d 8 LOAD_CONST 1 (1)
10 RETURN_VALUE
""" % (_f.__code__.co_firstlineno + 1,
_f.__code__.co_firstlineno + 2)
dis_f_co_code = """\
0 LOAD_GLOBAL 0 (0)
2 LOAD_FAST 0 (0)
4 CALL_FUNCTION 1
6 POP_TOP
8 LOAD_CONST 1 (1)
10 RETURN_VALUE
"""
def bug708901():
for res in range(1,
10):
pass
dis_bug708901 = """\
%3d 0 SETUP_LOOP 18 (to 20)
2 LOAD_GLOBAL 0 (range)
4 LOAD_CONST 1 (1)
%3d 6 LOAD_CONST 2 (10)
8 CALL_FUNCTION 2
10 GET_ITER
>> 12 FOR_ITER 4 (to 18)
14 STORE_FAST 0 (res)
%3d 16 JUMP_ABSOLUTE 12
>> 18 POP_BLOCK
>> 20 LOAD_CONST 0 (None)
22 RETURN_VALUE
""" % (bug708901.__code__.co_firstlineno + 1,
bug708901.__code__.co_firstlineno + 2,
bug708901.__code__.co_firstlineno + 3)
def bug1333982(x=[]):
assert 0, ([s for s in x] +
1)
pass
dis_bug1333982 = """\
%3d 0 LOAD_CONST 1 (0)
2 POP_JUMP_IF_TRUE 26
4 LOAD_GLOBAL 0 (AssertionError)
6 LOAD_CONST 2 (<code object <listcomp> at 0x..., file "%s", line %d>)
8 LOAD_CONST 3 ('bug1333982.<locals>.<listcomp>')
10 MAKE_FUNCTION 0
12 LOAD_FAST 0 (x)
14 GET_ITER
16 CALL_FUNCTION 1
%3d 18 LOAD_CONST 4 (1)
20 BINARY_ADD
22 CALL_FUNCTION 1
24 RAISE_VARARGS 1
%3d >> 26 LOAD_CONST 0 (None)
28 RETURN_VALUE
""" % (bug1333982.__code__.co_firstlineno + 1,
__file__,
bug1333982.__code__.co_firstlineno + 1,
bug1333982.__code__.co_firstlineno + 2,
bug1333982.__code__.co_firstlineno + 3)
_BIG_LINENO_FORMAT = """\
%3d 0 LOAD_GLOBAL 0 (spam)
2 POP_TOP
4 LOAD_CONST 0 (None)
6 RETURN_VALUE
"""
dis_module_expected_results = """\
Disassembly of f:
4 0 LOAD_CONST 0 (None)
2 RETURN_VALUE
Disassembly of g:
5 0 LOAD_CONST 0 (None)
2 RETURN_VALUE
"""
expr_str = "x + 1"
dis_expr_str = """\
1 0 LOAD_NAME 0 (x)
2 LOAD_CONST 0 (1)
4 BINARY_ADD
6 RETURN_VALUE
"""
simple_stmt_str = "x = x + 1"
dis_simple_stmt_str = """\
1 0 LOAD_NAME 0 (x)
2 LOAD_CONST 0 (1)
4 BINARY_ADD
6 STORE_NAME 0 (x)
8 LOAD_CONST 1 (None)
10 RETURN_VALUE
"""
annot_stmt_str = """\
x: int = 1
y: fun(1)
lst[fun(0)]: int = 1
"""
# leading newline is for a reason (tests lineno)
dis_annot_stmt_str = """\
2 0 SETUP_ANNOTATIONS
2 LOAD_CONST 0 (1)
4 STORE_NAME 0 (x)
6 LOAD_NAME 1 (int)
8 STORE_ANNOTATION 0 (x)
3 10 LOAD_NAME 2 (fun)
12 LOAD_CONST 0 (1)
14 CALL_FUNCTION 1
16 STORE_ANNOTATION 3 (y)
4 18 LOAD_CONST 0 (1)
20 LOAD_NAME 4 (lst)
22 LOAD_NAME 2 (fun)
24 LOAD_CONST 1 (0)
26 CALL_FUNCTION 1
28 STORE_SUBSCR
30 LOAD_NAME 1 (int)
32 POP_TOP
34 LOAD_CONST 2 (None)
36 RETURN_VALUE
"""
compound_stmt_str = """\
x = 0
while 1:
x += 1"""
# Trailing newline has been deliberately omitted
dis_compound_stmt_str = """\
1 0 LOAD_CONST 0 (0)
2 STORE_NAME 0 (x)
2 4 SETUP_LOOP 12 (to 18)
3 >> 6 LOAD_NAME 0 (x)
8 LOAD_CONST 1 (1)
10 INPLACE_ADD
12 STORE_NAME 0 (x)
14 JUMP_ABSOLUTE 6
16 POP_BLOCK
>> 18 LOAD_CONST 2 (None)
20 RETURN_VALUE
"""
dis_traceback = """\
%3d 0 SETUP_EXCEPT 12 (to 14)
%3d 2 LOAD_CONST 1 (1)
4 LOAD_CONST 2 (0)
--> 6 BINARY_TRUE_DIVIDE
8 POP_TOP
10 POP_BLOCK
12 JUMP_FORWARD 40 (to 54)
%3d >> 14 DUP_TOP
16 LOAD_GLOBAL 0 (Exception)
18 COMPARE_OP 10 (exception match)
20 POP_JUMP_IF_FALSE 52
22 POP_TOP
24 STORE_FAST 0 (e)
26 POP_TOP
28 SETUP_FINALLY 12 (to 42)
%3d 30 LOAD_FAST 0 (e)
32 LOAD_ATTR 1 (__traceback__)
34 STORE_FAST 1 (tb)
36 POP_BLOCK
38 POP_EXCEPT
40 LOAD_CONST 0 (None)
>> 42 LOAD_CONST 0 (None)
44 STORE_FAST 0 (e)
46 DELETE_FAST 0 (e)
48 END_FINALLY
50 JUMP_FORWARD 2 (to 54)
>> 52 END_FINALLY
%3d >> 54 LOAD_FAST 1 (tb)
56 RETURN_VALUE
""" % (TRACEBACK_CODE.co_firstlineno + 1,
TRACEBACK_CODE.co_firstlineno + 2,
TRACEBACK_CODE.co_firstlineno + 3,
TRACEBACK_CODE.co_firstlineno + 4,
TRACEBACK_CODE.co_firstlineno + 5)
def _fstring(a, b, c, d):
return f'{a} {b:4} {c!r} {d!r:4}'
dis_fstring = """\
%3d 0 LOAD_FAST 0 (a)
2 FORMAT_VALUE 0
4 LOAD_CONST 1 (' ')
6 LOAD_FAST 1 (b)
8 LOAD_CONST 2 ('4')
10 FORMAT_VALUE 4 (with format)
12 LOAD_CONST 1 (' ')
14 LOAD_FAST 2 (c)
16 FORMAT_VALUE 2 (repr)
18 LOAD_CONST 1 (' ')
20 LOAD_FAST 3 (d)
22 LOAD_CONST 2 ('4')
24 FORMAT_VALUE 6 (repr, with format)
26 BUILD_STRING 7
28 RETURN_VALUE
""" % (_fstring.__code__.co_firstlineno + 1,)
def _g(x):
yield x
class DisTests(unittest.TestCase):
def get_disassembly(self, func, lasti=-1, wrapper=True):
# We want to test the default printing behaviour, not the file arg
output = io.StringIO()
with contextlib.redirect_stdout(output):
if wrapper:
dis.dis(func)
else:
dis.disassemble(func, lasti)
return output.getvalue()
def get_disassemble_as_string(self, func, lasti=-1):
return self.get_disassembly(func, lasti, False)
def strip_addresses(self, text):
return re.sub(r'\b0x[0-9A-Fa-f]+\b', '0x...', text)
def do_disassembly_test(self, func, expected):
t = self.maxDiff
self.maxDiff = None # to get full disassembly
got = self.get_disassembly(func)
if got != expected:
got = self.strip_addresses(got)
# filename issue because within zip store?
expected = expected.replace(".pyc", ".py")
self.assertEqual(got, expected)
self.maxDiff = t
def test_opmap(self):
self.assertEqual(dis.opmap["NOP"], 9)
self.assertIn(dis.opmap["LOAD_CONST"], dis.hasconst)
self.assertIn(dis.opmap["STORE_NAME"], dis.hasname)
def test_opname(self):
self.assertEqual(dis.opname[dis.opmap["LOAD_FAST"]], "LOAD_FAST")
def test_boundaries(self):
self.assertEqual(dis.opmap["EXTENDED_ARG"], dis.EXTENDED_ARG)
self.assertEqual(dis.opmap["STORE_NAME"], dis.HAVE_ARGUMENT)
def test_dis(self):
self.do_disassembly_test(_f, dis_f)
def test_bug_708901(self):
self.do_disassembly_test(bug708901, dis_bug708901)
def test_bug_1333982(self):
# This one is checking bytecodes generated for an `assert` statement,
# so fails if the tests are run with -O. Skip this test then.
if not __debug__:
self.skipTest('need asserts, run without -O')
self.do_disassembly_test(bug1333982, dis_bug1333982)
def test_big_linenos(self):
def func(count):
namespace = {}
func = "def foo():\n " + "".join(["\n "] * count + ["spam\n"])
exec(func, namespace)
return namespace['foo']
# Test all small ranges
for i in range(1, 300):
expected = _BIG_LINENO_FORMAT % (i + 2)
self.do_disassembly_test(func(i), expected)
# Test some larger ranges too
for i in range(300, 5000, 10):
expected = _BIG_LINENO_FORMAT % (i + 2)
self.do_disassembly_test(func(i), expected)
from test import dis_module
self.do_disassembly_test(dis_module, dis_module_expected_results)
def test_disassemble_str(self):
self.do_disassembly_test(expr_str, dis_expr_str)
self.do_disassembly_test(simple_stmt_str, dis_simple_stmt_str)
self.do_disassembly_test(annot_stmt_str, dis_annot_stmt_str)
self.do_disassembly_test(compound_stmt_str, dis_compound_stmt_str)
def test_disassemble_bytes(self):
self.do_disassembly_test(_f.__code__.co_code, dis_f_co_code)
def test_disassemble_class(self):
self.do_disassembly_test(_C, dis_c)
def test_disassemble_instance_method(self):
self.do_disassembly_test(_C(1).__init__, dis_c_instance_method)
def test_disassemble_instance_method_bytes(self):
method_bytecode = _C(1).__init__.__code__.co_code
self.do_disassembly_test(method_bytecode, dis_c_instance_method_bytes)
def test_disassemble_static_method(self):
self.do_disassembly_test(_C.sm, dis_c_static_method)
def test_disassemble_class_method(self):
self.do_disassembly_test(_C.cm, dis_c_class_method)
def test_disassemble_generator(self):
gen_func_disas = self.get_disassembly(_g) # Disassemble generator function
gen_disas = self.get_disassembly(_g(1)) # Disassemble generator itself
self.assertEqual(gen_disas, gen_func_disas)
def test_disassemble_fstring(self):
self.do_disassembly_test(_fstring, dis_fstring)
def test_dis_none(self):
try:
del sys.last_traceback
except AttributeError:
pass
self.assertRaises(RuntimeError, dis.dis, None)
def test_dis_traceback(self):
try:
del sys.last_traceback
except AttributeError:
pass
try:
1/0
except Exception as e:
tb = e.__traceback__
sys.last_traceback = tb
tb_dis = self.get_disassemble_as_string(tb.tb_frame.f_code, tb.tb_lasti)
self.do_disassembly_test(None, tb_dis)
def test_dis_object(self):
self.assertRaises(TypeError, dis.dis, object())
class DisWithFileTests(DisTests):
# Run the tests again, using the file arg instead of print
def get_disassembly(self, func, lasti=-1, wrapper=True):
output = io.StringIO()
if wrapper:
dis.dis(func, file=output)
else:
dis.disassemble(func, lasti, file=output)
return output.getvalue()
code_info_code_info = """\
Name: code_info
Filename: (.*)
Argument count: 1
Kw-only arguments: 0
Number of locals: 1
Stack size: 3
Flags: OPTIMIZED, NEWLOCALS, NOFREE
Constants:
0: %r
Names:
0: _format_code_info
1: _get_code_object
Variable names:
0: x""" % (('Formatted details of methods, functions, or code.',)
if sys.flags.optimize < 2 else (None,))
@staticmethod
def tricky(x, y, z=True, *args, c, d, e=[], **kwds):
def f(c=c):
print(x, y, z, c, d, e, f)
yield x, y, z, c, d, e, f
code_info_tricky = """\
Name: tricky
Filename: (.*)
Argument count: 3
Kw-only arguments: 3
Number of locals: 8
Stack size: 7
Flags: OPTIMIZED, NEWLOCALS, VARARGS, VARKEYWORDS, GENERATOR
Constants:
0: None
1: <code object f at (.*), file "(.*)", line (.*)>
2: 'tricky.<locals>.f'
Variable names:
0: x
1: y
2: z
3: c
4: d
5: e
6: args
7: kwds
Cell variables:
0: [edfxyz]
1: [edfxyz]
2: [edfxyz]
3: [edfxyz]
4: [edfxyz]
5: [edfxyz]"""
# NOTE: the order of the cell variables above depends on dictionary order!
co_tricky_nested_f = tricky.__func__.__code__.co_consts[1]
code_info_tricky_nested_f = """\
Name: f
Filename: (.*)
Argument count: 1
Kw-only arguments: 0
Number of locals: 1
Stack size: 8
Flags: OPTIMIZED, NEWLOCALS, NESTED
Constants:
0: None
Names:
0: print
Variable names:
0: c
Free variables:
0: [edfxyz]
1: [edfxyz]
2: [edfxyz]
3: [edfxyz]
4: [edfxyz]
5: [edfxyz]"""
code_info_expr_str = """\
Name: <module>
Filename: <disassembly>
Argument count: 0
Kw-only arguments: 0
Number of locals: 0
Stack size: 2
Flags: NOFREE
Constants:
0: 1
Names:
0: x"""
code_info_simple_stmt_str = """\
Name: <module>
Filename: <disassembly>
Argument count: 0
Kw-only arguments: 0
Number of locals: 0
Stack size: 2
Flags: NOFREE
Constants:
0: 1
1: None
Names:
0: x"""
code_info_compound_stmt_str = """\
Name: <module>
Filename: <disassembly>
Argument count: 0
Kw-only arguments: 0
Number of locals: 0
Stack size: 2
Flags: NOFREE
Constants:
0: 0
1: 1
2: None
Names:
0: x"""
async def async_def():
await 1
async for a in b: pass
async with c as d: pass
code_info_async_def = """\
Name: async_def
Filename: (.*)
Argument count: 0
Kw-only arguments: 0
Number of locals: 2
Stack size: 16
Flags: OPTIMIZED, NEWLOCALS, NOFREE, COROUTINE
Constants:
0: None
1: 1"""
class CodeInfoTests(unittest.TestCase):
test_pairs = [
(dis.code_info, code_info_code_info),
(tricky, code_info_tricky),
(co_tricky_nested_f, code_info_tricky_nested_f),
(expr_str, code_info_expr_str),
(simple_stmt_str, code_info_simple_stmt_str),
(compound_stmt_str, code_info_compound_stmt_str),
(async_def, code_info_async_def)
]
@unittest.skipIf("tiny" in cosmo.MODE, "docstrings not present")
def test_code_info(self):
self.maxDiff = 1000
for x, expected in self.test_pairs:
self.assertRegex(dis.code_info(x), expected)
@unittest.skipIf("tiny" in cosmo.MODE, "docstrings not present")
def test_show_code(self):
self.maxDiff = 1000
for x, expected in self.test_pairs:
with captured_stdout() as output:
dis.show_code(x)
self.assertRegex(output.getvalue(), expected+"\n")
output = io.StringIO()
dis.show_code(x, file=output)
self.assertRegex(output.getvalue(), expected)
def test_code_info_object(self):
self.assertRaises(TypeError, dis.code_info, object())
def test_pretty_flags_no_flags(self):
self.assertEqual(dis.pretty_flags(0), '0x0')
# Fodder for instruction introspection tests
# Editing any of these may require recalculating the expected output
def outer(a=1, b=2):
def f(c=3, d=4):
def inner(e=5, f=6):
print(a, b, c, d, e, f)
print(a, b, c, d)
return inner
print(a, b, '', 1, [], {}, "Hello world!")
return f
def jumpy():
# This won't actually run (but that's OK, we only disassemble it)
for i in range(10):
print(i)
if i < 4:
continue
if i > 6:
break
else:
print("I can haz else clause?")
while i:
print(i)
i -= 1
if i > 6:
continue
if i < 4:
break
else:
print("Who let lolcatz into this test suite?")
try:
1 / 0
except ZeroDivisionError:
print("Here we go, here we go, here we go...")
else:
with i as dodgy:
print("Never reach this")
finally:
print("OK, now we're done")
# End fodder for opinfo generation tests
expected_outer_line = 1
_line_offset = outer.__code__.co_firstlineno - 1
code_object_f = outer.__code__.co_consts[3]
expected_f_line = code_object_f.co_firstlineno - _line_offset
code_object_inner = code_object_f.co_consts[3]
expected_inner_line = code_object_inner.co_firstlineno - _line_offset
expected_jumpy_line = 1
# The following lines are useful to regenerate the expected results after
# either the fodder is modified or the bytecode generation changes
# After regeneration, update the references to code_object_f and
# code_object_inner before rerunning the tests
#_instructions = dis.get_instructions(outer, first_line=expected_outer_line)
#print('expected_opinfo_outer = [\n ',
#',\n '.join(map(str, _instructions)), ',\n]', sep='')
#_instructions = dis.get_instructions(outer(), first_line=expected_f_line)
#print('expected_opinfo_f = [\n ',
#',\n '.join(map(str, _instructions)), ',\n]', sep='')
#_instructions = dis.get_instructions(outer()(), first_line=expected_inner_line)
#print('expected_opinfo_inner = [\n ',
#',\n '.join(map(str, _instructions)), ',\n]', sep='')
#_instructions = dis.get_instructions(jumpy, first_line=expected_jumpy_line)
#print('expected_opinfo_jumpy = [\n ',
#',\n '.join(map(str, _instructions)), ',\n]', sep='')
Instruction = dis.Instruction
expected_opinfo_outer = [
Instruction(opname='LOAD_CONST', opcode=100, arg=8, argval=(3, 4), argrepr='(3, 4)', offset=0, starts_line=2, is_jump_target=False),
Instruction(opname='LOAD_CLOSURE', opcode=135, arg=0, argval='a', argrepr='a', offset=2, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_CLOSURE', opcode=135, arg=1, argval='b', argrepr='b', offset=4, starts_line=None, is_jump_target=False),
Instruction(opname='BUILD_TUPLE', opcode=102, arg=2, argval=2, argrepr='', offset=6, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_CONST', opcode=100, arg=3, argval=code_object_f, argrepr=repr(code_object_f), offset=8, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_CONST', opcode=100, arg=4, argval='outer.<locals>.f', argrepr="'outer.<locals>.f'", offset=10, starts_line=None, is_jump_target=False),
Instruction(opname='MAKE_FUNCTION', opcode=132, arg=9, argval=9, argrepr='', offset=12, starts_line=None, is_jump_target=False),
Instruction(opname='STORE_FAST', opcode=125, arg=2, argval='f', argrepr='f', offset=14, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_GLOBAL', opcode=116, arg=0, argval='print', argrepr='print', offset=16, starts_line=7, is_jump_target=False),
Instruction(opname='LOAD_DEREF', opcode=136, arg=0, argval='a', argrepr='a', offset=18, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_DEREF', opcode=136, arg=1, argval='b', argrepr='b', offset=20, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_CONST', opcode=100, arg=5, argval='', argrepr="''", offset=22, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_CONST', opcode=100, arg=6, argval=1, argrepr='1', offset=24, starts_line=None, is_jump_target=False),
Instruction(opname='BUILD_LIST', opcode=103, arg=0, argval=0, argrepr='', offset=26, starts_line=None, is_jump_target=False),
Instruction(opname='BUILD_MAP', opcode=105, arg=0, argval=0, argrepr='', offset=28, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_CONST', opcode=100, arg=7, argval='Hello world!', argrepr="'Hello world!'", offset=30, starts_line=None, is_jump_target=False),
Instruction(opname='CALL_FUNCTION', opcode=131, arg=7, argval=7, argrepr='', offset=32, starts_line=None, is_jump_target=False),
Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=34, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_FAST', opcode=124, arg=2, argval='f', argrepr='f', offset=36, starts_line=8, is_jump_target=False),
Instruction(opname='RETURN_VALUE', opcode=83, arg=None, argval=None, argrepr='', offset=38, starts_line=None, is_jump_target=False),
]
expected_opinfo_f = [
Instruction(opname='LOAD_CONST', opcode=100, arg=5, argval=(5, 6), argrepr='(5, 6)', offset=0, starts_line=3, is_jump_target=False),
Instruction(opname='LOAD_CLOSURE', opcode=135, arg=2, argval='a', argrepr='a', offset=2, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_CLOSURE', opcode=135, arg=3, argval='b', argrepr='b', offset=4, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_CLOSURE', opcode=135, arg=0, argval='c', argrepr='c', offset=6, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_CLOSURE', opcode=135, arg=1, argval='d', argrepr='d', offset=8, starts_line=None, is_jump_target=False),
Instruction(opname='BUILD_TUPLE', opcode=102, arg=4, argval=4, argrepr='', offset=10, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_CONST', opcode=100, arg=3, argval=code_object_inner, argrepr=repr(code_object_inner), offset=12, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_CONST', opcode=100, arg=4, argval='outer.<locals>.f.<locals>.inner', argrepr="'outer.<locals>.f.<locals>.inner'", offset=14, starts_line=None, is_jump_target=False),
Instruction(opname='MAKE_FUNCTION', opcode=132, arg=9, argval=9, argrepr='', offset=16, starts_line=None, is_jump_target=False),
Instruction(opname='STORE_FAST', opcode=125, arg=2, argval='inner', argrepr='inner', offset=18, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_GLOBAL', opcode=116, arg=0, argval='print', argrepr='print', offset=20, starts_line=5, is_jump_target=False),
Instruction(opname='LOAD_DEREF', opcode=136, arg=2, argval='a', argrepr='a', offset=22, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_DEREF', opcode=136, arg=3, argval='b', argrepr='b', offset=24, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_DEREF', opcode=136, arg=0, argval='c', argrepr='c', offset=26, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_DEREF', opcode=136, arg=1, argval='d', argrepr='d', offset=28, starts_line=None, is_jump_target=False),
Instruction(opname='CALL_FUNCTION', opcode=131, arg=4, argval=4, argrepr='', offset=30, starts_line=None, is_jump_target=False),
Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=32, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_FAST', opcode=124, arg=2, argval='inner', argrepr='inner', offset=34, starts_line=6, is_jump_target=False),
Instruction(opname='RETURN_VALUE', opcode=83, arg=None, argval=None, argrepr='', offset=36, starts_line=None, is_jump_target=False),
]
expected_opinfo_inner = [
Instruction(opname='LOAD_GLOBAL', opcode=116, arg=0, argval='print', argrepr='print', offset=0, starts_line=4, is_jump_target=False),
Instruction(opname='LOAD_DEREF', opcode=136, arg=0, argval='a', argrepr='a', offset=2, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_DEREF', opcode=136, arg=1, argval='b', argrepr='b', offset=4, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_DEREF', opcode=136, arg=2, argval='c', argrepr='c', offset=6, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_DEREF', opcode=136, arg=3, argval='d', argrepr='d', offset=8, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='e', argrepr='e', offset=10, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_FAST', opcode=124, arg=1, argval='f', argrepr='f', offset=12, starts_line=None, is_jump_target=False),
Instruction(opname='CALL_FUNCTION', opcode=131, arg=6, argval=6, argrepr='', offset=14, starts_line=None, is_jump_target=False),
Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=16, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_CONST', opcode=100, arg=0, argval=None, argrepr='None', offset=18, starts_line=None, is_jump_target=False),
Instruction(opname='RETURN_VALUE', opcode=83, arg=None, argval=None, argrepr='', offset=20, starts_line=None, is_jump_target=False),
]
expected_opinfo_jumpy = [
Instruction(opname='SETUP_LOOP', opcode=120, arg=52, argval=54, argrepr='to 54', offset=0, starts_line=3, is_jump_target=False),
Instruction(opname='LOAD_GLOBAL', opcode=116, arg=0, argval='range', argrepr='range', offset=2, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_CONST', opcode=100, arg=1, argval=10, argrepr='10', offset=4, starts_line=None, is_jump_target=False),
Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='', offset=6, starts_line=None, is_jump_target=False),
Instruction(opname='GET_ITER', opcode=68, arg=None, argval=None, argrepr='', offset=8, starts_line=None, is_jump_target=False),
Instruction(opname='FOR_ITER', opcode=93, arg=32, argval=44, argrepr='to 44', offset=10, starts_line=None, is_jump_target=True),
Instruction(opname='STORE_FAST', opcode=125, arg=0, argval='i', argrepr='i', offset=12, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=14, starts_line=4, is_jump_target=False),
Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=16, starts_line=None, is_jump_target=False),
Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='', offset=18, starts_line=None, is_jump_target=False),
Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=20, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=22, starts_line=5, is_jump_target=False),
Instruction(opname='LOAD_CONST', opcode=100, arg=2, argval=4, argrepr='4', offset=24, starts_line=None, is_jump_target=False),
Instruction(opname='COMPARE_OP', opcode=107, arg=0, argval='<', argrepr='<', offset=26, starts_line=None, is_jump_target=False),
Instruction(opname='POP_JUMP_IF_FALSE', opcode=114, arg=32, argval=32, argrepr='', offset=28, starts_line=None, is_jump_target=False),
Instruction(opname='JUMP_ABSOLUTE', opcode=113, arg=10, argval=10, argrepr='', offset=30, starts_line=6, is_jump_target=False),
Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=32, starts_line=7, is_jump_target=True),
Instruction(opname='LOAD_CONST', opcode=100, arg=3, argval=6, argrepr='6', offset=34, starts_line=None, is_jump_target=False),
Instruction(opname='COMPARE_OP', opcode=107, arg=4, argval='>', argrepr='>', offset=36, starts_line=None, is_jump_target=False),
Instruction(opname='POP_JUMP_IF_FALSE', opcode=114, arg=10, argval=10, argrepr='', offset=38, starts_line=None, is_jump_target=False),
Instruction(opname='BREAK_LOOP', opcode=80, arg=None, argval=None, argrepr='', offset=40, starts_line=8, is_jump_target=False),
Instruction(opname='JUMP_ABSOLUTE', opcode=113, arg=10, argval=10, argrepr='', offset=42, starts_line=None, is_jump_target=False),
Instruction(opname='POP_BLOCK', opcode=87, arg=None, argval=None, argrepr='', offset=44, starts_line=None, is_jump_target=True),
Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=46, starts_line=10, is_jump_target=False),
Instruction(opname='LOAD_CONST', opcode=100, arg=4, argval='I can haz else clause?', argrepr="'I can haz else clause?'", offset=48, starts_line=None, is_jump_target=False),
Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='', offset=50, starts_line=None, is_jump_target=False),
Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=52, starts_line=None, is_jump_target=False),
Instruction(opname='SETUP_LOOP', opcode=120, arg=52, argval=108, argrepr='to 108', offset=54, starts_line=11, is_jump_target=True),
Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=56, starts_line=None, is_jump_target=True),
Instruction(opname='POP_JUMP_IF_FALSE', opcode=114, arg=98, argval=98, argrepr='', offset=58, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=60, starts_line=12, is_jump_target=False),
Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=62, starts_line=None, is_jump_target=False),
Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='', offset=64, starts_line=None, is_jump_target=False),
Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=66, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=68, starts_line=13, is_jump_target=False),
Instruction(opname='LOAD_CONST', opcode=100, arg=5, argval=1, argrepr='1', offset=70, starts_line=None, is_jump_target=False),
Instruction(opname='INPLACE_SUBTRACT', opcode=56, arg=None, argval=None, argrepr='', offset=72, starts_line=None, is_jump_target=False),
Instruction(opname='STORE_FAST', opcode=125, arg=0, argval='i', argrepr='i', offset=74, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=76, starts_line=14, is_jump_target=False),
Instruction(opname='LOAD_CONST', opcode=100, arg=3, argval=6, argrepr='6', offset=78, starts_line=None, is_jump_target=False),
Instruction(opname='COMPARE_OP', opcode=107, arg=4, argval='>', argrepr='>', offset=80, starts_line=None, is_jump_target=False),
Instruction(opname='POP_JUMP_IF_FALSE', opcode=114, arg=86, argval=86, argrepr='', offset=82, starts_line=None, is_jump_target=False),
Instruction(opname='JUMP_ABSOLUTE', opcode=113, arg=56, argval=56, argrepr='', offset=84, starts_line=15, is_jump_target=False),
Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=86, starts_line=16, is_jump_target=True),
Instruction(opname='LOAD_CONST', opcode=100, arg=2, argval=4, argrepr='4', offset=88, starts_line=None, is_jump_target=False),
Instruction(opname='COMPARE_OP', opcode=107, arg=0, argval='<', argrepr='<', offset=90, starts_line=None, is_jump_target=False),
Instruction(opname='POP_JUMP_IF_FALSE', opcode=114, arg=56, argval=56, argrepr='', offset=92, starts_line=None, is_jump_target=False),
Instruction(opname='BREAK_LOOP', opcode=80, arg=None, argval=None, argrepr='', offset=94, starts_line=17, is_jump_target=False),
Instruction(opname='JUMP_ABSOLUTE', opcode=113, arg=56, argval=56, argrepr='', offset=96, starts_line=None, is_jump_target=False),
Instruction(opname='POP_BLOCK', opcode=87, arg=None, argval=None, argrepr='', offset=98, starts_line=None, is_jump_target=True),
Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=100, starts_line=19, is_jump_target=False),
Instruction(opname='LOAD_CONST', opcode=100, arg=6, argval='Who let lolcatz into this test suite?', argrepr="'Who let lolcatz into this test suite?'", offset=102, starts_line=None, is_jump_target=False),
Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='', offset=104, starts_line=None, is_jump_target=False),
Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=106, starts_line=None, is_jump_target=False),
Instruction(opname='SETUP_FINALLY', opcode=122, arg=70, argval=180, argrepr='to 180', offset=108, starts_line=20, is_jump_target=True),
Instruction(opname='SETUP_EXCEPT', opcode=121, arg=12, argval=124, argrepr='to 124', offset=110, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_CONST', opcode=100, arg=5, argval=1, argrepr='1', offset=112, starts_line=21, is_jump_target=False),
Instruction(opname='LOAD_CONST', opcode=100, arg=7, argval=0, argrepr='0', offset=114, starts_line=None, is_jump_target=False),
Instruction(opname='BINARY_TRUE_DIVIDE', opcode=27, arg=None, argval=None, argrepr='', offset=116, starts_line=None, is_jump_target=False),
Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=118, starts_line=None, is_jump_target=False),
Instruction(opname='POP_BLOCK', opcode=87, arg=None, argval=None, argrepr='', offset=120, starts_line=None, is_jump_target=False),
Instruction(opname='JUMP_FORWARD', opcode=110, arg=28, argval=152, argrepr='to 152', offset=122, starts_line=None, is_jump_target=False),
Instruction(opname='DUP_TOP', opcode=4, arg=None, argval=None, argrepr='', offset=124, starts_line=22, is_jump_target=True),
Instruction(opname='LOAD_GLOBAL', opcode=116, arg=2, argval='ZeroDivisionError', argrepr='ZeroDivisionError', offset=126, starts_line=None, is_jump_target=False),
Instruction(opname='COMPARE_OP', opcode=107, arg=10, argval='exception match', argrepr='exception match', offset=128, starts_line=None, is_jump_target=False),
Instruction(opname='POP_JUMP_IF_FALSE', opcode=114, arg=150, argval=150, argrepr='', offset=130, starts_line=None, is_jump_target=False),
Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=132, starts_line=None, is_jump_target=False),
Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=134, starts_line=None, is_jump_target=False),
Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=136, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=138, starts_line=23, is_jump_target=False),
Instruction(opname='LOAD_CONST', opcode=100, arg=8, argval='Here we go, here we go, here we go...', argrepr="'Here we go, here we go, here we go...'", offset=140, starts_line=None, is_jump_target=False),
Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='', offset=142, starts_line=None, is_jump_target=False),
Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=144, starts_line=None, is_jump_target=False),
Instruction(opname='POP_EXCEPT', opcode=89, arg=None, argval=None, argrepr='', offset=146, starts_line=None, is_jump_target=False),
Instruction(opname='JUMP_FORWARD', opcode=110, arg=26, argval=176, argrepr='to 176', offset=148, starts_line=None, is_jump_target=False),
Instruction(opname='END_FINALLY', opcode=88, arg=None, argval=None, argrepr='', offset=150, starts_line=None, is_jump_target=True),
Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=152, starts_line=25, is_jump_target=True),
Instruction(opname='SETUP_WITH', opcode=143, arg=14, argval=170, argrepr='to 170', offset=154, starts_line=None, is_jump_target=False),
Instruction(opname='STORE_FAST', opcode=125, arg=1, argval='dodgy', argrepr='dodgy', offset=156, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=158, starts_line=26, is_jump_target=False),
Instruction(opname='LOAD_CONST', opcode=100, arg=9, argval='Never reach this', argrepr="'Never reach this'", offset=160, starts_line=None, is_jump_target=False),
Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='', offset=162, starts_line=None, is_jump_target=False),
Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=164, starts_line=None, is_jump_target=False),
Instruction(opname='POP_BLOCK', opcode=87, arg=None, argval=None, argrepr='', offset=166, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_CONST', opcode=100, arg=0, argval=None, argrepr='None', offset=168, starts_line=None, is_jump_target=False),
Instruction(opname='WITH_CLEANUP_START', opcode=81, arg=None, argval=None, argrepr='', offset=170, starts_line=None, is_jump_target=True),
Instruction(opname='WITH_CLEANUP_FINISH', opcode=82, arg=None, argval=None, argrepr='', offset=172, starts_line=None, is_jump_target=False),
Instruction(opname='END_FINALLY', opcode=88, arg=None, argval=None, argrepr='', offset=174, starts_line=None, is_jump_target=False),
Instruction(opname='POP_BLOCK', opcode=87, arg=None, argval=None, argrepr='', offset=176, starts_line=None, is_jump_target=True),
Instruction(opname='LOAD_CONST', opcode=100, arg=0, argval=None, argrepr='None', offset=178, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=180, starts_line=28, is_jump_target=True),
Instruction(opname='LOAD_CONST', opcode=100, arg=10, argval="OK, now we're done", argrepr='"OK, now we\'re done"', offset=182, starts_line=None, is_jump_target=False),
Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='', offset=184, starts_line=None, is_jump_target=False),
Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=186, starts_line=None, is_jump_target=False),
Instruction(opname='END_FINALLY', opcode=88, arg=None, argval=None, argrepr='', offset=188, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_CONST', opcode=100, arg=0, argval=None, argrepr='None', offset=190, starts_line=None, is_jump_target=False),
Instruction(opname='RETURN_VALUE', opcode=83, arg=None, argval=None, argrepr='', offset=192, starts_line=None, is_jump_target=False),
]
# One last piece of inspect fodder to check the default line number handling
def simple(): pass
expected_opinfo_simple = [
Instruction(opname='LOAD_CONST', opcode=100, arg=0, argval=None, argrepr='None', offset=0, starts_line=simple.__code__.co_firstlineno, is_jump_target=False),
Instruction(opname='RETURN_VALUE', opcode=83, arg=None, argval=None, argrepr='', offset=2, starts_line=None, is_jump_target=False)
]
class InstructionTests(BytecodeTestCase):
def test_default_first_line(self):
actual = dis.get_instructions(simple)
self.assertEqual(list(actual), expected_opinfo_simple)
def test_first_line_set_to_None(self):
actual = dis.get_instructions(simple, first_line=None)
self.assertEqual(list(actual), expected_opinfo_simple)
def test_outer(self):
actual = dis.get_instructions(outer, first_line=expected_outer_line)
self.assertEqual(list(actual), expected_opinfo_outer)
def test_nested(self):
with captured_stdout():
f = outer()
actual = dis.get_instructions(f, first_line=expected_f_line)
self.assertEqual(list(actual), expected_opinfo_f)
def test_doubly_nested(self):
with captured_stdout():
inner = outer()()
actual = dis.get_instructions(inner, first_line=expected_inner_line)
self.assertEqual(list(actual), expected_opinfo_inner)
def test_jumpy(self):
actual = dis.get_instructions(jumpy, first_line=expected_jumpy_line)
self.assertEqual(list(actual), expected_opinfo_jumpy)
# get_instructions has its own tests above, so can rely on it to validate
# the object oriented API
class BytecodeTests(unittest.TestCase):
def test_instantiation(self):
# Test with function, method, code string and code object
for obj in [_f, _C(1).__init__, "a=1", _f.__code__]:
with self.subTest(obj=obj):
b = dis.Bytecode(obj)
self.assertIsInstance(b.codeobj, types.CodeType)
self.assertRaises(TypeError, dis.Bytecode, object())
def test_iteration(self):
for obj in [_f, _C(1).__init__, "a=1", _f.__code__]:
with self.subTest(obj=obj):
via_object = list(dis.Bytecode(obj))
via_generator = list(dis.get_instructions(obj))
self.assertEqual(via_object, via_generator)
def test_explicit_first_line(self):
actual = dis.Bytecode(outer, first_line=expected_outer_line)
self.assertEqual(list(actual), expected_opinfo_outer)
def test_source_line_in_disassembly(self):
# Use the line in the source code
actual = dis.Bytecode(simple).dis()[:3]
expected = "{:>3}".format(simple.__code__.co_firstlineno)
self.assertEqual(actual, expected)
# Use an explicit first line number
actual = dis.Bytecode(simple, first_line=350).dis()[:3]
self.assertEqual(actual, "350")
@unittest.skipIf("tiny" in cosmo.MODE, "docstrings not present")
def test_info(self):
self.maxDiff = 1000
for x, expected in CodeInfoTests.test_pairs:
b = dis.Bytecode(x)
self.assertRegex(b.info(), expected)
def test_disassembled(self):
actual = dis.Bytecode(_f).dis()
self.assertEqual(actual, dis_f)
def test_from_traceback(self):
tb = get_tb()
b = dis.Bytecode.from_traceback(tb)
while tb.tb_next: tb = tb.tb_next
self.assertEqual(b.current_offset, tb.tb_lasti)
def test_from_traceback_dis(self):
tb = get_tb()
b = dis.Bytecode.from_traceback(tb)
self.assertEqual(b.dis(), dis_traceback)
if __name__ == "__main__":
unittest.main()
| 44,846 | 970 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/keycert.passwd.pem | -----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,D134E931C96D9DEC
nuGFEej7vIjkYWSMz5OJeVTNntDRQi6ZM4DBm3g8T7i/0odr3WFqGMMKZcIhLYQf
rgRq7RSKtrJ1y5taVucMV+EuCjyfzDo0TsYt+ZrXv/D08eZhjRmkhoHnGVF0TqQm
nQEXM/ERT4J2RM78dnG+homMkI76qOqxgGbRqQqJo6AiVRcAZ45y8s96bru2TAB8
+pWjO/v0Je7AFVdwSU52N8OOY6uoSAygW+0UY1WVxbVGJF2XfRsNpPX+YQHYl6e+
3xM5XBVCgr6kmdAyub5qUJ38X3TpdVGoR0i+CVS9GTr2pSRib1zURAeeHnlqiUZM
4m0Gn9s72nJevU1wxED8pwOhR8fnHEmMKGD2HPhKoOCbzDhwwBZO27TNa1uWeM3f
M5oixKDi2PqMn3y2cDx1NjJtP661688EcJ5a2Ih9BgO9xpnhSyzBWEKcAn0tJB0H
/56M0FW6cdOOIzMveGGL7sHW5E+iOdI1n5e7C6KJUzew78Y9qJnhS53EdI6qTz9R
wsIsj1i070Fk6RbPo6zpLlF6w7Zj8GlZaZA7OZZv9wo5VEV/0ST8gmiiBOBc4C6Y
u9hyLIIu4dFEBKyQHRvBnQSLNpKx6or1OGFDVBay2In9Yh2BHh1+vOj/OIz/wq48
EHOIV27fRJxLu4jeK5LIGDhuPnMJ8AJYQ0bQOUP6fd7p+TxWkAQZPB/Dx/cs3hxr
nFEdzx+eO+IAsObx/b1EGZyEJyETBslu4GwYX7/KK3HsJhDJ1bdZ//28jOCaoir6
ZOMT72GRwmVoQTJ0XpccfjHfKJDRLT7C1xvzo4Eibth0hpTZkA75IUYUp6qK/PuJ
kH/qdiC7QIkRKtsrawW4vEDna3YtxIYhQqz9+KwO6u/0gzooZtv1RU4U3ifMDB5u
5P5GAzACRqlY8QYBkM869lvWqzQPHvybC4ak9Yx6/heMO9ddjdIW9BaK8BLxvN/6
UCD936Y4fWltt09jHZIoxWFykouBwmd7bXooNYXmDRNmjTdVhKJuOEOQw8hDzx7e
pWFJ9Z/V4Qm1tvXbCD7QFqMCDoY3qFvVG8DBqXpmxe1yPfz21FWrT7IuqDXAD3ns
vxfN/2a+Cy04U9FBNVCvWqWIs5AgNpdCMJC2FlXKTy+H3/7rIjNyFyvbX0vxIXtK
liOVNXiyVM++KZXqktqMUDlsJENmIHV9B046luqbgW018fHkyEYlL3iRZGbYegwr
XO9VVIKVPw1BEvJ8VNdGFGuZGepd8qX2ezfYADrNR+4t85HDm8inbjTobSjWuljs
ftUNkOeCHqAvWCFQTLCfdykvV08EJfVY79y7yFPtfRV2gxYokXFifjo3su9sVQr1
UiIS5ZAsIC1hBXWeXoBN7QVTkFi7Yto6E1q2k10LiT3obpUUUQ/oclhrJOCJVjrS
oRcj2QBy8OT4T9slJr5maTWdgd7Lt6+I6cGQXPaDvjGOJl0eBYM14vhx4rRQWytJ
k07hhHFO4+9CGCuHS8AAy2gR6acYFWt2ZiiNZ0z/iPIHNK4YEyy9aLf6uZH/KQjE
jmHToo7XD6QvCAEC5qTHby3o3LfHIhyZi/4L+AhS4FKUHF6M0peeyYt4z3HaK2d2
N6mHLPdjwNjra7GOmcns4gzcrdfoF+R293KpPal4PjknvR3dZL4kKP/ougTAM5zv
qDIvRbkHzjP8ChTpoLcJsNVXykNcNkjcSi0GHtIpYjh6QX6P2uvR/S4+Bbb9p9rn
hIy/ovu9tWN2hiPxGPe6torF6BulAxsTYlDercC204AyzsrdA0pr6HBgJH9C6ML1
TchwodbFJqn9rSv91i1liusAGoOvE81AGBdrXY7LxfSNhYY1IK6yR/POJPTd53sA
uX2/j6Rtoksd/2BHPM6AUnI/2B9slhuzWX2aCtWLeuwvXDS6rYuTigaQmLkzTRfM
dlMI3s9KLXxgi5YVumUZleJWXwBNP7KiKajd+VTSD+7WAhyhM5FIG5wVOaxmy4G2
TyqZ/Ax9d2VEjTQHWvQlLPQ4Mp0EIz0aEl94K/S8CK8bJRH6+PRkar+dJi1xqlL+
BYb42At9mEJ8odLlFikvNi1+t7jqXk5jRi5C0xFKx3nTtzoH2zNUeuA3R6vSocVK
45jnze9IkKmxMlJ4loR5sgszdpDCD3kXqjtCcbMTmcrGyzJek3HSOTpiEORoTFOe
Rhg6jH5lm+QcC263oipojS0qEQcnsWJP2CylNYMYHR9O/9NQxT3o2lsRHqZTMELV
uQa/SFH+paQNbZOj8MRwPSqqiIxJFuLswKte1R+W7LKn1yBSM7Pp39lNbzGvJD2E
YRfnCwFpJ54voVAuQ4jXJvigCW2qeCjXlxeD6K2j4eGJEEOmIjIW1wjubyBY6OI3
-----END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIIEWTCCAsGgAwIBAgIJAJinz4jHSjLtMA0GCSqGSIb3DQEBCwUAMF8xCzAJBgNV
BAYTAlhZMRcwFQYDVQQHDA5DYXN0bGUgQW50aHJheDEjMCEGA1UECgwaUHl0aG9u
IFNvZnR3YXJlIEZvdW5kYXRpb24xEjAQBgNVBAMMCWxvY2FsaG9zdDAeFw0xODA4
MjkxNDIzMTVaFw0yODA4MjYxNDIzMTVaMF8xCzAJBgNVBAYTAlhZMRcwFQYDVQQH
DA5DYXN0bGUgQW50aHJheDEjMCEGA1UECgwaUHl0aG9uIFNvZnR3YXJlIEZvdW5k
YXRpb24xEjAQBgNVBAMMCWxvY2FsaG9zdDCCAaIwDQYJKoZIhvcNAQEBBQADggGP
ADCCAYoCggGBALKUqUtopT6E68kN+uJNEt34i2EbmG/bwjcD8IaMsgJPSsMO2Bpd
3S6qWgkCeOyCfmAwBxK2kNbxGb63ouysEv7l8GCTJTWv3hG/HQcejJpnAEGi6K1U
fDbyE/db6yZ12SoHVTGkadN4vYGCPd1Wj9ZO1F877SHQ8rDWX3xgTWkxN2ojBw44
T8RHSDiG8D/CvG4uEy+VUszL+Uvny5y2poNSqvI3J56sptWSrh8nIIbkPZPBdUne
LYMOHTFK3ZjXSmhlXgziTxK71nnzM3Y9K9gxPnRqoXbvu/wFo55hQCkETiRkYgmm
jXcBMZ0TClQVnQWuLjMthRnWFZs4Lfmwqjs7FZD/61581R2BYehvpWbLvvuOJhwv
DFzexL2sXcAl7SsxbzeQKRHqGbIDfbnQTXfs3/VC6Ye5P82P2ucj+XC32N9piRmO
gCBP8L3ub+YzzdxikZN2gZXXE2jsb3QyE/R2LkWdWyshpKe+RsZP1SBRbHShUyOh
yJ90baoiEwj2mwIDAQABoxgwFjAUBgNVHREEDTALgglsb2NhbGhvc3QwDQYJKoZI
hvcNAQELBQADggGBAHRUO/UIHl3jXQENewYayHxkIx8t7nu40iO2DXbicSijz5bo
5//xAB6RxhBAlsDBehgQP1uoZg+WJW+nHu3CIVOU3qZNZRaozxiCl2UFKcNqLOmx
R3NKpo1jYf4REQIeG8Yw9+hSWLRbshNteP6bKUUf+vanhg9+axyOEOH/iOQvgk/m
b8wA8wNa4ujWljPbTQnj7ry8RqhTM0GcAN5LSdSvcKcpzLcs3aYwh+Z8e30sQWna
F40sa5u7izgBTOrwpcDm/w5kC46vpRQ5fnbshVw6pne2by0mdMECASid/p25N103
jMqTFlmO7kpf/jpCSmamp3/JSEE1BJKHwQ6Ql4nzRA2N1mnvWH7Zxcv043gkHeAu
0x8evpvwuhdIyproejNFlBpKmW8OX7yKTCPPMC/VkX8Q1rVkxU0DQ6hmvwZlhoKa
9Wc2uXpw9xF8itV4Uvcdr3dwqByvIqn7iI/gB+4l41e0u8OmH2MKOx4Nxlly5TNW
HcVKQHyOeyvnINuBAQ==
-----END CERTIFICATE-----
| 4,101 | 69 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_htmlparser.py | """Tests for HTMLParser.py."""
import html.parser
import pprint
import unittest
class EventCollector(html.parser.HTMLParser):
def __init__(self, *args, **kw):
self.events = []
self.append = self.events.append
html.parser.HTMLParser.__init__(self, *args, **kw)
def get_events(self):
# Normalize the list of events so that buffer artefacts don't
# separate runs of contiguous characters.
L = []
prevtype = None
for event in self.events:
type = event[0]
if type == prevtype == "data":
L[-1] = ("data", L[-1][1] + event[1])
else:
L.append(event)
prevtype = type
self.events = L
return L
# structure markup
def handle_starttag(self, tag, attrs):
self.append(("starttag", tag, attrs))
def handle_startendtag(self, tag, attrs):
self.append(("startendtag", tag, attrs))
def handle_endtag(self, tag):
self.append(("endtag", tag))
# all other markup
def handle_comment(self, data):
self.append(("comment", data))
def handle_charref(self, data):
self.append(("charref", data))
def handle_data(self, data):
self.append(("data", data))
def handle_decl(self, data):
self.append(("decl", data))
def handle_entityref(self, data):
self.append(("entityref", data))
def handle_pi(self, data):
self.append(("pi", data))
def unknown_decl(self, decl):
self.append(("unknown decl", decl))
class EventCollectorExtra(EventCollector):
def handle_starttag(self, tag, attrs):
EventCollector.handle_starttag(self, tag, attrs)
self.append(("starttag_text", self.get_starttag_text()))
class EventCollectorCharrefs(EventCollector):
def handle_charref(self, data):
self.fail('This should never be called with convert_charrefs=True')
def handle_entityref(self, data):
self.fail('This should never be called with convert_charrefs=True')
class TestCaseBase(unittest.TestCase):
def get_collector(self):
return EventCollector(convert_charrefs=False)
def _run_check(self, source, expected_events, collector=None):
if collector is None:
collector = self.get_collector()
parser = collector
for s in source:
parser.feed(s)
parser.close()
events = parser.get_events()
if events != expected_events:
self.fail("received events did not match expected events" +
"\nSource:\n" + repr(source) +
"\nExpected:\n" + pprint.pformat(expected_events) +
"\nReceived:\n" + pprint.pformat(events))
def _run_check_extra(self, source, events):
self._run_check(source, events,
EventCollectorExtra(convert_charrefs=False))
class HTMLParserTestCase(TestCaseBase):
def test_processing_instruction_only(self):
self._run_check("<?processing instruction>", [
("pi", "processing instruction"),
])
self._run_check("<?processing instruction ?>", [
("pi", "processing instruction ?"),
])
def test_simple_html(self):
self._run_check("""
<!DOCTYPE html PUBLIC 'foo'>
<HTML>&entity; 
<!--comment1a
-></foo><bar><<?pi?></foo<bar
comment1b-->
<Img sRc='Bar' isMAP>sample
text
“
<!--comment2a-- --comment2b-->
</Html>
""", [
("data", "\n"),
("decl", "DOCTYPE html PUBLIC 'foo'"),
("data", "\n"),
("starttag", "html", []),
("entityref", "entity"),
("charref", "32"),
("data", "\n"),
("comment", "comment1a\n-></foo><bar><<?pi?></foo<bar\ncomment1b"),
("data", "\n"),
("starttag", "img", [("src", "Bar"), ("ismap", None)]),
("data", "sample\ntext\n"),
("charref", "x201C"),
("data", "\n"),
("comment", "comment2a-- --comment2b"),
("data", "\n"),
("endtag", "html"),
("data", "\n"),
])
def test_malformatted_charref(self):
self._run_check("<p>&#bad;</p>", [
("starttag", "p", []),
("data", "&#bad;"),
("endtag", "p"),
])
# add the [] as a workaround to avoid buffering (see #20288)
self._run_check(["<div>&#bad;</div>"], [
("starttag", "div", []),
("data", "&#bad;"),
("endtag", "div"),
])
def test_unclosed_entityref(self):
self._run_check("&entityref foo", [
("entityref", "entityref"),
("data", " foo"),
])
def test_bad_nesting(self):
# Strangely, this *is* supposed to test that overlapping
# elements are allowed. HTMLParser is more geared toward
# lexing the input that parsing the structure.
self._run_check("<a><b></a></b>", [
("starttag", "a", []),
("starttag", "b", []),
("endtag", "a"),
("endtag", "b"),
])
def test_bare_ampersands(self):
self._run_check("this text & contains & ampersands &", [
("data", "this text & contains & ampersands &"),
])
def test_bare_pointy_brackets(self):
self._run_check("this < text > contains < bare>pointy< brackets", [
("data", "this < text > contains < bare>pointy< brackets"),
])
def test_starttag_end_boundary(self):
self._run_check("""<a b='<'>""", [("starttag", "a", [("b", "<")])])
self._run_check("""<a b='>'>""", [("starttag", "a", [("b", ">")])])
def test_buffer_artefacts(self):
output = [("starttag", "a", [("b", "<")])]
self._run_check(["<a b='<'>"], output)
self._run_check(["<a ", "b='<'>"], output)
self._run_check(["<a b", "='<'>"], output)
self._run_check(["<a b=", "'<'>"], output)
self._run_check(["<a b='<", "'>"], output)
self._run_check(["<a b='<'", ">"], output)
output = [("starttag", "a", [("b", ">")])]
self._run_check(["<a b='>'>"], output)
self._run_check(["<a ", "b='>'>"], output)
self._run_check(["<a b", "='>'>"], output)
self._run_check(["<a b=", "'>'>"], output)
self._run_check(["<a b='>", "'>"], output)
self._run_check(["<a b='>'", ">"], output)
output = [("comment", "abc")]
self._run_check(["", "<!--abc-->"], output)
self._run_check(["<", "!--abc-->"], output)
self._run_check(["<!", "--abc-->"], output)
self._run_check(["<!-", "-abc-->"], output)
self._run_check(["<!--", "abc-->"], output)
self._run_check(["<!--a", "bc-->"], output)
self._run_check(["<!--ab", "c-->"], output)
self._run_check(["<!--abc", "-->"], output)
self._run_check(["<!--abc-", "->"], output)
self._run_check(["<!--abc--", ">"], output)
self._run_check(["<!--abc-->", ""], output)
def test_valid_doctypes(self):
# from http://www.w3.org/QA/2002/04/valid-dtd-list.html
dtds = ['HTML', # HTML5 doctype
('HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" '
'"http://www.w3.org/TR/html4/strict.dtd"'),
('HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" '
'"http://www.w3.org/TR/html4/loose.dtd"'),
('html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" '
'"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"'),
('html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" '
'"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"'),
('math PUBLIC "-//W3C//DTD MathML 2.0//EN" '
'"http://www.w3.org/Math/DTD/mathml2/mathml2.dtd"'),
('html PUBLIC "-//W3C//DTD '
'XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" '
'"http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"'),
('svg PUBLIC "-//W3C//DTD SVG 1.1//EN" '
'"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"'),
'html PUBLIC "-//IETF//DTD HTML 2.0//EN"',
'html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"']
for dtd in dtds:
self._run_check("<!DOCTYPE %s>" % dtd,
[('decl', 'DOCTYPE ' + dtd)])
def test_startendtag(self):
self._run_check("<p/>", [
("startendtag", "p", []),
])
self._run_check("<p></p>", [
("starttag", "p", []),
("endtag", "p"),
])
self._run_check("<p><img src='foo' /></p>", [
("starttag", "p", []),
("startendtag", "img", [("src", "foo")]),
("endtag", "p"),
])
def test_get_starttag_text(self):
s = """<foo:bar \n one="1"\ttwo=2 >"""
self._run_check_extra(s, [
("starttag", "foo:bar", [("one", "1"), ("two", "2")]),
("starttag_text", s)])
def test_cdata_content(self):
contents = [
'<!-- not a comment --> ¬-an-entity-ref;',
"<not a='start tag'>",
'<a href="" /> <p> <span></span>',
'foo = "</scr" + "ipt>";',
'foo = "</SCRIPT" + ">";',
'foo = <\n/script> ',
'<!-- document.write("</scr" + "ipt>"); -->',
('\n//<![CDATA[\n'
'document.write(\'<s\'+\'cript type="text/javascript" '
'src="http://www.example.org/r=\'+new '
'Date().getTime()+\'"><\\/s\'+\'cript>\');\n//]]>'),
'\n<!-- //\nvar foo = 3.14;\n// -->\n',
'foo = "</sty" + "le>";',
'<!-- \u2603 -->',
# these two should be invalid according to the HTML 5 spec,
# section 8.1.2.2
#'foo = </\nscript>',
#'foo = </ script>',
]
elements = ['script', 'style', 'SCRIPT', 'STYLE', 'Script', 'Style']
for content in contents:
for element in elements:
element_lower = element.lower()
s = '<{element}>{content}</{element}>'.format(element=element,
content=content)
self._run_check(s, [("starttag", element_lower, []),
("data", content),
("endtag", element_lower)])
def test_cdata_with_closing_tags(self):
# see issue #13358
# make sure that HTMLParser calls handle_data only once for each CDATA.
# The normal event collector normalizes the events in get_events,
# so we override it to return the original list of events.
class Collector(EventCollector):
def get_events(self):
return self.events
content = """<!-- not a comment --> ¬-an-entity-ref;
<a href="" /> </p><p> <span></span></style>
'</script' + '>'"""
for element in [' script', 'script ', ' script ',
'\nscript', 'script\n', '\nscript\n']:
element_lower = element.lower().strip()
s = '<script>{content}</{element}>'.format(element=element,
content=content)
self._run_check(s, [("starttag", element_lower, []),
("data", content),
("endtag", element_lower)],
collector=Collector(convert_charrefs=False))
def test_comments(self):
html = ("<!-- I'm a valid comment -->"
'<!--me too!-->'
'<!------>'
'<!---->'
'<!----I have many hyphens---->'
'<!-- I have a > in the middle -->'
'<!-- and I have -- in the middle! -->')
expected = [('comment', " I'm a valid comment "),
('comment', 'me too!'),
('comment', '--'),
('comment', ''),
('comment', '--I have many hyphens--'),
('comment', ' I have a > in the middle '),
('comment', ' and I have -- in the middle! ')]
self._run_check(html, expected)
def test_condcoms(self):
html = ('<!--[if IE & !(lte IE 8)]>aren\'t<![endif]-->'
'<!--[if IE 8]>condcoms<![endif]-->'
'<!--[if lte IE 7]>pretty?<![endif]-->')
expected = [('comment', "[if IE & !(lte IE 8)]>aren't<![endif]"),
('comment', '[if IE 8]>condcoms<![endif]'),
('comment', '[if lte IE 7]>pretty?<![endif]')]
self._run_check(html, expected)
def test_convert_charrefs(self):
# default value for convert_charrefs is now True
collector = lambda: EventCollectorCharrefs()
self.assertTrue(collector().convert_charrefs)
charrefs = ['"', '"', '"', '"', '"', '"']
# check charrefs in the middle of the text/attributes
expected = [('starttag', 'a', [('href', 'foo"zar')]),
('data', 'a"z'), ('endtag', 'a')]
for charref in charrefs:
self._run_check('<a href="foo{0}zar">a{0}z</a>'.format(charref),
expected, collector=collector())
# check charrefs at the beginning/end of the text/attributes
expected = [('data', '"'),
('starttag', 'a', [('x', '"'), ('y', '"X'), ('z', 'X"')]),
('data', '"'), ('endtag', 'a'), ('data', '"')]
for charref in charrefs:
self._run_check('{0}<a x="{0}" y="{0}X" z="X{0}">'
'{0}</a>{0}'.format(charref),
expected, collector=collector())
# check charrefs in <script>/<style> elements
for charref in charrefs:
text = 'X'.join([charref]*3)
expected = [('data', '"'),
('starttag', 'script', []), ('data', text),
('endtag', 'script'), ('data', '"'),
('starttag', 'style', []), ('data', text),
('endtag', 'style'), ('data', '"')]
self._run_check('{1}<script>{0}</script>{1}'
'<style>{0}</style>{1}'.format(text, charref),
expected, collector=collector())
# check truncated charrefs at the end of the file
html = '&quo &# &#x'
for x in range(1, len(html)):
self._run_check(html[:x], [('data', html[:x])],
collector=collector())
# check a string with no charrefs
self._run_check('no charrefs here', [('data', 'no charrefs here')],
collector=collector())
# the remaining tests were for the "tolerant" parser (which is now
# the default), and check various kind of broken markup
def test_tolerant_parsing(self):
self._run_check('<html <html>te>>xt&a<<bc</a></html>\n'
'<img src="URL><//img></html</html>', [
('starttag', 'html', [('<html', None)]),
('data', 'te>>xt'),
('entityref', 'a'),
('data', '<'),
('starttag', 'bc<', [('a', None)]),
('endtag', 'html'),
('data', '\n<img src="URL>'),
('comment', '/img'),
('endtag', 'html<')])
def test_starttag_junk_chars(self):
self._run_check("</>", [])
self._run_check("</$>", [('comment', '$')])
self._run_check("</", [('data', '</')])
self._run_check("</a", [('data', '</a')])
self._run_check("<a<a>", [('starttag', 'a<a', [])])
self._run_check("</a<a>", [('endtag', 'a<a')])
self._run_check("<!", [('data', '<!')])
self._run_check("<a", [('data', '<a')])
self._run_check("<a foo='bar'", [('data', "<a foo='bar'")])
self._run_check("<a foo='bar", [('data', "<a foo='bar")])
self._run_check("<a foo='>'", [('data', "<a foo='>'")])
self._run_check("<a foo='>", [('data', "<a foo='>")])
self._run_check("<a$>", [('starttag', 'a$', [])])
self._run_check("<a$b>", [('starttag', 'a$b', [])])
self._run_check("<a$b/>", [('startendtag', 'a$b', [])])
self._run_check("<a$b >", [('starttag', 'a$b', [])])
self._run_check("<a$b />", [('startendtag', 'a$b', [])])
def test_slashes_in_starttag(self):
self._run_check('<a foo="var"/>', [('startendtag', 'a', [('foo', 'var')])])
html = ('<img width=902 height=250px '
'src="/sites/default/files/images/homepage/foo.jpg" '
'/*what am I doing here*/ />')
expected = [(
'startendtag', 'img',
[('width', '902'), ('height', '250px'),
('src', '/sites/default/files/images/homepage/foo.jpg'),
('*what', None), ('am', None), ('i', None),
('doing', None), ('here*', None)]
)]
self._run_check(html, expected)
html = ('<a / /foo/ / /=/ / /bar/ / />'
'<a / /foo/ / /=/ / /bar/ / >')
expected = [
('startendtag', 'a', [('foo', None), ('=', None), ('bar', None)]),
('starttag', 'a', [('foo', None), ('=', None), ('bar', None)])
]
self._run_check(html, expected)
#see issue #14538
html = ('<meta><meta / ><meta // ><meta / / >'
'<meta/><meta /><meta //><meta//>')
expected = [
('starttag', 'meta', []), ('starttag', 'meta', []),
('starttag', 'meta', []), ('starttag', 'meta', []),
('startendtag', 'meta', []), ('startendtag', 'meta', []),
('startendtag', 'meta', []), ('startendtag', 'meta', []),
]
self._run_check(html, expected)
def test_declaration_junk_chars(self):
self._run_check("<!DOCTYPE foo $ >", [('decl', 'DOCTYPE foo $ ')])
def test_illegal_declarations(self):
self._run_check('<!spacer type="block" height="25">',
[('comment', 'spacer type="block" height="25"')])
def test_with_unquoted_attributes(self):
# see #12008
html = ("<html><body bgcolor=d0ca90 text='181008'>"
"<table cellspacing=0 cellpadding=1 width=100% ><tr>"
"<td align=left><font size=-1>"
"- <a href=/rabota/><span class=en> software-and-i</span></a>"
"- <a href='/1/'><span class=en> library</span></a></table>")
expected = [
('starttag', 'html', []),
('starttag', 'body', [('bgcolor', 'd0ca90'), ('text', '181008')]),
('starttag', 'table',
[('cellspacing', '0'), ('cellpadding', '1'), ('width', '100%')]),
('starttag', 'tr', []),
('starttag', 'td', [('align', 'left')]),
('starttag', 'font', [('size', '-1')]),
('data', '- '), ('starttag', 'a', [('href', '/rabota/')]),
('starttag', 'span', [('class', 'en')]), ('data', ' software-and-i'),
('endtag', 'span'), ('endtag', 'a'),
('data', '- '), ('starttag', 'a', [('href', '/1/')]),
('starttag', 'span', [('class', 'en')]), ('data', ' library'),
('endtag', 'span'), ('endtag', 'a'), ('endtag', 'table')
]
self._run_check(html, expected)
def test_comma_between_attributes(self):
self._run_check('<form action="/xxx.php?a=1&b=2&", '
'method="post">', [
('starttag', 'form',
[('action', '/xxx.php?a=1&b=2&'),
(',', None), ('method', 'post')])])
def test_weird_chars_in_unquoted_attribute_values(self):
self._run_check('<form action=bogus|&#()value>', [
('starttag', 'form',
[('action', 'bogus|&#()value')])])
def test_invalid_end_tags(self):
# A collection of broken end tags. <br> is used as separator.
# see http://www.w3.org/TR/html5/tokenization.html#end-tag-open-state
# and #13993
html = ('<br></label</p><br></div end tmAd-leaderBoard><br></<h4><br>'
'</li class="unit"><br></li\r\n\t\t\t\t\t\t</ul><br></><br>')
expected = [('starttag', 'br', []),
# < is part of the name, / is discarded, p is an attribute
('endtag', 'label<'),
('starttag', 'br', []),
# text and attributes are discarded
('endtag', 'div'),
('starttag', 'br', []),
# comment because the first char after </ is not a-zA-Z
('comment', '<h4'),
('starttag', 'br', []),
# attributes are discarded
('endtag', 'li'),
('starttag', 'br', []),
# everything till ul (included) is discarded
('endtag', 'li'),
('starttag', 'br', []),
# </> is ignored
('starttag', 'br', [])]
self._run_check(html, expected)
def test_broken_invalid_end_tag(self):
# This is technically wrong (the "> shouldn't be included in the 'data')
# but is probably not worth fixing it (in addition to all the cases of
# the previous test, it would require a full attribute parsing).
# see #13993
html = '<b>This</b attr=">"> confuses the parser'
expected = [('starttag', 'b', []),
('data', 'This'),
('endtag', 'b'),
('data', '"> confuses the parser')]
self._run_check(html, expected)
def test_correct_detection_of_start_tags(self):
# see #13273
html = ('<div style="" ><b>The <a href="some_url">rain</a> '
'<br /> in <span>Spain</span></b></div>')
expected = [
('starttag', 'div', [('style', '')]),
('starttag', 'b', []),
('data', 'The '),
('starttag', 'a', [('href', 'some_url')]),
('data', 'rain'),
('endtag', 'a'),
('data', ' '),
('startendtag', 'br', []),
('data', ' in '),
('starttag', 'span', []),
('data', 'Spain'),
('endtag', 'span'),
('endtag', 'b'),
('endtag', 'div')
]
self._run_check(html, expected)
html = '<div style="", foo = "bar" ><b>The <a href="some_url">rain</a>'
expected = [
('starttag', 'div', [('style', ''), (',', None), ('foo', 'bar')]),
('starttag', 'b', []),
('data', 'The '),
('starttag', 'a', [('href', 'some_url')]),
('data', 'rain'),
('endtag', 'a'),
]
self._run_check(html, expected)
def test_EOF_in_charref(self):
# see #17802
# This test checks that the UnboundLocalError reported in the issue
# is not raised, however I'm not sure the returned values are correct.
# Maybe HTMLParser should use self.unescape for these
data = [
('a&', [('data', 'a&')]),
('a&b', [('data', 'ab')]),
('a&b ', [('data', 'a'), ('entityref', 'b'), ('data', ' ')]),
('a&b;', [('data', 'a'), ('entityref', 'b')]),
]
for html, expected in data:
self._run_check(html, expected)
def test_unescape_method(self):
from html import unescape
p = self.get_collector()
with self.assertWarns(DeprecationWarning):
s = '""""""&#bad;'
self.assertEqual(p.unescape(s), unescape(s))
def test_broken_comments(self):
html = ('<! not really a comment >'
'<! not a comment either -->'
'<! -- close enough -->'
'<!><!<-- this was an empty comment>'
'<!!! another bogus comment !!!>')
expected = [
('comment', ' not really a comment '),
('comment', ' not a comment either --'),
('comment', ' -- close enough --'),
('comment', ''),
('comment', '<-- this was an empty comment'),
('comment', '!! another bogus comment !!!'),
]
self._run_check(html, expected)
def test_broken_condcoms(self):
# these condcoms are missing the '--' after '<!' and before the '>'
html = ('<![if !(IE)]>broken condcom<![endif]>'
'<![if ! IE]><link href="favicon.tiff"/><![endif]>'
'<![if !IE 6]><img src="firefox.png" /><![endif]>'
'<![if !ie 6]><b>foo</b><![endif]>'
'<![if (!IE)|(lt IE 9)]><img src="mammoth.bmp" /><![endif]>')
# According to the HTML5 specs sections "8.2.4.44 Bogus comment state"
# and "8.2.4.45 Markup declaration open state", comment tokens should
# be emitted instead of 'unknown decl', but calling unknown_decl
# provides more flexibility.
# See also Lib/_markupbase.py:parse_declaration
expected = [
('unknown decl', 'if !(IE)'),
('data', 'broken condcom'),
('unknown decl', 'endif'),
('unknown decl', 'if ! IE'),
('startendtag', 'link', [('href', 'favicon.tiff')]),
('unknown decl', 'endif'),
('unknown decl', 'if !IE 6'),
('startendtag', 'img', [('src', 'firefox.png')]),
('unknown decl', 'endif'),
('unknown decl', 'if !ie 6'),
('starttag', 'b', []),
('data', 'foo'),
('endtag', 'b'),
('unknown decl', 'endif'),
('unknown decl', 'if (!IE)|(lt IE 9)'),
('startendtag', 'img', [('src', 'mammoth.bmp')]),
('unknown decl', 'endif')
]
self._run_check(html, expected)
def test_convert_charrefs_dropped_text(self):
# #23144: make sure that all the events are triggered when
# convert_charrefs is True, even if we don't call .close()
parser = EventCollector(convert_charrefs=True)
# before the fix, bar & baz was missing
parser.feed("foo <a>link</a> bar & baz")
self.assertEqual(
parser.get_events(),
[('data', 'foo '), ('starttag', 'a', []), ('data', 'link'),
('endtag', 'a'), ('data', ' bar & baz')]
)
class AttributesTestCase(TestCaseBase):
def test_attr_syntax(self):
output = [
("starttag", "a", [("b", "v"), ("c", "v"), ("d", "v"), ("e", None)])
]
self._run_check("""<a b='v' c="v" d=v e>""", output)
self._run_check("""<a b = 'v' c = "v" d = v e>""", output)
self._run_check("""<a\nb\n=\n'v'\nc\n=\n"v"\nd\n=\nv\ne>""", output)
self._run_check("""<a\tb\t=\t'v'\tc\t=\t"v"\td\t=\tv\te>""", output)
def test_attr_values(self):
self._run_check("""<a b='xxx\n\txxx' c="yyy\t\nyyy" d='\txyz\n'>""",
[("starttag", "a", [("b", "xxx\n\txxx"),
("c", "yyy\t\nyyy"),
("d", "\txyz\n")])])
self._run_check("""<a b='' c="">""",
[("starttag", "a", [("b", ""), ("c", "")])])
# Regression test for SF patch #669683.
self._run_check("<e a=rgb(1,2,3)>",
[("starttag", "e", [("a", "rgb(1,2,3)")])])
# Regression test for SF bug #921657.
self._run_check(
"<a href=mailto:[email protected]>",
[("starttag", "a", [("href", "mailto:[email protected]")])])
def test_attr_nonascii(self):
# see issue 7311
self._run_check(
"<img src=/foo/bar.png alt=\u4e2d\u6587>",
[("starttag", "img", [("src", "/foo/bar.png"),
("alt", "\u4e2d\u6587")])])
self._run_check(
"<a title='\u30c6\u30b9\u30c8' href='\u30c6\u30b9\u30c8.html'>",
[("starttag", "a", [("title", "\u30c6\u30b9\u30c8"),
("href", "\u30c6\u30b9\u30c8.html")])])
self._run_check(
'<a title="\u30c6\u30b9\u30c8" href="\u30c6\u30b9\u30c8.html">',
[("starttag", "a", [("title", "\u30c6\u30b9\u30c8"),
("href", "\u30c6\u30b9\u30c8.html")])])
def test_attr_entity_replacement(self):
self._run_check(
"<a b='&><"''>",
[("starttag", "a", [("b", "&><\"'")])])
def test_attr_funky_names(self):
self._run_check(
"<a a.b='v' c:d=v e-f=v>",
[("starttag", "a", [("a.b", "v"), ("c:d", "v"), ("e-f", "v")])])
def test_entityrefs_in_attributes(self):
self._run_check(
"<html foo='€&aa&unsupported;'>",
[("starttag", "html", [("foo", "\u20AC&aa&unsupported;")])])
def test_attr_funky_names2(self):
self._run_check(
r"<a $><b $=%><c \=/>",
[("starttag", "a", [("$", None)]),
("starttag", "b", [("$", "%")]),
("starttag", "c", [("\\", "/")])])
def test_entities_in_attribute_value(self):
# see #1200313
for entity in ['&', '&', '&', '&']:
self._run_check('<a href="%s">' % entity,
[("starttag", "a", [("href", "&")])])
self._run_check("<a href='%s'>" % entity,
[("starttag", "a", [("href", "&")])])
self._run_check("<a href=%s>" % entity,
[("starttag", "a", [("href", "&")])])
def test_malformed_attributes(self):
# see #13357
html = (
"<a href=test'style='color:red;bad1'>test - bad1</a>"
"<a href=test'+style='color:red;ba2'>test - bad2</a>"
"<a href=test' style='color:red;bad3'>test - bad3</a>"
"<a href = test' style='color:red;bad4' >test - bad4</a>"
)
expected = [
('starttag', 'a', [('href', "test'style='color:red;bad1'")]),
('data', 'test - bad1'), ('endtag', 'a'),
('starttag', 'a', [('href', "test'+style='color:red;ba2'")]),
('data', 'test - bad2'), ('endtag', 'a'),
('starttag', 'a', [('href', "test'\xa0style='color:red;bad3'")]),
('data', 'test - bad3'), ('endtag', 'a'),
('starttag', 'a', [('href', "test'\xa0style='color:red;bad4'")]),
('data', 'test - bad4'), ('endtag', 'a')
]
self._run_check(html, expected)
def test_malformed_adjacent_attributes(self):
# see #12629
self._run_check('<x><y z=""o"" /></x>',
[('starttag', 'x', []),
('startendtag', 'y', [('z', ''), ('o""', None)]),
('endtag', 'x')])
self._run_check('<x><y z="""" /></x>',
[('starttag', 'x', []),
('startendtag', 'y', [('z', ''), ('""', None)]),
('endtag', 'x')])
# see #755670 for the following 3 tests
def test_adjacent_attributes(self):
self._run_check('<a width="100%"cellspacing=0>',
[("starttag", "a",
[("width", "100%"), ("cellspacing","0")])])
self._run_check('<a id="foo"class="bar">',
[("starttag", "a",
[("id", "foo"), ("class","bar")])])
def test_missing_attribute_value(self):
self._run_check('<a v=>',
[("starttag", "a", [("v", "")])])
def test_javascript_attribute_value(self):
self._run_check("<a href=javascript:popup('/popup/help.html')>",
[("starttag", "a",
[("href", "javascript:popup('/popup/help.html')")])])
def test_end_tag_in_attribute_value(self):
# see #1745761
self._run_check("<a href='http://www.example.org/\">;'>spam</a>",
[("starttag", "a",
[("href", "http://www.example.org/\">;")]),
("data", "spam"), ("endtag", "a")])
if __name__ == "__main__":
unittest.main()
| 32,698 | 779 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_mailbox.py | import os
import sys
import time
import stat
import socket
import email
import email.message
import re
import io
import tempfile
from test import support
import unittest
import textwrap
import mailbox
import glob
class TestBase:
all_mailbox_types = (mailbox.Message, mailbox.MaildirMessage,
mailbox.mboxMessage, mailbox.MHMessage,
mailbox.BabylMessage, mailbox.MMDFMessage)
def _check_sample(self, msg):
# Inspect a mailbox.Message representation of the sample message
self.assertIsInstance(msg, email.message.Message)
self.assertIsInstance(msg, mailbox.Message)
for key, value in _sample_headers.items():
self.assertIn(value, msg.get_all(key))
self.assertTrue(msg.is_multipart())
self.assertEqual(len(msg.get_payload()), len(_sample_payloads))
for i, payload in enumerate(_sample_payloads):
part = msg.get_payload(i)
self.assertIsInstance(part, email.message.Message)
self.assertNotIsInstance(part, mailbox.Message)
self.assertEqual(part.get_payload(), payload)
def _delete_recursively(self, target):
# Delete a file or delete a directory recursively
if os.path.isdir(target):
support.rmtree(target)
elif os.path.exists(target):
support.unlink(target)
class TestMailbox(TestBase):
maxDiff = None
_factory = None # Overridden by subclasses to reuse tests
_template = 'From: foo\n\n%s\n'
def setUp(self):
self._path = support.TESTFN
self._delete_recursively(self._path)
self._box = self._factory(self._path)
def tearDown(self):
self._box.close()
self._delete_recursively(self._path)
def test_add(self):
# Add copies of a sample message
keys = []
keys.append(self._box.add(self._template % 0))
self.assertEqual(len(self._box), 1)
keys.append(self._box.add(mailbox.Message(_sample_message)))
self.assertEqual(len(self._box), 2)
keys.append(self._box.add(email.message_from_string(_sample_message)))
self.assertEqual(len(self._box), 3)
keys.append(self._box.add(io.BytesIO(_bytes_sample_message)))
self.assertEqual(len(self._box), 4)
keys.append(self._box.add(_sample_message))
self.assertEqual(len(self._box), 5)
keys.append(self._box.add(_bytes_sample_message))
self.assertEqual(len(self._box), 6)
with self.assertWarns(DeprecationWarning):
keys.append(self._box.add(
io.TextIOWrapper(io.BytesIO(_bytes_sample_message))))
self.assertEqual(len(self._box), 7)
self.assertEqual(self._box.get_string(keys[0]), self._template % 0)
for i in (1, 2, 3, 4, 5, 6):
self._check_sample(self._box[keys[i]])
_nonascii_msg = textwrap.dedent("""\
From: foo
Subject: Falinaptár házhozszállÃtással. Már rendeltél?
0
""")
def test_add_invalid_8bit_bytes_header(self):
key = self._box.add(self._nonascii_msg.encode('latin-1'))
self.assertEqual(len(self._box), 1)
self.assertEqual(self._box.get_bytes(key),
self._nonascii_msg.encode('latin-1'))
def test_invalid_nonascii_header_as_string(self):
subj = self._nonascii_msg.splitlines()[1]
key = self._box.add(subj.encode('latin-1'))
self.assertEqual(self._box.get_string(key),
'Subject: =?unknown-8bit?b?RmFsaW5hcHThciBo4Xpob3pzeuFsbO104XNz'
'YWwuIE3hciByZW5kZWx06Ww/?=\n\n')
def test_add_nonascii_string_header_raises(self):
with self.assertRaisesRegex(ValueError, "ASCII-only"):
self._box.add(self._nonascii_msg)
self._box.flush()
self.assertEqual(len(self._box), 0)
self.assertMailboxEmpty()
def test_add_that_raises_leaves_mailbox_empty(self):
def raiser(*args, **kw):
raise Exception("a fake error")
support.patch(self, email.generator.BytesGenerator, 'flatten', raiser)
with self.assertRaises(Exception):
self._box.add(email.message_from_string("From: Alphöso"))
self.assertEqual(len(self._box), 0)
self._box.close()
self.assertMailboxEmpty()
_non_latin_bin_msg = textwrap.dedent("""\
From: [email protected]
To: báz
Subject: Maintenant je vous présente mon collègue, le pouf célèbre
\tJean de Baddie
Mime-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Ðа, они леÑÑÑ.
""").encode('utf-8')
def test_add_8bit_body(self):
key = self._box.add(self._non_latin_bin_msg)
self.assertEqual(self._box.get_bytes(key),
self._non_latin_bin_msg)
with self._box.get_file(key) as f:
self.assertEqual(f.read(),
self._non_latin_bin_msg.replace(b'\n',
os.linesep.encode()))
self.assertEqual(self._box[key].get_payload(),
"Ðа, они леÑÑÑ.\n")
def test_add_binary_file(self):
with tempfile.TemporaryFile('wb+') as f:
f.write(_bytes_sample_message)
f.seek(0)
key = self._box.add(f)
self.assertEqual(self._box.get_bytes(key).split(b'\n'),
_bytes_sample_message.split(b'\n'))
def test_add_binary_nonascii_file(self):
with tempfile.TemporaryFile('wb+') as f:
f.write(self._non_latin_bin_msg)
f.seek(0)
key = self._box.add(f)
self.assertEqual(self._box.get_bytes(key).split(b'\n'),
self._non_latin_bin_msg.split(b'\n'))
def test_add_text_file_warns(self):
with tempfile.TemporaryFile('w+') as f:
f.write(_sample_message)
f.seek(0)
with self.assertWarns(DeprecationWarning):
key = self._box.add(f)
self.assertEqual(self._box.get_bytes(key).split(b'\n'),
_bytes_sample_message.split(b'\n'))
def test_add_StringIO_warns(self):
with self.assertWarns(DeprecationWarning):
key = self._box.add(io.StringIO(self._template % "0"))
self.assertEqual(self._box.get_string(key), self._template % "0")
def test_add_nonascii_StringIO_raises(self):
with self.assertWarns(DeprecationWarning):
with self.assertRaisesRegex(ValueError, "ASCII-only"):
self._box.add(io.StringIO(self._nonascii_msg))
self.assertEqual(len(self._box), 0)
self._box.close()
self.assertMailboxEmpty()
def test_remove(self):
# Remove messages using remove()
self._test_remove_or_delitem(self._box.remove)
def test_delitem(self):
# Remove messages using __delitem__()
self._test_remove_or_delitem(self._box.__delitem__)
def _test_remove_or_delitem(self, method):
# (Used by test_remove() and test_delitem().)
key0 = self._box.add(self._template % 0)
key1 = self._box.add(self._template % 1)
self.assertEqual(len(self._box), 2)
method(key0)
self.assertEqual(len(self._box), 1)
self.assertRaises(KeyError, lambda: self._box[key0])
self.assertRaises(KeyError, lambda: method(key0))
self.assertEqual(self._box.get_string(key1), self._template % 1)
key2 = self._box.add(self._template % 2)
self.assertEqual(len(self._box), 2)
method(key2)
self.assertEqual(len(self._box), 1)
self.assertRaises(KeyError, lambda: self._box[key2])
self.assertRaises(KeyError, lambda: method(key2))
self.assertEqual(self._box.get_string(key1), self._template % 1)
method(key1)
self.assertEqual(len(self._box), 0)
self.assertRaises(KeyError, lambda: self._box[key1])
self.assertRaises(KeyError, lambda: method(key1))
def test_discard(self, repetitions=10):
# Discard messages
key0 = self._box.add(self._template % 0)
key1 = self._box.add(self._template % 1)
self.assertEqual(len(self._box), 2)
self._box.discard(key0)
self.assertEqual(len(self._box), 1)
self.assertRaises(KeyError, lambda: self._box[key0])
self._box.discard(key0)
self.assertEqual(len(self._box), 1)
self.assertRaises(KeyError, lambda: self._box[key0])
def test_get(self):
# Retrieve messages using get()
key0 = self._box.add(self._template % 0)
msg = self._box.get(key0)
self.assertEqual(msg['from'], 'foo')
self.assertEqual(msg.get_payload(), '0\n')
self.assertIsNone(self._box.get('foo'))
self.assertIs(self._box.get('foo', False), False)
self._box.close()
self._box = self._factory(self._path)
key1 = self._box.add(self._template % 1)
msg = self._box.get(key1)
self.assertEqual(msg['from'], 'foo')
self.assertEqual(msg.get_payload(), '1\n')
def test_getitem(self):
# Retrieve message using __getitem__()
key0 = self._box.add(self._template % 0)
msg = self._box[key0]
self.assertEqual(msg['from'], 'foo')
self.assertEqual(msg.get_payload(), '0\n')
self.assertRaises(KeyError, lambda: self._box['foo'])
self._box.discard(key0)
self.assertRaises(KeyError, lambda: self._box[key0])
def test_get_message(self):
# Get Message representations of messages
key0 = self._box.add(self._template % 0)
key1 = self._box.add(_sample_message)
msg0 = self._box.get_message(key0)
self.assertIsInstance(msg0, mailbox.Message)
self.assertEqual(msg0['from'], 'foo')
self.assertEqual(msg0.get_payload(), '0\n')
self._check_sample(self._box.get_message(key1))
def test_get_bytes(self):
# Get bytes representations of messages
key0 = self._box.add(self._template % 0)
key1 = self._box.add(_sample_message)
self.assertEqual(self._box.get_bytes(key0),
(self._template % 0).encode('ascii'))
self.assertEqual(self._box.get_bytes(key1), _bytes_sample_message)
def test_get_string(self):
# Get string representations of messages
key0 = self._box.add(self._template % 0)
key1 = self._box.add(_sample_message)
self.assertEqual(self._box.get_string(key0), self._template % 0)
self.assertEqual(self._box.get_string(key1).split('\n'),
_sample_message.split('\n'))
def test_get_file(self):
# Get file representations of messages
key0 = self._box.add(self._template % 0)
key1 = self._box.add(_sample_message)
with self._box.get_file(key0) as file:
data0 = file.read()
with self._box.get_file(key1) as file:
data1 = file.read()
self.assertEqual(data0.decode('ascii').replace(os.linesep, '\n'),
self._template % 0)
self.assertEqual(data1.decode('ascii').replace(os.linesep, '\n'),
_sample_message)
def test_get_file_can_be_closed_twice(self):
# Issue 11700
key = self._box.add(_sample_message)
f = self._box.get_file(key)
f.close()
f.close()
def test_iterkeys(self):
# Get keys using iterkeys()
self._check_iteration(self._box.iterkeys, do_keys=True, do_values=False)
def test_keys(self):
# Get keys using keys()
self._check_iteration(self._box.keys, do_keys=True, do_values=False)
def test_itervalues(self):
# Get values using itervalues()
self._check_iteration(self._box.itervalues, do_keys=False,
do_values=True)
def test_iter(self):
# Get values using __iter__()
self._check_iteration(self._box.__iter__, do_keys=False,
do_values=True)
def test_values(self):
# Get values using values()
self._check_iteration(self._box.values, do_keys=False, do_values=True)
def test_iteritems(self):
# Get keys and values using iteritems()
self._check_iteration(self._box.iteritems, do_keys=True,
do_values=True)
def test_items(self):
# Get keys and values using items()
self._check_iteration(self._box.items, do_keys=True, do_values=True)
def _check_iteration(self, method, do_keys, do_values, repetitions=10):
for value in method():
self.fail("Not empty")
keys, values = [], []
for i in range(repetitions):
keys.append(self._box.add(self._template % i))
values.append(self._template % i)
if do_keys and not do_values:
returned_keys = list(method())
elif do_values and not do_keys:
returned_values = list(method())
else:
returned_keys, returned_values = [], []
for key, value in method():
returned_keys.append(key)
returned_values.append(value)
if do_keys:
self.assertEqual(len(keys), len(returned_keys))
self.assertEqual(set(keys), set(returned_keys))
if do_values:
count = 0
for value in returned_values:
self.assertEqual(value['from'], 'foo')
self.assertLess(int(value.get_payload()), repetitions)
count += 1
self.assertEqual(len(values), count)
def test_contains(self):
# Check existence of keys using __contains__()
self.assertNotIn('foo', self._box)
key0 = self._box.add(self._template % 0)
self.assertIn(key0, self._box)
self.assertNotIn('foo', self._box)
key1 = self._box.add(self._template % 1)
self.assertIn(key1, self._box)
self.assertIn(key0, self._box)
self.assertNotIn('foo', self._box)
self._box.remove(key0)
self.assertNotIn(key0, self._box)
self.assertIn(key1, self._box)
self.assertNotIn('foo', self._box)
self._box.remove(key1)
self.assertNotIn(key1, self._box)
self.assertNotIn(key0, self._box)
self.assertNotIn('foo', self._box)
def test_len(self, repetitions=10):
# Get message count
keys = []
for i in range(repetitions):
self.assertEqual(len(self._box), i)
keys.append(self._box.add(self._template % i))
self.assertEqual(len(self._box), i + 1)
for i in range(repetitions):
self.assertEqual(len(self._box), repetitions - i)
self._box.remove(keys[i])
self.assertEqual(len(self._box), repetitions - i - 1)
def test_set_item(self):
# Modify messages using __setitem__()
key0 = self._box.add(self._template % 'original 0')
self.assertEqual(self._box.get_string(key0),
self._template % 'original 0')
key1 = self._box.add(self._template % 'original 1')
self.assertEqual(self._box.get_string(key1),
self._template % 'original 1')
self._box[key0] = self._template % 'changed 0'
self.assertEqual(self._box.get_string(key0),
self._template % 'changed 0')
self._box[key1] = self._template % 'changed 1'
self.assertEqual(self._box.get_string(key1),
self._template % 'changed 1')
self._box[key0] = _sample_message
self._check_sample(self._box[key0])
self._box[key1] = self._box[key0]
self._check_sample(self._box[key1])
self._box[key0] = self._template % 'original 0'
self.assertEqual(self._box.get_string(key0),
self._template % 'original 0')
self._check_sample(self._box[key1])
self.assertRaises(KeyError,
lambda: self._box.__setitem__('foo', 'bar'))
self.assertRaises(KeyError, lambda: self._box['foo'])
self.assertEqual(len(self._box), 2)
def test_clear(self, iterations=10):
# Remove all messages using clear()
keys = []
for i in range(iterations):
self._box.add(self._template % i)
for i, key in enumerate(keys):
self.assertEqual(self._box.get_string(key), self._template % i)
self._box.clear()
self.assertEqual(len(self._box), 0)
for i, key in enumerate(keys):
self.assertRaises(KeyError, lambda: self._box.get_string(key))
def test_pop(self):
# Get and remove a message using pop()
key0 = self._box.add(self._template % 0)
self.assertIn(key0, self._box)
key1 = self._box.add(self._template % 1)
self.assertIn(key1, self._box)
self.assertEqual(self._box.pop(key0).get_payload(), '0\n')
self.assertNotIn(key0, self._box)
self.assertIn(key1, self._box)
key2 = self._box.add(self._template % 2)
self.assertIn(key2, self._box)
self.assertEqual(self._box.pop(key2).get_payload(), '2\n')
self.assertNotIn(key2, self._box)
self.assertIn(key1, self._box)
self.assertEqual(self._box.pop(key1).get_payload(), '1\n')
self.assertNotIn(key1, self._box)
self.assertEqual(len(self._box), 0)
def test_popitem(self, iterations=10):
# Get and remove an arbitrary (key, message) using popitem()
keys = []
for i in range(10):
keys.append(self._box.add(self._template % i))
seen = []
for i in range(10):
key, msg = self._box.popitem()
self.assertIn(key, keys)
self.assertNotIn(key, seen)
seen.append(key)
self.assertEqual(int(msg.get_payload()), keys.index(key))
self.assertEqual(len(self._box), 0)
for key in keys:
self.assertRaises(KeyError, lambda: self._box[key])
def test_update(self):
# Modify multiple messages using update()
key0 = self._box.add(self._template % 'original 0')
key1 = self._box.add(self._template % 'original 1')
key2 = self._box.add(self._template % 'original 2')
self._box.update({key0: self._template % 'changed 0',
key2: _sample_message})
self.assertEqual(len(self._box), 3)
self.assertEqual(self._box.get_string(key0),
self._template % 'changed 0')
self.assertEqual(self._box.get_string(key1),
self._template % 'original 1')
self._check_sample(self._box[key2])
self._box.update([(key2, self._template % 'changed 2'),
(key1, self._template % 'changed 1'),
(key0, self._template % 'original 0')])
self.assertEqual(len(self._box), 3)
self.assertEqual(self._box.get_string(key0),
self._template % 'original 0')
self.assertEqual(self._box.get_string(key1),
self._template % 'changed 1')
self.assertEqual(self._box.get_string(key2),
self._template % 'changed 2')
self.assertRaises(KeyError,
lambda: self._box.update({'foo': 'bar',
key0: self._template % "changed 0"}))
self.assertEqual(len(self._box), 3)
self.assertEqual(self._box.get_string(key0),
self._template % "changed 0")
self.assertEqual(self._box.get_string(key1),
self._template % "changed 1")
self.assertEqual(self._box.get_string(key2),
self._template % "changed 2")
def test_flush(self):
# Write changes to disk
self._test_flush_or_close(self._box.flush, True)
def test_popitem_and_flush_twice(self):
# See #15036.
self._box.add(self._template % 0)
self._box.add(self._template % 1)
self._box.flush()
self._box.popitem()
self._box.flush()
self._box.popitem()
self._box.flush()
def test_lock_unlock(self):
# Lock and unlock the mailbox
self.assertFalse(os.path.exists(self._get_lock_path()))
self._box.lock()
self.assertTrue(os.path.exists(self._get_lock_path()))
self._box.unlock()
self.assertFalse(os.path.exists(self._get_lock_path()))
def test_close(self):
# Close mailbox and flush changes to disk
self._test_flush_or_close(self._box.close, False)
def _test_flush_or_close(self, method, should_call_close):
contents = [self._template % i for i in range(3)]
self._box.add(contents[0])
self._box.add(contents[1])
self._box.add(contents[2])
oldbox = self._box
method()
if should_call_close:
self._box.close()
self._box = self._factory(self._path)
keys = self._box.keys()
self.assertEqual(len(keys), 3)
for key in keys:
self.assertIn(self._box.get_string(key), contents)
oldbox.close()
def test_dump_message(self):
# Write message representations to disk
for input in (email.message_from_string(_sample_message),
_sample_message, io.BytesIO(_bytes_sample_message)):
output = io.BytesIO()
self._box._dump_message(input, output)
self.assertEqual(output.getvalue(),
_bytes_sample_message.replace(b'\n', os.linesep.encode()))
output = io.BytesIO()
self.assertRaises(TypeError,
lambda: self._box._dump_message(None, output))
def _get_lock_path(self):
# Return the path of the dot lock file. May be overridden.
return self._path + '.lock'
class TestMailboxSuperclass(TestBase, unittest.TestCase):
def test_notimplemented(self):
# Test that all Mailbox methods raise NotImplementedException.
box = mailbox.Mailbox('path')
self.assertRaises(NotImplementedError, lambda: box.add(''))
self.assertRaises(NotImplementedError, lambda: box.remove(''))
self.assertRaises(NotImplementedError, lambda: box.__delitem__(''))
self.assertRaises(NotImplementedError, lambda: box.discard(''))
self.assertRaises(NotImplementedError, lambda: box.__setitem__('', ''))
self.assertRaises(NotImplementedError, lambda: box.iterkeys())
self.assertRaises(NotImplementedError, lambda: box.keys())
self.assertRaises(NotImplementedError, lambda: box.itervalues().__next__())
self.assertRaises(NotImplementedError, lambda: box.__iter__().__next__())
self.assertRaises(NotImplementedError, lambda: box.values())
self.assertRaises(NotImplementedError, lambda: box.iteritems().__next__())
self.assertRaises(NotImplementedError, lambda: box.items())
self.assertRaises(NotImplementedError, lambda: box.get(''))
self.assertRaises(NotImplementedError, lambda: box.__getitem__(''))
self.assertRaises(NotImplementedError, lambda: box.get_message(''))
self.assertRaises(NotImplementedError, lambda: box.get_string(''))
self.assertRaises(NotImplementedError, lambda: box.get_bytes(''))
self.assertRaises(NotImplementedError, lambda: box.get_file(''))
self.assertRaises(NotImplementedError, lambda: '' in box)
self.assertRaises(NotImplementedError, lambda: box.__contains__(''))
self.assertRaises(NotImplementedError, lambda: box.__len__())
self.assertRaises(NotImplementedError, lambda: box.clear())
self.assertRaises(NotImplementedError, lambda: box.pop(''))
self.assertRaises(NotImplementedError, lambda: box.popitem())
self.assertRaises(NotImplementedError, lambda: box.update((('', ''),)))
self.assertRaises(NotImplementedError, lambda: box.flush())
self.assertRaises(NotImplementedError, lambda: box.lock())
self.assertRaises(NotImplementedError, lambda: box.unlock())
self.assertRaises(NotImplementedError, lambda: box.close())
class TestMaildir(TestMailbox, unittest.TestCase):
_factory = lambda self, path, factory=None: mailbox.Maildir(path, factory)
def setUp(self):
TestMailbox.setUp(self)
if (os.name == 'nt') or (sys.platform == 'cygwin'):
self._box.colon = '!'
def assertMailboxEmpty(self):
self.assertEqual(os.listdir(os.path.join(self._path, 'tmp')), [])
def test_add_MM(self):
# Add a MaildirMessage instance
msg = mailbox.MaildirMessage(self._template % 0)
msg.set_subdir('cur')
msg.set_info('foo')
key = self._box.add(msg)
self.assertTrue(os.path.exists(os.path.join(self._path, 'cur', '%s%sfoo' %
(key, self._box.colon))))
def test_get_MM(self):
# Get a MaildirMessage instance
msg = mailbox.MaildirMessage(self._template % 0)
msg.set_subdir('cur')
msg.set_flags('RF')
key = self._box.add(msg)
msg_returned = self._box.get_message(key)
self.assertIsInstance(msg_returned, mailbox.MaildirMessage)
self.assertEqual(msg_returned.get_subdir(), 'cur')
self.assertEqual(msg_returned.get_flags(), 'FR')
def test_set_MM(self):
# Set with a MaildirMessage instance
msg0 = mailbox.MaildirMessage(self._template % 0)
msg0.set_flags('TP')
key = self._box.add(msg0)
msg_returned = self._box.get_message(key)
self.assertEqual(msg_returned.get_subdir(), 'new')
self.assertEqual(msg_returned.get_flags(), 'PT')
msg1 = mailbox.MaildirMessage(self._template % 1)
self._box[key] = msg1
msg_returned = self._box.get_message(key)
self.assertEqual(msg_returned.get_subdir(), 'new')
self.assertEqual(msg_returned.get_flags(), '')
self.assertEqual(msg_returned.get_payload(), '1\n')
msg2 = mailbox.MaildirMessage(self._template % 2)
msg2.set_info('2,S')
self._box[key] = msg2
self._box[key] = self._template % 3
msg_returned = self._box.get_message(key)
self.assertEqual(msg_returned.get_subdir(), 'new')
self.assertEqual(msg_returned.get_flags(), 'S')
self.assertEqual(msg_returned.get_payload(), '3\n')
def test_consistent_factory(self):
# Add a message.
msg = mailbox.MaildirMessage(self._template % 0)
msg.set_subdir('cur')
msg.set_flags('RF')
key = self._box.add(msg)
# Create new mailbox with
class FakeMessage(mailbox.MaildirMessage):
pass
box = mailbox.Maildir(self._path, factory=FakeMessage)
box.colon = self._box.colon
msg2 = box.get_message(key)
self.assertIsInstance(msg2, FakeMessage)
def test_initialize_new(self):
# Initialize a non-existent mailbox
self.tearDown()
self._box = mailbox.Maildir(self._path)
self._check_basics()
self._delete_recursively(self._path)
self._box = self._factory(self._path, factory=None)
self._check_basics()
def test_initialize_existing(self):
# Initialize an existing mailbox
self.tearDown()
for subdir in '', 'tmp', 'new', 'cur':
os.mkdir(os.path.normpath(os.path.join(self._path, subdir)))
self._box = mailbox.Maildir(self._path)
self._check_basics()
def _check_basics(self, factory=None):
# (Used by test_open_new() and test_open_existing().)
self.assertEqual(self._box._path, os.path.abspath(self._path))
self.assertEqual(self._box._factory, factory)
for subdir in '', 'tmp', 'new', 'cur':
path = os.path.join(self._path, subdir)
mode = os.stat(path)[stat.ST_MODE]
self.assertTrue(stat.S_ISDIR(mode), "Not a directory: '%s'" % path)
def test_list_folders(self):
# List folders
self._box.add_folder('one')
self._box.add_folder('two')
self._box.add_folder('three')
self.assertEqual(len(self._box.list_folders()), 3)
self.assertEqual(set(self._box.list_folders()),
set(('one', 'two', 'three')))
def test_get_folder(self):
# Open folders
self._box.add_folder('foo.bar')
folder0 = self._box.get_folder('foo.bar')
folder0.add(self._template % 'bar')
self.assertTrue(os.path.isdir(os.path.join(self._path, '.foo.bar')))
folder1 = self._box.get_folder('foo.bar')
self.assertEqual(folder1.get_string(folder1.keys()[0]),
self._template % 'bar')
def test_add_and_remove_folders(self):
# Delete folders
self._box.add_folder('one')
self._box.add_folder('two')
self.assertEqual(len(self._box.list_folders()), 2)
self.assertEqual(set(self._box.list_folders()), set(('one', 'two')))
self._box.remove_folder('one')
self.assertEqual(len(self._box.list_folders()), 1)
self.assertEqual(set(self._box.list_folders()), set(('two',)))
self._box.add_folder('three')
self.assertEqual(len(self._box.list_folders()), 2)
self.assertEqual(set(self._box.list_folders()), set(('two', 'three')))
self._box.remove_folder('three')
self.assertEqual(len(self._box.list_folders()), 1)
self.assertEqual(set(self._box.list_folders()), set(('two',)))
self._box.remove_folder('two')
self.assertEqual(len(self._box.list_folders()), 0)
self.assertEqual(self._box.list_folders(), [])
def test_clean(self):
# Remove old files from 'tmp'
foo_path = os.path.join(self._path, 'tmp', 'foo')
bar_path = os.path.join(self._path, 'tmp', 'bar')
with open(foo_path, 'w') as f:
f.write("@")
with open(bar_path, 'w') as f:
f.write("@")
self._box.clean()
self.assertTrue(os.path.exists(foo_path))
self.assertTrue(os.path.exists(bar_path))
foo_stat = os.stat(foo_path)
os.utime(foo_path, (time.time() - 129600 - 2,
foo_stat.st_mtime))
self._box.clean()
self.assertFalse(os.path.exists(foo_path))
self.assertTrue(os.path.exists(bar_path))
def test_create_tmp(self, repetitions=10):
# Create files in tmp directory
hostname = socket.gethostname()
if '/' in hostname:
hostname = hostname.replace('/', r'\057')
if ':' in hostname:
hostname = hostname.replace(':', r'\072')
pid = os.getpid()
pattern = re.compile(r"(?P<time>\d+)\.M(?P<M>\d{1,6})P(?P<P>\d+)"
r"Q(?P<Q>\d+)\.(?P<host>[^:/]*)")
previous_groups = None
for x in range(repetitions):
tmp_file = self._box._create_tmp()
head, tail = os.path.split(tmp_file.name)
self.assertEqual(head, os.path.abspath(os.path.join(self._path,
"tmp")),
"File in wrong location: '%s'" % head)
match = pattern.match(tail)
self.assertIsNotNone(match, "Invalid file name: '%s'" % tail)
groups = match.groups()
if previous_groups is not None:
self.assertGreaterEqual(int(groups[0]), int(previous_groups[0]),
"Non-monotonic seconds: '%s' before '%s'" %
(previous_groups[0], groups[0]))
if int(groups[0]) == int(previous_groups[0]):
self.assertGreaterEqual(int(groups[1]), int(previous_groups[1]),
"Non-monotonic milliseconds: '%s' before '%s'" %
(previous_groups[1], groups[1]))
self.assertEqual(int(groups[2]), pid,
"Process ID mismatch: '%s' should be '%s'" %
(groups[2], pid))
self.assertEqual(int(groups[3]), int(previous_groups[3]) + 1,
"Non-sequential counter: '%s' before '%s'" %
(previous_groups[3], groups[3]))
self.assertEqual(groups[4], hostname,
"Host name mismatch: '%s' should be '%s'" %
(groups[4], hostname))
previous_groups = groups
tmp_file.write(_bytes_sample_message)
tmp_file.seek(0)
self.assertEqual(tmp_file.read(), _bytes_sample_message)
tmp_file.close()
file_count = len(os.listdir(os.path.join(self._path, "tmp")))
self.assertEqual(file_count, repetitions,
"Wrong file count: '%s' should be '%s'" %
(file_count, repetitions))
def test_refresh(self):
# Update the table of contents
self.assertEqual(self._box._toc, {})
key0 = self._box.add(self._template % 0)
key1 = self._box.add(self._template % 1)
self.assertEqual(self._box._toc, {})
self._box._refresh()
self.assertEqual(self._box._toc, {key0: os.path.join('new', key0),
key1: os.path.join('new', key1)})
key2 = self._box.add(self._template % 2)
self.assertEqual(self._box._toc, {key0: os.path.join('new', key0),
key1: os.path.join('new', key1)})
self._box._refresh()
self.assertEqual(self._box._toc, {key0: os.path.join('new', key0),
key1: os.path.join('new', key1),
key2: os.path.join('new', key2)})
def test_refresh_after_safety_period(self):
# Issue #13254: Call _refresh after the "file system safety
# period" of 2 seconds has passed; _toc should still be
# updated because this is the first call to _refresh.
key0 = self._box.add(self._template % 0)
key1 = self._box.add(self._template % 1)
self._box = self._factory(self._path)
self.assertEqual(self._box._toc, {})
# Emulate sleeping. Instead of sleeping for 2 seconds, use the
# skew factor to make _refresh think that the filesystem
# safety period has passed and re-reading the _toc is only
# required if mtimes differ.
self._box._skewfactor = -3
self._box._refresh()
self.assertEqual(sorted(self._box._toc.keys()), sorted([key0, key1]))
def test_lookup(self):
# Look up message subpaths in the TOC
self.assertRaises(KeyError, lambda: self._box._lookup('foo'))
key0 = self._box.add(self._template % 0)
self.assertEqual(self._box._lookup(key0), os.path.join('new', key0))
os.remove(os.path.join(self._path, 'new', key0))
self.assertEqual(self._box._toc, {key0: os.path.join('new', key0)})
# Be sure that the TOC is read back from disk (see issue #6896
# about bad mtime behaviour on some systems).
self._box.flush()
self.assertRaises(KeyError, lambda: self._box._lookup(key0))
self.assertEqual(self._box._toc, {})
def test_lock_unlock(self):
# Lock and unlock the mailbox. For Maildir, this does nothing.
self._box.lock()
self._box.unlock()
def test_folder (self):
# Test for bug #1569790: verify that folders returned by .get_folder()
# use the same factory function.
def dummy_factory (s):
return None
box = self._factory(self._path, factory=dummy_factory)
folder = box.add_folder('folder1')
self.assertIs(folder._factory, dummy_factory)
folder1_alias = box.get_folder('folder1')
self.assertIs(folder1_alias._factory, dummy_factory)
def test_directory_in_folder (self):
# Test that mailboxes still work if there's a stray extra directory
# in a folder.
for i in range(10):
self._box.add(mailbox.Message(_sample_message))
# Create a stray directory
os.mkdir(os.path.join(self._path, 'cur', 'stray-dir'))
# Check that looping still works with the directory present.
for msg in self._box:
pass
@unittest.skipUnless(hasattr(os, 'umask'), 'test needs os.umask()')
@unittest.skipUnless(hasattr(os, 'stat'), 'test needs os.stat()')
def test_file_permissions(self):
# Verify that message files are created without execute permissions
msg = mailbox.MaildirMessage(self._template % 0)
orig_umask = os.umask(0)
try:
key = self._box.add(msg)
finally:
os.umask(orig_umask)
path = os.path.join(self._path, self._box._lookup(key))
mode = os.stat(path).st_mode
self.assertFalse(mode & 0o111)
@unittest.skipUnless(hasattr(os, 'umask'), 'test needs os.umask()')
@unittest.skipUnless(hasattr(os, 'stat'), 'test needs os.stat()')
def test_folder_file_perms(self):
# From bug #3228, we want to verify that the file created inside a Maildir
# subfolder isn't marked as executable.
orig_umask = os.umask(0)
try:
subfolder = self._box.add_folder('subfolder')
finally:
os.umask(orig_umask)
path = os.path.join(subfolder._path, 'maildirfolder')
st = os.stat(path)
perms = st.st_mode
self.assertFalse((perms & 0o111)) # Execute bits should all be off.
def test_reread(self):
# Do an initial unconditional refresh
self._box._refresh()
# Put the last modified times more than two seconds into the past
# (because mtime may have a two second granularity)
for subdir in ('cur', 'new'):
os.utime(os.path.join(self._box._path, subdir),
(time.time()-5,)*2)
# Because mtime has a two second granularity in worst case (FAT), a
# refresh is done unconditionally if called for within
# two-second-plus-a-bit of the last one, just in case the mbox has
# changed; so now we have to wait for that interval to expire.
#
# Because this is a test, emulate sleeping. Instead of
# sleeping for 2 seconds, use the skew factor to make _refresh
# think that 2 seconds have passed and re-reading the _toc is
# only required if mtimes differ.
self._box._skewfactor = -3
# Re-reading causes the ._toc attribute to be assigned a new dictionary
# object, so we'll check that the ._toc attribute isn't a different
# object.
orig_toc = self._box._toc
def refreshed():
return self._box._toc is not orig_toc
self._box._refresh()
self.assertFalse(refreshed())
# Now, write something into cur and remove it. This changes
# the mtime and should cause a re-read. Note that "sleep
# emulation" is still in effect, as skewfactor is -3.
filename = os.path.join(self._path, 'cur', 'stray-file')
support.create_empty_file(filename)
os.unlink(filename)
self._box._refresh()
self.assertTrue(refreshed())
class _TestSingleFile(TestMailbox):
'''Common tests for single-file mailboxes'''
def test_add_doesnt_rewrite(self):
# When only adding messages, flush() should not rewrite the
# mailbox file. See issue #9559.
# Inode number changes if the contents are written to another
# file which is then renamed over the original file. So we
# must check that the inode number doesn't change.
inode_before = os.stat(self._path).st_ino
self._box.add(self._template % 0)
self._box.flush()
inode_after = os.stat(self._path).st_ino
self.assertEqual(inode_before, inode_after)
# Make sure the message was really added
self._box.close()
self._box = self._factory(self._path)
self.assertEqual(len(self._box), 1)
def test_permissions_after_flush(self):
# See issue #5346
# Make the mailbox world writable. It's unlikely that the new
# mailbox file would have these permissions after flush(),
# because umask usually prevents it.
mode = os.stat(self._path).st_mode | 0o666
os.chmod(self._path, mode)
self._box.add(self._template % 0)
i = self._box.add(self._template % 1)
# Need to remove one message to make flush() create a new file
self._box.remove(i)
self._box.flush()
self.assertEqual(os.stat(self._path).st_mode, mode)
class _TestMboxMMDF(_TestSingleFile):
def tearDown(self):
super().tearDown()
self._box.close()
self._delete_recursively(self._path)
for lock_remnant in glob.glob(self._path + '.*'):
support.unlink(lock_remnant)
def assertMailboxEmpty(self):
with open(self._path) as f:
self.assertEqual(f.readlines(), [])
def test_add_from_string(self):
# Add a string starting with 'From ' to the mailbox
key = self._box.add('From foo@bar blah\nFrom: foo\n\n0\n')
self.assertEqual(self._box[key].get_from(), 'foo@bar blah')
self.assertEqual(self._box[key].get_payload(), '0\n')
def test_add_from_bytes(self):
# Add a byte string starting with 'From ' to the mailbox
key = self._box.add(b'From foo@bar blah\nFrom: foo\n\n0\n')
self.assertEqual(self._box[key].get_from(), 'foo@bar blah')
self.assertEqual(self._box[key].get_payload(), '0\n')
def test_add_mbox_or_mmdf_message(self):
# Add an mboxMessage or MMDFMessage
for class_ in (mailbox.mboxMessage, mailbox.MMDFMessage):
msg = class_('From foo@bar blah\nFrom: foo\n\n0\n')
key = self._box.add(msg)
def test_open_close_open(self):
# Open and inspect previously-created mailbox
values = [self._template % i for i in range(3)]
for value in values:
self._box.add(value)
self._box.close()
mtime = os.path.getmtime(self._path)
self._box = self._factory(self._path)
self.assertEqual(len(self._box), 3)
for key in self._box.iterkeys():
self.assertIn(self._box.get_string(key), values)
self._box.close()
self.assertEqual(mtime, os.path.getmtime(self._path))
def test_add_and_close(self):
# Verifying that closing a mailbox doesn't change added items
self._box.add(_sample_message)
for i in range(3):
self._box.add(self._template % i)
self._box.add(_sample_message)
self._box._file.flush()
self._box._file.seek(0)
contents = self._box._file.read()
self._box.close()
with open(self._path, 'rb') as f:
self.assertEqual(contents, f.read())
self._box = self._factory(self._path)
@unittest.skipUnless(hasattr(os, 'fork'), "Test needs fork().")
@unittest.skipUnless(hasattr(socket, 'socketpair'), "Test needs socketpair().")
def test_lock_conflict(self):
# Fork off a child process that will lock the mailbox temporarily,
# unlock it and exit.
c, p = socket.socketpair()
self.addCleanup(c.close)
self.addCleanup(p.close)
pid = os.fork()
if pid == 0:
# child
try:
# lock the mailbox, and signal the parent it can proceed
self._box.lock()
c.send(b'c')
# wait until the parent is done, and unlock the mailbox
c.recv(1)
self._box.unlock()
finally:
os._exit(0)
# In the parent, wait until the child signals it locked the mailbox.
p.recv(1)
try:
self.assertRaises(mailbox.ExternalClashError,
self._box.lock)
finally:
# Signal the child it can now release the lock and exit.
p.send(b'p')
# Wait for child to exit. Locking should now succeed.
exited_pid, status = os.waitpid(pid, 0)
self._box.lock()
self._box.unlock()
def test_relock(self):
# Test case for bug #1575506: the mailbox class was locking the
# wrong file object in its flush() method.
msg = "Subject: sub\n\nbody\n"
key1 = self._box.add(msg)
self._box.flush()
self._box.close()
self._box = self._factory(self._path)
self._box.lock()
key2 = self._box.add(msg)
self._box.flush()
self.assertTrue(self._box._locked)
self._box.close()
class TestMbox(_TestMboxMMDF, unittest.TestCase):
_factory = lambda self, path, factory=None: mailbox.mbox(path, factory)
@unittest.skipUnless(hasattr(os, 'umask'), 'test needs os.umask()')
@unittest.skipUnless(hasattr(os, 'stat'), 'test needs os.stat()')
def test_file_perms(self):
# From bug #3228, we want to verify that the mailbox file isn't executable,
# even if the umask is set to something that would leave executable bits set.
# We only run this test on platforms that support umask.
try:
old_umask = os.umask(0o077)
self._box.close()
os.unlink(self._path)
self._box = mailbox.mbox(self._path, create=True)
self._box.add('')
self._box.close()
finally:
os.umask(old_umask)
st = os.stat(self._path)
perms = st.st_mode
self.assertFalse((perms & 0o111)) # Execute bits should all be off.
def test_terminating_newline(self):
message = email.message.Message()
message['From'] = '[email protected]'
message.set_payload('No newline at the end')
i = self._box.add(message)
# A newline should have been appended to the payload
message = self._box.get(i)
self.assertEqual(message.get_payload(), 'No newline at the end\n')
def test_message_separator(self):
# Check there's always a single blank line after each message
self._box.add('From: foo\n\n0') # No newline at the end
with open(self._path) as f:
data = f.read()
self.assertEqual(data[-3:], '0\n\n')
self._box.add('From: foo\n\n0\n') # Newline at the end
with open(self._path) as f:
data = f.read()
self.assertEqual(data[-3:], '0\n\n')
class TestMMDF(_TestMboxMMDF, unittest.TestCase):
_factory = lambda self, path, factory=None: mailbox.MMDF(path, factory)
class TestMH(TestMailbox, unittest.TestCase):
_factory = lambda self, path, factory=None: mailbox.MH(path, factory)
def assertMailboxEmpty(self):
self.assertEqual(os.listdir(self._path), ['.mh_sequences'])
def test_list_folders(self):
# List folders
self._box.add_folder('one')
self._box.add_folder('two')
self._box.add_folder('three')
self.assertEqual(len(self._box.list_folders()), 3)
self.assertEqual(set(self._box.list_folders()),
set(('one', 'two', 'three')))
def test_get_folder(self):
# Open folders
def dummy_factory (s):
return None
self._box = self._factory(self._path, dummy_factory)
new_folder = self._box.add_folder('foo.bar')
folder0 = self._box.get_folder('foo.bar')
folder0.add(self._template % 'bar')
self.assertTrue(os.path.isdir(os.path.join(self._path, 'foo.bar')))
folder1 = self._box.get_folder('foo.bar')
self.assertEqual(folder1.get_string(folder1.keys()[0]),
self._template % 'bar')
# Test for bug #1569790: verify that folders returned by .get_folder()
# use the same factory function.
self.assertIs(new_folder._factory, self._box._factory)
self.assertIs(folder0._factory, self._box._factory)
def test_add_and_remove_folders(self):
# Delete folders
self._box.add_folder('one')
self._box.add_folder('two')
self.assertEqual(len(self._box.list_folders()), 2)
self.assertEqual(set(self._box.list_folders()), set(('one', 'two')))
self._box.remove_folder('one')
self.assertEqual(len(self._box.list_folders()), 1)
self.assertEqual(set(self._box.list_folders()), set(('two',)))
self._box.add_folder('three')
self.assertEqual(len(self._box.list_folders()), 2)
self.assertEqual(set(self._box.list_folders()), set(('two', 'three')))
self._box.remove_folder('three')
self.assertEqual(len(self._box.list_folders()), 1)
self.assertEqual(set(self._box.list_folders()), set(('two',)))
self._box.remove_folder('two')
self.assertEqual(len(self._box.list_folders()), 0)
self.assertEqual(self._box.list_folders(), [])
def test_sequences(self):
# Get and set sequences
self.assertEqual(self._box.get_sequences(), {})
msg0 = mailbox.MHMessage(self._template % 0)
msg0.add_sequence('foo')
key0 = self._box.add(msg0)
self.assertEqual(self._box.get_sequences(), {'foo':[key0]})
msg1 = mailbox.MHMessage(self._template % 1)
msg1.set_sequences(['bar', 'replied', 'foo'])
key1 = self._box.add(msg1)
self.assertEqual(self._box.get_sequences(),
{'foo':[key0, key1], 'bar':[key1], 'replied':[key1]})
msg0.set_sequences(['flagged'])
self._box[key0] = msg0
self.assertEqual(self._box.get_sequences(),
{'foo':[key1], 'bar':[key1], 'replied':[key1],
'flagged':[key0]})
self._box.remove(key1)
self.assertEqual(self._box.get_sequences(), {'flagged':[key0]})
def test_issue2625(self):
msg0 = mailbox.MHMessage(self._template % 0)
msg0.add_sequence('foo')
key0 = self._box.add(msg0)
refmsg0 = self._box.get_message(key0)
def test_issue7627(self):
msg0 = mailbox.MHMessage(self._template % 0)
key0 = self._box.add(msg0)
self._box.lock()
self._box.remove(key0)
self._box.unlock()
def test_pack(self):
# Pack the contents of the mailbox
msg0 = mailbox.MHMessage(self._template % 0)
msg1 = mailbox.MHMessage(self._template % 1)
msg2 = mailbox.MHMessage(self._template % 2)
msg3 = mailbox.MHMessage(self._template % 3)
msg0.set_sequences(['foo', 'unseen'])
msg1.set_sequences(['foo'])
msg2.set_sequences(['foo', 'flagged'])
msg3.set_sequences(['foo', 'bar', 'replied'])
key0 = self._box.add(msg0)
key1 = self._box.add(msg1)
key2 = self._box.add(msg2)
key3 = self._box.add(msg3)
self.assertEqual(self._box.get_sequences(),
{'foo':[key0,key1,key2,key3], 'unseen':[key0],
'flagged':[key2], 'bar':[key3], 'replied':[key3]})
self._box.remove(key2)
self.assertEqual(self._box.get_sequences(),
{'foo':[key0,key1,key3], 'unseen':[key0], 'bar':[key3],
'replied':[key3]})
self._box.pack()
self.assertEqual(self._box.keys(), [1, 2, 3])
key0 = key0
key1 = key0 + 1
key2 = key1 + 1
self.assertEqual(self._box.get_sequences(),
{'foo':[1, 2, 3], 'unseen':[1], 'bar':[3], 'replied':[3]})
# Test case for packing while holding the mailbox locked.
key0 = self._box.add(msg1)
key1 = self._box.add(msg1)
key2 = self._box.add(msg1)
key3 = self._box.add(msg1)
self._box.remove(key0)
self._box.remove(key2)
self._box.lock()
self._box.pack()
self._box.unlock()
self.assertEqual(self._box.get_sequences(),
{'foo':[1, 2, 3, 4, 5],
'unseen':[1], 'bar':[3], 'replied':[3]})
def _get_lock_path(self):
return os.path.join(self._path, '.mh_sequences.lock')
class TestBabyl(_TestSingleFile, unittest.TestCase):
_factory = lambda self, path, factory=None: mailbox.Babyl(path, factory)
def assertMailboxEmpty(self):
with open(self._path) as f:
self.assertEqual(f.readlines(), [])
def tearDown(self):
super().tearDown()
self._box.close()
self._delete_recursively(self._path)
for lock_remnant in glob.glob(self._path + '.*'):
support.unlink(lock_remnant)
def test_labels(self):
# Get labels from the mailbox
self.assertEqual(self._box.get_labels(), [])
msg0 = mailbox.BabylMessage(self._template % 0)
msg0.add_label('foo')
key0 = self._box.add(msg0)
self.assertEqual(self._box.get_labels(), ['foo'])
msg1 = mailbox.BabylMessage(self._template % 1)
msg1.set_labels(['bar', 'answered', 'foo'])
key1 = self._box.add(msg1)
self.assertEqual(set(self._box.get_labels()), set(['foo', 'bar']))
msg0.set_labels(['blah', 'filed'])
self._box[key0] = msg0
self.assertEqual(set(self._box.get_labels()),
set(['foo', 'bar', 'blah']))
self._box.remove(key1)
self.assertEqual(set(self._box.get_labels()), set(['blah']))
class FakeFileLikeObject:
def __init__(self):
self.closed = False
def close(self):
self.closed = True
class FakeMailBox(mailbox.Mailbox):
def __init__(self):
mailbox.Mailbox.__init__(self, '', lambda file: None)
self.files = [FakeFileLikeObject() for i in range(10)]
def get_file(self, key):
return self.files[key]
class TestFakeMailBox(unittest.TestCase):
def test_closing_fd(self):
box = FakeMailBox()
for i in range(10):
self.assertFalse(box.files[i].closed)
for i in range(10):
box[i]
for i in range(10):
self.assertTrue(box.files[i].closed)
class TestMessage(TestBase, unittest.TestCase):
_factory = mailbox.Message # Overridden by subclasses to reuse tests
def setUp(self):
self._path = support.TESTFN
def tearDown(self):
self._delete_recursively(self._path)
def test_initialize_with_eMM(self):
# Initialize based on email.message.Message instance
eMM = email.message_from_string(_sample_message)
msg = self._factory(eMM)
self._post_initialize_hook(msg)
self._check_sample(msg)
def test_initialize_with_string(self):
# Initialize based on string
msg = self._factory(_sample_message)
self._post_initialize_hook(msg)
self._check_sample(msg)
def test_initialize_with_file(self):
# Initialize based on contents of file
with open(self._path, 'w+') as f:
f.write(_sample_message)
f.seek(0)
msg = self._factory(f)
self._post_initialize_hook(msg)
self._check_sample(msg)
def test_initialize_with_binary_file(self):
# Initialize based on contents of binary file
with open(self._path, 'wb+') as f:
f.write(_bytes_sample_message)
f.seek(0)
msg = self._factory(f)
self._post_initialize_hook(msg)
self._check_sample(msg)
def test_initialize_with_nothing(self):
# Initialize without arguments
msg = self._factory()
self._post_initialize_hook(msg)
self.assertIsInstance(msg, email.message.Message)
self.assertIsInstance(msg, mailbox.Message)
self.assertIsInstance(msg, self._factory)
self.assertEqual(msg.keys(), [])
self.assertFalse(msg.is_multipart())
self.assertIsNone(msg.get_payload())
def test_initialize_incorrectly(self):
# Initialize with invalid argument
self.assertRaises(TypeError, lambda: self._factory(object()))
def test_all_eMM_attribues_exist(self):
# Issue 12537
eMM = email.message_from_string(_sample_message)
msg = self._factory(_sample_message)
for attr in eMM.__dict__:
self.assertIn(attr, msg.__dict__,
'{} attribute does not exist'.format(attr))
def test_become_message(self):
# Take on the state of another message
eMM = email.message_from_string(_sample_message)
msg = self._factory()
msg._become_message(eMM)
self._check_sample(msg)
def test_explain_to(self):
# Copy self's format-specific data to other message formats.
# This test is superficial; better ones are in TestMessageConversion.
msg = self._factory()
for class_ in self.all_mailbox_types:
other_msg = class_()
msg._explain_to(other_msg)
other_msg = email.message.Message()
self.assertRaises(TypeError, lambda: msg._explain_to(other_msg))
def _post_initialize_hook(self, msg):
# Overridden by subclasses to check extra things after initialization
pass
class TestMaildirMessage(TestMessage, unittest.TestCase):
_factory = mailbox.MaildirMessage
def _post_initialize_hook(self, msg):
self.assertEqual(msg._subdir, 'new')
self.assertEqual(msg._info, '')
def test_subdir(self):
# Use get_subdir() and set_subdir()
msg = mailbox.MaildirMessage(_sample_message)
self.assertEqual(msg.get_subdir(), 'new')
msg.set_subdir('cur')
self.assertEqual(msg.get_subdir(), 'cur')
msg.set_subdir('new')
self.assertEqual(msg.get_subdir(), 'new')
self.assertRaises(ValueError, lambda: msg.set_subdir('tmp'))
self.assertEqual(msg.get_subdir(), 'new')
msg.set_subdir('new')
self.assertEqual(msg.get_subdir(), 'new')
self._check_sample(msg)
def test_flags(self):
# Use get_flags(), set_flags(), add_flag(), remove_flag()
msg = mailbox.MaildirMessage(_sample_message)
self.assertEqual(msg.get_flags(), '')
self.assertEqual(msg.get_subdir(), 'new')
msg.set_flags('F')
self.assertEqual(msg.get_subdir(), 'new')
self.assertEqual(msg.get_flags(), 'F')
msg.set_flags('SDTP')
self.assertEqual(msg.get_flags(), 'DPST')
msg.add_flag('FT')
self.assertEqual(msg.get_flags(), 'DFPST')
msg.remove_flag('TDRP')
self.assertEqual(msg.get_flags(), 'FS')
self.assertEqual(msg.get_subdir(), 'new')
self._check_sample(msg)
def test_date(self):
# Use get_date() and set_date()
msg = mailbox.MaildirMessage(_sample_message)
self.assertLess(abs(msg.get_date() - time.time()), 60)
msg.set_date(0.0)
self.assertEqual(msg.get_date(), 0.0)
def test_info(self):
# Use get_info() and set_info()
msg = mailbox.MaildirMessage(_sample_message)
self.assertEqual(msg.get_info(), '')
msg.set_info('1,foo=bar')
self.assertEqual(msg.get_info(), '1,foo=bar')
self.assertRaises(TypeError, lambda: msg.set_info(None))
self._check_sample(msg)
def test_info_and_flags(self):
# Test interaction of info and flag methods
msg = mailbox.MaildirMessage(_sample_message)
self.assertEqual(msg.get_info(), '')
msg.set_flags('SF')
self.assertEqual(msg.get_flags(), 'FS')
self.assertEqual(msg.get_info(), '2,FS')
msg.set_info('1,')
self.assertEqual(msg.get_flags(), '')
self.assertEqual(msg.get_info(), '1,')
msg.remove_flag('RPT')
self.assertEqual(msg.get_flags(), '')
self.assertEqual(msg.get_info(), '1,')
msg.add_flag('D')
self.assertEqual(msg.get_flags(), 'D')
self.assertEqual(msg.get_info(), '2,D')
self._check_sample(msg)
class _TestMboxMMDFMessage:
_factory = mailbox._mboxMMDFMessage
def _post_initialize_hook(self, msg):
self._check_from(msg)
def test_initialize_with_unixfrom(self):
# Initialize with a message that already has a _unixfrom attribute
msg = mailbox.Message(_sample_message)
msg.set_unixfrom('From foo@bar blah')
msg = mailbox.mboxMessage(msg)
self.assertEqual(msg.get_from(), 'foo@bar blah', msg.get_from())
def test_from(self):
# Get and set "From " line
msg = mailbox.mboxMessage(_sample_message)
self._check_from(msg)
msg.set_from('foo bar')
self.assertEqual(msg.get_from(), 'foo bar')
msg.set_from('foo@bar', True)
self._check_from(msg, 'foo@bar')
msg.set_from('blah@temp', time.localtime())
self._check_from(msg, 'blah@temp')
def test_flags(self):
# Use get_flags(), set_flags(), add_flag(), remove_flag()
msg = mailbox.mboxMessage(_sample_message)
self.assertEqual(msg.get_flags(), '')
msg.set_flags('F')
self.assertEqual(msg.get_flags(), 'F')
msg.set_flags('XODR')
self.assertEqual(msg.get_flags(), 'RODX')
msg.add_flag('FA')
self.assertEqual(msg.get_flags(), 'RODFAX')
msg.remove_flag('FDXA')
self.assertEqual(msg.get_flags(), 'RO')
self._check_sample(msg)
def _check_from(self, msg, sender=None):
# Check contents of "From " line
if sender is None:
sender = "MAILER-DAEMON"
self.assertIsNotNone(re.match(
sender + r" \w{3} \w{3} [\d ]\d [\d ]\d:\d{2}:\d{2} \d{4}",
msg.get_from()))
class TestMboxMessage(_TestMboxMMDFMessage, TestMessage):
_factory = mailbox.mboxMessage
class TestMHMessage(TestMessage, unittest.TestCase):
_factory = mailbox.MHMessage
def _post_initialize_hook(self, msg):
self.assertEqual(msg._sequences, [])
def test_sequences(self):
# Get, set, join, and leave sequences
msg = mailbox.MHMessage(_sample_message)
self.assertEqual(msg.get_sequences(), [])
msg.set_sequences(['foobar'])
self.assertEqual(msg.get_sequences(), ['foobar'])
msg.set_sequences([])
self.assertEqual(msg.get_sequences(), [])
msg.add_sequence('unseen')
self.assertEqual(msg.get_sequences(), ['unseen'])
msg.add_sequence('flagged')
self.assertEqual(msg.get_sequences(), ['unseen', 'flagged'])
msg.add_sequence('flagged')
self.assertEqual(msg.get_sequences(), ['unseen', 'flagged'])
msg.remove_sequence('unseen')
self.assertEqual(msg.get_sequences(), ['flagged'])
msg.add_sequence('foobar')
self.assertEqual(msg.get_sequences(), ['flagged', 'foobar'])
msg.remove_sequence('replied')
self.assertEqual(msg.get_sequences(), ['flagged', 'foobar'])
msg.set_sequences(['foobar', 'replied'])
self.assertEqual(msg.get_sequences(), ['foobar', 'replied'])
class TestBabylMessage(TestMessage, unittest.TestCase):
_factory = mailbox.BabylMessage
def _post_initialize_hook(self, msg):
self.assertEqual(msg._labels, [])
def test_labels(self):
# Get, set, join, and leave labels
msg = mailbox.BabylMessage(_sample_message)
self.assertEqual(msg.get_labels(), [])
msg.set_labels(['foobar'])
self.assertEqual(msg.get_labels(), ['foobar'])
msg.set_labels([])
self.assertEqual(msg.get_labels(), [])
msg.add_label('filed')
self.assertEqual(msg.get_labels(), ['filed'])
msg.add_label('resent')
self.assertEqual(msg.get_labels(), ['filed', 'resent'])
msg.add_label('resent')
self.assertEqual(msg.get_labels(), ['filed', 'resent'])
msg.remove_label('filed')
self.assertEqual(msg.get_labels(), ['resent'])
msg.add_label('foobar')
self.assertEqual(msg.get_labels(), ['resent', 'foobar'])
msg.remove_label('unseen')
self.assertEqual(msg.get_labels(), ['resent', 'foobar'])
msg.set_labels(['foobar', 'answered'])
self.assertEqual(msg.get_labels(), ['foobar', 'answered'])
def test_visible(self):
# Get, set, and update visible headers
msg = mailbox.BabylMessage(_sample_message)
visible = msg.get_visible()
self.assertEqual(visible.keys(), [])
self.assertIsNone(visible.get_payload())
visible['User-Agent'] = 'FooBar 1.0'
visible['X-Whatever'] = 'Blah'
self.assertEqual(msg.get_visible().keys(), [])
msg.set_visible(visible)
visible = msg.get_visible()
self.assertEqual(visible.keys(), ['User-Agent', 'X-Whatever'])
self.assertEqual(visible['User-Agent'], 'FooBar 1.0')
self.assertEqual(visible['X-Whatever'], 'Blah')
self.assertIsNone(visible.get_payload())
msg.update_visible()
self.assertEqual(visible.keys(), ['User-Agent', 'X-Whatever'])
self.assertIsNone(visible.get_payload())
visible = msg.get_visible()
self.assertEqual(visible.keys(), ['User-Agent', 'Date', 'From', 'To',
'Subject'])
for header in ('User-Agent', 'Date', 'From', 'To', 'Subject'):
self.assertEqual(visible[header], msg[header])
class TestMMDFMessage(_TestMboxMMDFMessage, TestMessage):
_factory = mailbox.MMDFMessage
class TestMessageConversion(TestBase, unittest.TestCase):
def test_plain_to_x(self):
# Convert Message to all formats
for class_ in self.all_mailbox_types:
msg_plain = mailbox.Message(_sample_message)
msg = class_(msg_plain)
self._check_sample(msg)
def test_x_to_plain(self):
# Convert all formats to Message
for class_ in self.all_mailbox_types:
msg = class_(_sample_message)
msg_plain = mailbox.Message(msg)
self._check_sample(msg_plain)
def test_x_from_bytes(self):
# Convert all formats to Message
for class_ in self.all_mailbox_types:
msg = class_(_bytes_sample_message)
self._check_sample(msg)
def test_x_to_invalid(self):
# Convert all formats to an invalid format
for class_ in self.all_mailbox_types:
self.assertRaises(TypeError, lambda: class_(False))
def test_type_specific_attributes_removed_on_conversion(self):
reference = {class_: class_(_sample_message).__dict__
for class_ in self.all_mailbox_types}
for class1 in self.all_mailbox_types:
for class2 in self.all_mailbox_types:
if class1 is class2:
continue
source = class1(_sample_message)
target = class2(source)
type_specific = [a for a in reference[class1]
if a not in reference[class2]]
for attr in type_specific:
self.assertNotIn(attr, target.__dict__,
"while converting {} to {}".format(class1, class2))
def test_maildir_to_maildir(self):
# Convert MaildirMessage to MaildirMessage
msg_maildir = mailbox.MaildirMessage(_sample_message)
msg_maildir.set_flags('DFPRST')
msg_maildir.set_subdir('cur')
date = msg_maildir.get_date()
msg = mailbox.MaildirMessage(msg_maildir)
self._check_sample(msg)
self.assertEqual(msg.get_flags(), 'DFPRST')
self.assertEqual(msg.get_subdir(), 'cur')
self.assertEqual(msg.get_date(), date)
def test_maildir_to_mboxmmdf(self):
# Convert MaildirMessage to mboxmessage and MMDFMessage
pairs = (('D', ''), ('F', 'F'), ('P', ''), ('R', 'A'), ('S', 'R'),
('T', 'D'), ('DFPRST', 'RDFA'))
for class_ in (mailbox.mboxMessage, mailbox.MMDFMessage):
msg_maildir = mailbox.MaildirMessage(_sample_message)
msg_maildir.set_date(0.0)
for setting, result in pairs:
msg_maildir.set_flags(setting)
msg = class_(msg_maildir)
self.assertEqual(msg.get_flags(), result)
self.assertEqual(msg.get_from(), 'MAILER-DAEMON %s' %
time.asctime(time.gmtime(0.0)))
msg_maildir.set_subdir('cur')
self.assertEqual(class_(msg_maildir).get_flags(), 'RODFA')
def test_maildir_to_mh(self):
# Convert MaildirMessage to MHMessage
msg_maildir = mailbox.MaildirMessage(_sample_message)
pairs = (('D', ['unseen']), ('F', ['unseen', 'flagged']),
('P', ['unseen']), ('R', ['unseen', 'replied']), ('S', []),
('T', ['unseen']), ('DFPRST', ['replied', 'flagged']))
for setting, result in pairs:
msg_maildir.set_flags(setting)
self.assertEqual(mailbox.MHMessage(msg_maildir).get_sequences(),
result)
def test_maildir_to_babyl(self):
# Convert MaildirMessage to Babyl
msg_maildir = mailbox.MaildirMessage(_sample_message)
pairs = (('D', ['unseen']), ('F', ['unseen']),
('P', ['unseen', 'forwarded']), ('R', ['unseen', 'answered']),
('S', []), ('T', ['unseen', 'deleted']),
('DFPRST', ['deleted', 'answered', 'forwarded']))
for setting, result in pairs:
msg_maildir.set_flags(setting)
self.assertEqual(mailbox.BabylMessage(msg_maildir).get_labels(),
result)
def test_mboxmmdf_to_maildir(self):
# Convert mboxMessage and MMDFMessage to MaildirMessage
for class_ in (mailbox.mboxMessage, mailbox.MMDFMessage):
msg_mboxMMDF = class_(_sample_message)
msg_mboxMMDF.set_from('foo@bar', time.gmtime(0.0))
pairs = (('R', 'S'), ('O', ''), ('D', 'T'), ('F', 'F'), ('A', 'R'),
('RODFA', 'FRST'))
for setting, result in pairs:
msg_mboxMMDF.set_flags(setting)
msg = mailbox.MaildirMessage(msg_mboxMMDF)
self.assertEqual(msg.get_flags(), result)
self.assertEqual(msg.get_date(), 0.0)
msg_mboxMMDF.set_flags('O')
self.assertEqual(mailbox.MaildirMessage(msg_mboxMMDF).get_subdir(),
'cur')
def test_mboxmmdf_to_mboxmmdf(self):
# Convert mboxMessage and MMDFMessage to mboxMessage and MMDFMessage
for class_ in (mailbox.mboxMessage, mailbox.MMDFMessage):
msg_mboxMMDF = class_(_sample_message)
msg_mboxMMDF.set_flags('RODFA')
msg_mboxMMDF.set_from('foo@bar')
for class2_ in (mailbox.mboxMessage, mailbox.MMDFMessage):
msg2 = class2_(msg_mboxMMDF)
self.assertEqual(msg2.get_flags(), 'RODFA')
self.assertEqual(msg2.get_from(), 'foo@bar')
def test_mboxmmdf_to_mh(self):
# Convert mboxMessage and MMDFMessage to MHMessage
for class_ in (mailbox.mboxMessage, mailbox.MMDFMessage):
msg_mboxMMDF = class_(_sample_message)
pairs = (('R', []), ('O', ['unseen']), ('D', ['unseen']),
('F', ['unseen', 'flagged']),
('A', ['unseen', 'replied']),
('RODFA', ['replied', 'flagged']))
for setting, result in pairs:
msg_mboxMMDF.set_flags(setting)
self.assertEqual(mailbox.MHMessage(msg_mboxMMDF).get_sequences(),
result)
def test_mboxmmdf_to_babyl(self):
# Convert mboxMessage and MMDFMessage to BabylMessage
for class_ in (mailbox.mboxMessage, mailbox.MMDFMessage):
msg = class_(_sample_message)
pairs = (('R', []), ('O', ['unseen']),
('D', ['unseen', 'deleted']), ('F', ['unseen']),
('A', ['unseen', 'answered']),
('RODFA', ['deleted', 'answered']))
for setting, result in pairs:
msg.set_flags(setting)
self.assertEqual(mailbox.BabylMessage(msg).get_labels(), result)
def test_mh_to_maildir(self):
# Convert MHMessage to MaildirMessage
pairs = (('unseen', ''), ('replied', 'RS'), ('flagged', 'FS'))
for setting, result in pairs:
msg = mailbox.MHMessage(_sample_message)
msg.add_sequence(setting)
self.assertEqual(mailbox.MaildirMessage(msg).get_flags(), result)
self.assertEqual(mailbox.MaildirMessage(msg).get_subdir(), 'cur')
msg = mailbox.MHMessage(_sample_message)
msg.add_sequence('unseen')
msg.add_sequence('replied')
msg.add_sequence('flagged')
self.assertEqual(mailbox.MaildirMessage(msg).get_flags(), 'FR')
self.assertEqual(mailbox.MaildirMessage(msg).get_subdir(), 'cur')
def test_mh_to_mboxmmdf(self):
# Convert MHMessage to mboxMessage and MMDFMessage
pairs = (('unseen', 'O'), ('replied', 'ROA'), ('flagged', 'ROF'))
for setting, result in pairs:
msg = mailbox.MHMessage(_sample_message)
msg.add_sequence(setting)
for class_ in (mailbox.mboxMessage, mailbox.MMDFMessage):
self.assertEqual(class_(msg).get_flags(), result)
msg = mailbox.MHMessage(_sample_message)
msg.add_sequence('unseen')
msg.add_sequence('replied')
msg.add_sequence('flagged')
for class_ in (mailbox.mboxMessage, mailbox.MMDFMessage):
self.assertEqual(class_(msg).get_flags(), 'OFA')
def test_mh_to_mh(self):
# Convert MHMessage to MHMessage
msg = mailbox.MHMessage(_sample_message)
msg.add_sequence('unseen')
msg.add_sequence('replied')
msg.add_sequence('flagged')
self.assertEqual(mailbox.MHMessage(msg).get_sequences(),
['unseen', 'replied', 'flagged'])
def test_mh_to_babyl(self):
# Convert MHMessage to BabylMessage
pairs = (('unseen', ['unseen']), ('replied', ['answered']),
('flagged', []))
for setting, result in pairs:
msg = mailbox.MHMessage(_sample_message)
msg.add_sequence(setting)
self.assertEqual(mailbox.BabylMessage(msg).get_labels(), result)
msg = mailbox.MHMessage(_sample_message)
msg.add_sequence('unseen')
msg.add_sequence('replied')
msg.add_sequence('flagged')
self.assertEqual(mailbox.BabylMessage(msg).get_labels(),
['unseen', 'answered'])
def test_babyl_to_maildir(self):
# Convert BabylMessage to MaildirMessage
pairs = (('unseen', ''), ('deleted', 'ST'), ('filed', 'S'),
('answered', 'RS'), ('forwarded', 'PS'), ('edited', 'S'),
('resent', 'PS'))
for setting, result in pairs:
msg = mailbox.BabylMessage(_sample_message)
msg.add_label(setting)
self.assertEqual(mailbox.MaildirMessage(msg).get_flags(), result)
self.assertEqual(mailbox.MaildirMessage(msg).get_subdir(), 'cur')
msg = mailbox.BabylMessage(_sample_message)
for label in ('unseen', 'deleted', 'filed', 'answered', 'forwarded',
'edited', 'resent'):
msg.add_label(label)
self.assertEqual(mailbox.MaildirMessage(msg).get_flags(), 'PRT')
self.assertEqual(mailbox.MaildirMessage(msg).get_subdir(), 'cur')
def test_babyl_to_mboxmmdf(self):
# Convert BabylMessage to mboxMessage and MMDFMessage
pairs = (('unseen', 'O'), ('deleted', 'ROD'), ('filed', 'RO'),
('answered', 'ROA'), ('forwarded', 'RO'), ('edited', 'RO'),
('resent', 'RO'))
for setting, result in pairs:
for class_ in (mailbox.mboxMessage, mailbox.MMDFMessage):
msg = mailbox.BabylMessage(_sample_message)
msg.add_label(setting)
self.assertEqual(class_(msg).get_flags(), result)
msg = mailbox.BabylMessage(_sample_message)
for label in ('unseen', 'deleted', 'filed', 'answered', 'forwarded',
'edited', 'resent'):
msg.add_label(label)
for class_ in (mailbox.mboxMessage, mailbox.MMDFMessage):
self.assertEqual(class_(msg).get_flags(), 'ODA')
def test_babyl_to_mh(self):
# Convert BabylMessage to MHMessage
pairs = (('unseen', ['unseen']), ('deleted', []), ('filed', []),
('answered', ['replied']), ('forwarded', []), ('edited', []),
('resent', []))
for setting, result in pairs:
msg = mailbox.BabylMessage(_sample_message)
msg.add_label(setting)
self.assertEqual(mailbox.MHMessage(msg).get_sequences(), result)
msg = mailbox.BabylMessage(_sample_message)
for label in ('unseen', 'deleted', 'filed', 'answered', 'forwarded',
'edited', 'resent'):
msg.add_label(label)
self.assertEqual(mailbox.MHMessage(msg).get_sequences(),
['unseen', 'replied'])
def test_babyl_to_babyl(self):
# Convert BabylMessage to BabylMessage
msg = mailbox.BabylMessage(_sample_message)
msg.update_visible()
for label in ('unseen', 'deleted', 'filed', 'answered', 'forwarded',
'edited', 'resent'):
msg.add_label(label)
msg2 = mailbox.BabylMessage(msg)
self.assertEqual(msg2.get_labels(), ['unseen', 'deleted', 'filed',
'answered', 'forwarded', 'edited',
'resent'])
self.assertEqual(msg.get_visible().keys(), msg2.get_visible().keys())
for key in msg.get_visible().keys():
self.assertEqual(msg.get_visible()[key], msg2.get_visible()[key])
class TestProxyFileBase(TestBase):
def _test_read(self, proxy):
# Read by byte
proxy.seek(0)
self.assertEqual(proxy.read(), b'bar')
proxy.seek(1)
self.assertEqual(proxy.read(), b'ar')
proxy.seek(0)
self.assertEqual(proxy.read(2), b'ba')
proxy.seek(1)
self.assertEqual(proxy.read(-1), b'ar')
proxy.seek(2)
self.assertEqual(proxy.read(1000), b'r')
def _test_readline(self, proxy):
# Read by line
linesep = os.linesep.encode()
proxy.seek(0)
self.assertEqual(proxy.readline(), b'foo' + linesep)
self.assertEqual(proxy.readline(), b'bar' + linesep)
self.assertEqual(proxy.readline(), b'fred' + linesep)
self.assertEqual(proxy.readline(), b'bob')
proxy.seek(2)
self.assertEqual(proxy.readline(), b'o' + linesep)
proxy.seek(6 + 2 * len(os.linesep))
self.assertEqual(proxy.readline(), b'fred' + linesep)
proxy.seek(6 + 2 * len(os.linesep))
self.assertEqual(proxy.readline(2), b'fr')
self.assertEqual(proxy.readline(-10), b'ed' + linesep)
def _test_readlines(self, proxy):
# Read multiple lines
linesep = os.linesep.encode()
proxy.seek(0)
self.assertEqual(proxy.readlines(), [b'foo' + linesep,
b'bar' + linesep,
b'fred' + linesep, b'bob'])
proxy.seek(0)
self.assertEqual(proxy.readlines(2), [b'foo' + linesep])
proxy.seek(3 + len(linesep))
self.assertEqual(proxy.readlines(4 + len(linesep)),
[b'bar' + linesep, b'fred' + linesep])
proxy.seek(3)
self.assertEqual(proxy.readlines(1000), [linesep, b'bar' + linesep,
b'fred' + linesep, b'bob'])
def _test_iteration(self, proxy):
# Iterate by line
linesep = os.linesep.encode()
proxy.seek(0)
iterator = iter(proxy)
self.assertEqual(next(iterator), b'foo' + linesep)
self.assertEqual(next(iterator), b'bar' + linesep)
self.assertEqual(next(iterator), b'fred' + linesep)
self.assertEqual(next(iterator), b'bob')
self.assertRaises(StopIteration, next, iterator)
def _test_seek_and_tell(self, proxy):
# Seek and use tell to check position
linesep = os.linesep.encode()
proxy.seek(3)
self.assertEqual(proxy.tell(), 3)
self.assertEqual(proxy.read(len(linesep)), linesep)
proxy.seek(2, 1)
self.assertEqual(proxy.read(1 + len(linesep)), b'r' + linesep)
proxy.seek(-3 - len(linesep), 2)
self.assertEqual(proxy.read(3), b'bar')
proxy.seek(2, 0)
self.assertEqual(proxy.read(), b'o' + linesep + b'bar' + linesep)
proxy.seek(100)
self.assertFalse(proxy.read())
def _test_close(self, proxy):
# Close a file
self.assertFalse(proxy.closed)
proxy.close()
self.assertTrue(proxy.closed)
# Issue 11700 subsequent closes should be a no-op.
proxy.close()
self.assertTrue(proxy.closed)
class TestProxyFile(TestProxyFileBase, unittest.TestCase):
def setUp(self):
self._path = support.TESTFN
self._file = open(self._path, 'wb+')
def tearDown(self):
self._file.close()
self._delete_recursively(self._path)
def test_initialize(self):
# Initialize and check position
self._file.write(b'foo')
pos = self._file.tell()
proxy0 = mailbox._ProxyFile(self._file)
self.assertEqual(proxy0.tell(), pos)
self.assertEqual(self._file.tell(), pos)
proxy1 = mailbox._ProxyFile(self._file, 0)
self.assertEqual(proxy1.tell(), 0)
self.assertEqual(self._file.tell(), pos)
def test_read(self):
self._file.write(b'bar')
self._test_read(mailbox._ProxyFile(self._file))
def test_readline(self):
self._file.write(bytes('foo%sbar%sfred%sbob' % (os.linesep, os.linesep,
os.linesep), 'ascii'))
self._test_readline(mailbox._ProxyFile(self._file))
def test_readlines(self):
self._file.write(bytes('foo%sbar%sfred%sbob' % (os.linesep, os.linesep,
os.linesep), 'ascii'))
self._test_readlines(mailbox._ProxyFile(self._file))
def test_iteration(self):
self._file.write(bytes('foo%sbar%sfred%sbob' % (os.linesep, os.linesep,
os.linesep), 'ascii'))
self._test_iteration(mailbox._ProxyFile(self._file))
def test_seek_and_tell(self):
self._file.write(bytes('foo%sbar%s' % (os.linesep, os.linesep), 'ascii'))
self._test_seek_and_tell(mailbox._ProxyFile(self._file))
def test_close(self):
self._file.write(bytes('foo%sbar%s' % (os.linesep, os.linesep), 'ascii'))
self._test_close(mailbox._ProxyFile(self._file))
class TestPartialFile(TestProxyFileBase, unittest.TestCase):
def setUp(self):
self._path = support.TESTFN
self._file = open(self._path, 'wb+')
def tearDown(self):
self._file.close()
self._delete_recursively(self._path)
def test_initialize(self):
# Initialize and check position
self._file.write(bytes('foo' + os.linesep + 'bar', 'ascii'))
pos = self._file.tell()
proxy = mailbox._PartialFile(self._file, 2, 5)
self.assertEqual(proxy.tell(), 0)
self.assertEqual(self._file.tell(), pos)
def test_read(self):
self._file.write(bytes('***bar***', 'ascii'))
self._test_read(mailbox._PartialFile(self._file, 3, 6))
def test_readline(self):
self._file.write(bytes('!!!!!foo%sbar%sfred%sbob!!!!!' %
(os.linesep, os.linesep, os.linesep), 'ascii'))
self._test_readline(mailbox._PartialFile(self._file, 5,
18 + 3 * len(os.linesep)))
def test_readlines(self):
self._file.write(bytes('foo%sbar%sfred%sbob?????' %
(os.linesep, os.linesep, os.linesep), 'ascii'))
self._test_readlines(mailbox._PartialFile(self._file, 0,
13 + 3 * len(os.linesep)))
def test_iteration(self):
self._file.write(bytes('____foo%sbar%sfred%sbob####' %
(os.linesep, os.linesep, os.linesep), 'ascii'))
self._test_iteration(mailbox._PartialFile(self._file, 4,
17 + 3 * len(os.linesep)))
def test_seek_and_tell(self):
self._file.write(bytes('(((foo%sbar%s$$$' % (os.linesep, os.linesep), 'ascii'))
self._test_seek_and_tell(mailbox._PartialFile(self._file, 3,
9 + 2 * len(os.linesep)))
def test_close(self):
self._file.write(bytes('&foo%sbar%s^' % (os.linesep, os.linesep), 'ascii'))
self._test_close(mailbox._PartialFile(self._file, 1,
6 + 3 * len(os.linesep)))
## Start: tests from the original module (for backward compatibility).
FROM_ = "From [email protected] Sat Jul 24 13:43:35 2004\n"
DUMMY_MESSAGE = """\
From: [email protected]
To: [email protected]
Subject: Simple Test
This is a dummy message.
"""
class MaildirTestCase(unittest.TestCase):
def setUp(self):
# create a new maildir mailbox to work with:
self._dir = support.TESTFN
if os.path.isdir(self._dir):
support.rmtree(self._dir)
elif os.path.isfile(self._dir):
support.unlink(self._dir)
os.mkdir(self._dir)
os.mkdir(os.path.join(self._dir, "cur"))
os.mkdir(os.path.join(self._dir, "tmp"))
os.mkdir(os.path.join(self._dir, "new"))
self._counter = 1
self._msgfiles = []
def tearDown(self):
list(map(os.unlink, self._msgfiles))
support.rmdir(os.path.join(self._dir, "cur"))
support.rmdir(os.path.join(self._dir, "tmp"))
support.rmdir(os.path.join(self._dir, "new"))
support.rmdir(self._dir)
def createMessage(self, dir, mbox=False):
t = int(time.time() % 1000000)
pid = self._counter
self._counter += 1
filename = ".".join((str(t), str(pid), "myhostname", "mydomain"))
tmpname = os.path.join(self._dir, "tmp", filename)
newname = os.path.join(self._dir, dir, filename)
with open(tmpname, "w") as fp:
self._msgfiles.append(tmpname)
if mbox:
fp.write(FROM_)
fp.write(DUMMY_MESSAGE)
try:
os.link(tmpname, newname)
except (AttributeError, PermissionError):
with open(newname, "w") as fp:
fp.write(DUMMY_MESSAGE)
self._msgfiles.append(newname)
return tmpname
def test_empty_maildir(self):
"""Test an empty maildir mailbox"""
# Test for regression on bug #117490:
# Make sure the boxes attribute actually gets set.
self.mbox = mailbox.Maildir(support.TESTFN)
#self.assertTrue(hasattr(self.mbox, "boxes"))
#self.assertEqual(len(self.mbox.boxes), 0)
self.assertIsNone(self.mbox.next())
self.assertIsNone(self.mbox.next())
def test_nonempty_maildir_cur(self):
self.createMessage("cur")
self.mbox = mailbox.Maildir(support.TESTFN)
#self.assertEqual(len(self.mbox.boxes), 1)
self.assertIsNotNone(self.mbox.next())
self.assertIsNone(self.mbox.next())
self.assertIsNone(self.mbox.next())
def test_nonempty_maildir_new(self):
self.createMessage("new")
self.mbox = mailbox.Maildir(support.TESTFN)
#self.assertEqual(len(self.mbox.boxes), 1)
self.assertIsNotNone(self.mbox.next())
self.assertIsNone(self.mbox.next())
self.assertIsNone(self.mbox.next())
def test_nonempty_maildir_both(self):
self.createMessage("cur")
self.createMessage("new")
self.mbox = mailbox.Maildir(support.TESTFN)
#self.assertEqual(len(self.mbox.boxes), 2)
self.assertIsNotNone(self.mbox.next())
self.assertIsNotNone(self.mbox.next())
self.assertIsNone(self.mbox.next())
self.assertIsNone(self.mbox.next())
## End: tests from the original module (for backward compatibility).
_sample_message = """\
Return-Path: <[email protected]>
X-Original-To: gkj+person@localhost
Delivered-To: gkj+person@localhost
Received: from localhost (localhost [127.0.0.1])
by andy.gregorykjohnson.com (Postfix) with ESMTP id 356ED9DD17
for <gkj+person@localhost>; Wed, 13 Jul 2005 17:23:16 -0400 (EDT)
Delivered-To: [email protected]
Received: from localhost [127.0.0.1]
by localhost with POP3 (fetchmail-6.2.5)
for gkj+person@localhost (single-drop); Wed, 13 Jul 2005 17:23:16 -0400 (EDT)
Received: from andy.gregorykjohnson.com (andy.gregorykjohnson.com [64.32.235.228])
by sundance.gregorykjohnson.com (Postfix) with ESMTP id 5B056316746
for <[email protected]>; Wed, 13 Jul 2005 17:23:11 -0400 (EDT)
Received: by andy.gregorykjohnson.com (Postfix, from userid 1000)
id 490CD9DD17; Wed, 13 Jul 2005 17:23:11 -0400 (EDT)
Date: Wed, 13 Jul 2005 17:23:11 -0400
From: "Gregory K. Johnson" <[email protected]>
To: [email protected]
Subject: Sample message
Message-ID: <[email protected]>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="NMuMz9nt05w80d4+"
Content-Disposition: inline
User-Agent: Mutt/1.5.9i
--NMuMz9nt05w80d4+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
This is a sample message.
--
Gregory K. Johnson
--NMuMz9nt05w80d4+
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="text.gz"
Content-Transfer-Encoding: base64
H4sICM2D1UIAA3RleHQAC8nILFYAokSFktSKEoW0zJxUPa7wzJIMhZLyfIWczLzUYj0uAHTs
3FYlAAAA
--NMuMz9nt05w80d4+--
"""
_bytes_sample_message = _sample_message.encode('ascii')
_sample_headers = {
"Return-Path":"<[email protected]>",
"X-Original-To":"gkj+person@localhost",
"Delivered-To":"gkj+person@localhost",
"Received":"""from localhost (localhost [127.0.0.1])
by andy.gregorykjohnson.com (Postfix) with ESMTP id 356ED9DD17
for <gkj+person@localhost>; Wed, 13 Jul 2005 17:23:16 -0400 (EDT)""",
"Delivered-To":"[email protected]",
"Received":"""from localhost [127.0.0.1]
by localhost with POP3 (fetchmail-6.2.5)
for gkj+person@localhost (single-drop); Wed, 13 Jul 2005 17:23:16 -0400 (EDT)""",
"Received":"""from andy.gregorykjohnson.com (andy.gregorykjohnson.com [64.32.235.228])
by sundance.gregorykjohnson.com (Postfix) with ESMTP id 5B056316746
for <[email protected]>; Wed, 13 Jul 2005 17:23:11 -0400 (EDT)""",
"Received":"""by andy.gregorykjohnson.com (Postfix, from userid 1000)
id 490CD9DD17; Wed, 13 Jul 2005 17:23:11 -0400 (EDT)""",
"Date":"Wed, 13 Jul 2005 17:23:11 -0400",
"From":""""Gregory K. Johnson" <[email protected]>""",
"To":"[email protected]",
"Subject":"Sample message",
"Mime-Version":"1.0",
"Content-Type":"""multipart/mixed; boundary="NMuMz9nt05w80d4+\"""",
"Content-Disposition":"inline",
"User-Agent": "Mutt/1.5.9i" }
_sample_payloads = ("""This is a sample message.
--
Gregory K. Johnson
""",
"""H4sICM2D1UIAA3RleHQAC8nILFYAokSFktSKEoW0zJxUPa7wzJIMhZLyfIWczLzUYj0uAHTs
3FYlAAAA
""")
class MiscTestCase(unittest.TestCase):
def test__all__(self):
blacklist = {"linesep", "fcntl"}
support.check__all__(self, mailbox, blacklist=blacklist)
def test_main():
tests = (TestMailboxSuperclass, TestMaildir, TestMbox, TestMMDF, TestMH,
TestBabyl, TestMessage, TestMaildirMessage, TestMboxMessage,
TestMHMessage, TestBabylMessage, TestMMDFMessage,
TestMessageConversion, TestProxyFile, TestPartialFile,
MaildirTestCase, TestFakeMailBox, MiscTestCase)
support.run_unittest(*tests)
support.reap_children()
if __name__ == '__main__':
test_main()
| 92,820 | 2,289 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/keycert.pem | -----BEGIN PRIVATE KEY-----
MIIG/wIBADANBgkqhkiG9w0BAQEFAASCBukwggblAgEAAoIBgQCylKlLaKU+hOvJ
DfriTRLd+IthG5hv28I3A/CGjLICT0rDDtgaXd0uqloJAnjsgn5gMAcStpDW8Rm+
t6LsrBL+5fBgkyU1r94Rvx0HHoyaZwBBouitVHw28hP3W+smddkqB1UxpGnTeL2B
gj3dVo/WTtRfO+0h0PKw1l98YE1pMTdqIwcOOE/ER0g4hvA/wrxuLhMvlVLMy/lL
58uctqaDUqryNyeerKbVkq4fJyCG5D2TwXVJ3i2DDh0xSt2Y10poZV4M4k8Su9Z5
8zN2PSvYMT50aqF277v8BaOeYUApBE4kZGIJpo13ATGdEwpUFZ0Fri4zLYUZ1hWb
OC35sKo7OxWQ/+tefNUdgWHob6Vmy777jiYcLwxc3sS9rF3AJe0rMW83kCkR6hmy
A3250E137N/1QumHuT/Nj9rnI/lwt9jfaYkZjoAgT/C97m/mM83cYpGTdoGV1xNo
7G90MhP0di5FnVsrIaSnvkbGT9UgUWx0oVMjocifdG2qIhMI9psCAwEAAQKCAYBT
sHmaPmNaZj59jZCqp0YVQlpHWwBYQ5vD3pPE6oCttm0p9nXt/VkfenQRTthOtmT1
POzDp00/feP7zeGLmqSYUjgRekPw4gdnN7Ip2PY5kdW77NWwDSzdLxuOS8Rq1MW9
/Yu+ZPe3RBlDbT8C0IM+Atlh/BqIQ3zIxN4g0pzUlF0M33d6AYfYSzOcUhibOO7H
j84r+YXBNkIRgYKZYbutRXuZYaGuqejRpBj3voVu0d3Ntdb6lCWuClpB9HzfGN0c
RTv8g6UYO4sK3qyFn90ibIR/1GB9watvtoWVZqggiWeBzSWVWRsGEf9O+Cx4oJw1
IphglhmhbgNksbj7bD24on/icldSOiVkoUemUOFmHWhCm4PnB1GmbD8YMfEdSbks
qDr1Ps1zg4mGOinVD/4cY7vuPFO/HCH07wfeaUGzRt4g0/yLr+XjVofOA3oowyxv
JAzr+niHA3lg5ecj4r7M68efwzN1OCyjMrVJw2RAzwvGxE+rm5NiT08SWlKQZnkC
gcEA4wvyLpIur/UB84nV3XVJ89UMNBLm++aTFzld047BLJtMaOhvNqx6Cl5c8VuW
l261KHjiVzpfNM3/A2LBQJcYkhX7avkqEXlj57cl+dCWAVwUzKmLJTPjfaTTZnYJ
xeN3dMYjJz2z2WtgvfvDoJLukVwIMmhTY8wtqqYyQBJ/l06pBsfw5TNvmVIOQHds
8ASOiFt+WRLk2bl9xrGGayqt3VV93KVRzF27cpjOgEcG74F3c0ZW9snERN7vIYwB
JfrlAoHBAMlahPwMP2TYylG8OzHe7EiehTekSO26LGh0Cq3wTGXYsK/q8hQCzL14
kWW638vpwXL6L9ntvrd7hjzWRO3vX/VxnYEA6f0bpqHq1tZi6lzix5CTUN5McpDg
QnjenSJNrNjS1zEF8WeY9iLEuDI/M/iUW4y9R6s3WpgQhPDXpSvd2g3gMGRUYhxQ
Xna8auiJeYFq0oNaOxvJj+VeOfJ3ZMJttd+Y7gTOYZcbg3SdRb/kdxYki0RMD2hF
4ZvjJ6CTfwKBwQDiMqiZFTJGQwYqp4vWEmAW+I4r4xkUpWatoI2Fk5eI5T9+1PLX
uYXsho56NxEU1UrOg4Cb/p+TcBc8PErkGqR0BkpxDMOInTOXSrQe6lxIBoECVXc3
HTbrmiay0a5y5GfCgxPKqIJhfcToAceoVjovv0y7S4yoxGZKuUEe7E8JY2iqRNAO
yOvKCCICv/hcN235E44RF+2/rDlOltagNej5tY6rIFkaDdgOF4bD7f9O5eEni1Bg
litfoesDtQP/3rECgcEAkQfvQ7D6tIPmbqsbJBfCr6fmoqZllT4FIJN84b50+OL0
mTGsfjdqC4tdhx3sdu7/VPbaIqm5NmX10bowWgWSY7MbVME4yQPyqSwC5NbIonEC
d6N0mzoLR0kQ+Ai4u+2g82gicgAq2oj1uSNi3WZi48jQjHYFulCbo246o1NgeFFK
77WshYe2R1ioQfQDOU1URKCR0uTaMHClgfu112yiGd12JAD+aF3TM0kxDXz+sXI5
SKy311DFxECZeXRLpcC3AoHBAJkNMJWTyPYbeVu+CTQkec8Uun233EkXa2kUNZc/
5DuXDaK+A3DMgYRufTKSPpDHGaCZ1SYPInX1Uoe2dgVjWssRL2uitR4ENabDoAOA
ICVYXYYNagqQu5wwirF0QeaMXo1fjhuuHQh8GsMdXZvYEaAITZ9/NG5x/oY08+8H
kr78SMBOPy3XQn964uKG+e3JwpOG14GKABdAlrHKFXNWchu/6dgcYXB87mrC/GhO
zNwzC+QhFTZoOomFoqMgFWujng==
-----END PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIIEWTCCAsGgAwIBAgIJAJinz4jHSjLtMA0GCSqGSIb3DQEBCwUAMF8xCzAJBgNV
BAYTAlhZMRcwFQYDVQQHDA5DYXN0bGUgQW50aHJheDEjMCEGA1UECgwaUHl0aG9u
IFNvZnR3YXJlIEZvdW5kYXRpb24xEjAQBgNVBAMMCWxvY2FsaG9zdDAeFw0xODA4
MjkxNDIzMTVaFw0yODA4MjYxNDIzMTVaMF8xCzAJBgNVBAYTAlhZMRcwFQYDVQQH
DA5DYXN0bGUgQW50aHJheDEjMCEGA1UECgwaUHl0aG9uIFNvZnR3YXJlIEZvdW5k
YXRpb24xEjAQBgNVBAMMCWxvY2FsaG9zdDCCAaIwDQYJKoZIhvcNAQEBBQADggGP
ADCCAYoCggGBALKUqUtopT6E68kN+uJNEt34i2EbmG/bwjcD8IaMsgJPSsMO2Bpd
3S6qWgkCeOyCfmAwBxK2kNbxGb63ouysEv7l8GCTJTWv3hG/HQcejJpnAEGi6K1U
fDbyE/db6yZ12SoHVTGkadN4vYGCPd1Wj9ZO1F877SHQ8rDWX3xgTWkxN2ojBw44
T8RHSDiG8D/CvG4uEy+VUszL+Uvny5y2poNSqvI3J56sptWSrh8nIIbkPZPBdUne
LYMOHTFK3ZjXSmhlXgziTxK71nnzM3Y9K9gxPnRqoXbvu/wFo55hQCkETiRkYgmm
jXcBMZ0TClQVnQWuLjMthRnWFZs4Lfmwqjs7FZD/61581R2BYehvpWbLvvuOJhwv
DFzexL2sXcAl7SsxbzeQKRHqGbIDfbnQTXfs3/VC6Ye5P82P2ucj+XC32N9piRmO
gCBP8L3ub+YzzdxikZN2gZXXE2jsb3QyE/R2LkWdWyshpKe+RsZP1SBRbHShUyOh
yJ90baoiEwj2mwIDAQABoxgwFjAUBgNVHREEDTALgglsb2NhbGhvc3QwDQYJKoZI
hvcNAQELBQADggGBAHRUO/UIHl3jXQENewYayHxkIx8t7nu40iO2DXbicSijz5bo
5//xAB6RxhBAlsDBehgQP1uoZg+WJW+nHu3CIVOU3qZNZRaozxiCl2UFKcNqLOmx
R3NKpo1jYf4REQIeG8Yw9+hSWLRbshNteP6bKUUf+vanhg9+axyOEOH/iOQvgk/m
b8wA8wNa4ujWljPbTQnj7ry8RqhTM0GcAN5LSdSvcKcpzLcs3aYwh+Z8e30sQWna
F40sa5u7izgBTOrwpcDm/w5kC46vpRQ5fnbshVw6pne2by0mdMECASid/p25N103
jMqTFlmO7kpf/jpCSmamp3/JSEE1BJKHwQ6Ql4nzRA2N1mnvWH7Zxcv043gkHeAu
0x8evpvwuhdIyproejNFlBpKmW8OX7yKTCPPMC/VkX8Q1rVkxU0DQ6hmvwZlhoKa
9Wc2uXpw9xF8itV4Uvcdr3dwqByvIqn7iI/gB+4l41e0u8OmH2MKOx4Nxlly5TNW
HcVKQHyOeyvnINuBAQ==
-----END CERTIFICATE-----
| 4,058 | 67 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_dummy_thread.py | import _dummy_thread as _thread
import time
import queue
import random
import unittest
from test import support
from unittest import mock
DELAY = 0
class LockTests(unittest.TestCase):
"""Test lock objects."""
def setUp(self):
# Create a lock
self.lock = _thread.allocate_lock()
def test_initlock(self):
#Make sure locks start locked
self.assertFalse(self.lock.locked(),
"Lock object is not initialized unlocked.")
def test_release(self):
# Test self.lock.release()
self.lock.acquire()
self.lock.release()
self.assertFalse(self.lock.locked(),
"Lock object did not release properly.")
def test_LockType_context_manager(self):
with _thread.LockType():
pass
self.assertFalse(self.lock.locked(),
"Acquired Lock was not released")
def test_improper_release(self):
#Make sure release of an unlocked thread raises RuntimeError
self.assertRaises(RuntimeError, self.lock.release)
def test_cond_acquire_success(self):
#Make sure the conditional acquiring of the lock works.
self.assertTrue(self.lock.acquire(0),
"Conditional acquiring of the lock failed.")
def test_cond_acquire_fail(self):
#Test acquiring locked lock returns False
self.lock.acquire(0)
self.assertFalse(self.lock.acquire(0),
"Conditional acquiring of a locked lock incorrectly "
"succeeded.")
def test_uncond_acquire_success(self):
#Make sure unconditional acquiring of a lock works.
self.lock.acquire()
self.assertTrue(self.lock.locked(),
"Uncondional locking failed.")
def test_uncond_acquire_return_val(self):
#Make sure that an unconditional locking returns True.
self.assertIs(self.lock.acquire(1), True,
"Unconditional locking did not return True.")
self.assertIs(self.lock.acquire(), True)
def test_uncond_acquire_blocking(self):
#Make sure that unconditional acquiring of a locked lock blocks.
def delay_unlock(to_unlock, delay):
"""Hold on to lock for a set amount of time before unlocking."""
time.sleep(delay)
to_unlock.release()
self.lock.acquire()
start_time = int(time.time())
_thread.start_new_thread(delay_unlock,(self.lock, DELAY))
if support.verbose:
print()
print("*** Waiting for thread to release the lock "\
"(approx. %s sec.) ***" % DELAY)
self.lock.acquire()
end_time = int(time.time())
if support.verbose:
print("done")
self.assertGreaterEqual(end_time - start_time, DELAY,
"Blocking by unconditional acquiring failed.")
@mock.patch('time.sleep')
def test_acquire_timeout(self, mock_sleep):
"""Test invoking acquire() with a positive timeout when the lock is
already acquired. Ensure that time.sleep() is invoked with the given
timeout and that False is returned."""
self.lock.acquire()
retval = self.lock.acquire(waitflag=0, timeout=1)
self.assertTrue(mock_sleep.called)
mock_sleep.assert_called_once_with(1)
self.assertEqual(retval, False)
def test_lock_representation(self):
self.lock.acquire()
self.assertIn("locked", repr(self.lock))
self.lock.release()
self.assertIn("unlocked", repr(self.lock))
class MiscTests(unittest.TestCase):
"""Miscellaneous tests."""
def test_exit(self):
self.assertRaises(SystemExit, _thread.exit)
def test_ident(self):
self.assertIsInstance(_thread.get_ident(), int,
"_thread.get_ident() returned a non-integer")
self.assertNotEqual(_thread.get_ident(), 0,
"_thread.get_ident() returned 0")
def test_LockType(self):
self.assertIsInstance(_thread.allocate_lock(), _thread.LockType,
"_thread.LockType is not an instance of what "
"is returned by _thread.allocate_lock()")
def test_set_sentinel(self):
self.assertIsInstance(_thread._set_sentinel(), _thread.LockType,
"_thread._set_sentinel() did not return a "
"LockType instance.")
def test_interrupt_main(self):
#Calling start_new_thread with a function that executes interrupt_main
# should raise KeyboardInterrupt upon completion.
def call_interrupt():
_thread.interrupt_main()
self.assertRaises(KeyboardInterrupt,
_thread.start_new_thread,
call_interrupt,
tuple())
def test_interrupt_in_main(self):
self.assertRaises(KeyboardInterrupt, _thread.interrupt_main)
def test_stack_size_None(self):
retval = _thread.stack_size(None)
self.assertEqual(retval, 0)
def test_stack_size_not_None(self):
with self.assertRaises(_thread.error) as cm:
_thread.stack_size("")
self.assertEqual(cm.exception.args[0],
"setting thread stack size not supported")
class ThreadTests(unittest.TestCase):
"""Test thread creation."""
def test_arg_passing(self):
#Make sure that parameter passing works.
def arg_tester(queue, arg1=False, arg2=False):
"""Use to test _thread.start_new_thread() passes args properly."""
queue.put((arg1, arg2))
testing_queue = queue.Queue(1)
_thread.start_new_thread(arg_tester, (testing_queue, True, True))
result = testing_queue.get()
self.assertTrue(result[0] and result[1],
"Argument passing for thread creation "
"using tuple failed")
_thread.start_new_thread(
arg_tester,
tuple(),
{'queue':testing_queue, 'arg1':True, 'arg2':True})
result = testing_queue.get()
self.assertTrue(result[0] and result[1],
"Argument passing for thread creation "
"using kwargs failed")
_thread.start_new_thread(
arg_tester,
(testing_queue, True),
{'arg2':True})
result = testing_queue.get()
self.assertTrue(result[0] and result[1],
"Argument passing for thread creation using both tuple"
" and kwargs failed")
def test_multi_thread_creation(self):
def queue_mark(queue, delay):
time.sleep(delay)
queue.put(_thread.get_ident())
thread_count = 5
testing_queue = queue.Queue(thread_count)
if support.verbose:
print()
print("*** Testing multiple thread creation "
"(will take approx. %s to %s sec.) ***" % (
DELAY, thread_count))
for count in range(thread_count):
if DELAY:
local_delay = round(random.random(), 1)
else:
local_delay = 0
_thread.start_new_thread(queue_mark,
(testing_queue, local_delay))
time.sleep(DELAY)
if support.verbose:
print('done')
self.assertEqual(testing_queue.qsize(), thread_count,
"Not all %s threads executed properly "
"after %s sec." % (thread_count, DELAY))
def test_args_not_tuple(self):
"""
Test invoking start_new_thread() with a non-tuple value for "args".
Expect TypeError with a meaningful error message to be raised.
"""
with self.assertRaises(TypeError) as cm:
_thread.start_new_thread(mock.Mock(), [])
self.assertEqual(cm.exception.args[0], "2nd arg must be a tuple")
def test_kwargs_not_dict(self):
"""
Test invoking start_new_thread() with a non-dict value for "kwargs".
Expect TypeError with a meaningful error message to be raised.
"""
with self.assertRaises(TypeError) as cm:
_thread.start_new_thread(mock.Mock(), tuple(), kwargs=[])
self.assertEqual(cm.exception.args[0], "3rd arg must be a dict")
def test_SystemExit(self):
"""
Test invoking start_new_thread() with a function that raises
SystemExit.
The exception should be discarded.
"""
func = mock.Mock(side_effect=SystemExit())
try:
_thread.start_new_thread(func, tuple())
except SystemExit:
self.fail("start_new_thread raised SystemExit.")
@mock.patch('traceback.print_exc')
def test_RaiseException(self, mock_print_exc):
"""
Test invoking start_new_thread() with a function that raises exception.
The exception should be discarded and the traceback should be printed
via traceback.print_exc()
"""
func = mock.Mock(side_effect=Exception)
_thread.start_new_thread(func, tuple())
self.assertTrue(mock_print_exc.called)
| 9,376 | 257 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_os.py | # As a test suite for the os module, this is woefully inadequate, but this
# does add tests for a few functions which have been determined to be more
# portable than they had been thought to be.
import asynchat
import asyncore
import codecs
import contextlib
import decimal
import errno
import fractions
import getpass
import itertools
import locale
import mmap
import os
import pickle
import re
import shutil
import signal
import socket
import stat
import subprocess
import sys
import sysconfig
import time
import unittest
import uuid
import warnings
from test import support
if __name__ == 'PYOBJ.COM':
import resource
try:
import _thread
import threading
except ImportError:
threading = None
try:
import resource
except ImportError:
resource = None
try:
import fcntl
except ImportError:
fcntl = None
try:
import _winapi
except ImportError:
_winapi = None
try:
import grp
groups = [g.gr_gid for g in grp.getgrall() if getpass.getuser() in g.gr_mem]
if hasattr(os, 'getgid'):
process_gid = os.getgid()
if process_gid not in groups:
groups.append(process_gid)
except ImportError:
groups = []
try:
import pwd
all_users = [u.pw_uid for u in pwd.getpwall()]
except (ImportError, AttributeError):
all_users = []
try:
from _testcapi import INT_MAX, PY_SSIZE_T_MAX
except ImportError:
INT_MAX = PY_SSIZE_T_MAX = sys.maxsize
from test.support.script_helper import assert_python_ok
from test.support import unix_shell, FakePath
root_in_posix = False
if hasattr(os, 'geteuid'):
root_in_posix = (os.geteuid() == 0)
# Detect whether we're on a Linux system that uses the (now outdated
# and unmaintained) linuxthreads threading library. There's an issue
# when combining linuxthreads with a failed execv call: see
# http://bugs.python.org/issue4970.
if hasattr(sys, 'thread_info') and sys.thread_info.version:
USING_LINUXTHREADS = sys.thread_info.version.startswith("linuxthreads")
else:
USING_LINUXTHREADS = False
# Issue #14110: Some tests fail on FreeBSD if the user is in the wheel group.
HAVE_WHEEL_GROUP = sys.platform.startswith('freebsd') and os.getgid() == 0
@contextlib.contextmanager
def ignore_deprecation_warnings(msg_regex, quiet=False):
with support.check_warnings((msg_regex, DeprecationWarning), quiet=quiet):
yield
def requires_os_func(name):
return unittest.skipUnless(hasattr(os, name), 'requires os.%s' % name)
def create_file(filename, content=b'content'):
with open(filename, "xb", 0) as fp:
fp.write(content)
# Tests creating TESTFN
class FileTests(unittest.TestCase):
def setUp(self):
if os.path.lexists(support.TESTFN):
os.unlink(support.TESTFN)
tearDown = setUp
def test_access(self):
f = os.open(support.TESTFN, os.O_CREAT|os.O_RDWR)
os.close(f)
self.assertTrue(os.access(support.TESTFN, os.W_OK))
def test_closerange(self):
first = os.open(support.TESTFN, os.O_CREAT|os.O_RDWR)
# We must allocate two consecutive file descriptors, otherwise
# it will mess up other file descriptors (perhaps even the three
# standard ones).
second = os.dup(first)
try:
retries = 0
while second != first + 1:
os.close(first)
retries += 1
if retries > 10:
# XXX test skipped
self.skipTest("couldn't allocate two consecutive fds")
first, second = second, os.dup(second)
finally:
os.close(second)
# close a fd that is open, and one that isn't
os.closerange(first, first + 2)
self.assertRaises(OSError, os.write, first, b"a")
@support.cpython_only
def test_rename(self):
path = support.TESTFN
old = sys.getrefcount(path)
self.assertRaises(TypeError, os.rename, path, 0)
new = sys.getrefcount(path)
self.assertEqual(old, new)
def test_read(self):
with open(support.TESTFN, "w+b") as fobj:
fobj.write(b"spam")
fobj.flush()
fd = fobj.fileno()
os.lseek(fd, 0, 0)
s = os.read(fd, 4)
self.assertEqual(type(s), bytes)
self.assertEqual(s, b"spam")
@support.cpython_only
# Skip the test on 32-bit platforms: the number of bytes must fit in a
# Py_ssize_t type
@unittest.skipUnless(INT_MAX < PY_SSIZE_T_MAX,
"needs INT_MAX < PY_SSIZE_T_MAX")
@support.bigmemtest(size=INT_MAX + 10, memuse=1, dry_run=False)
def test_large_read(self, size):
self.addCleanup(support.unlink, support.TESTFN)
create_file(support.TESTFN, b'test')
# Issue #21932: Make sure that os.read() does not raise an
# OverflowError for size larger than INT_MAX
with open(support.TESTFN, "rb") as fp:
data = os.read(fp.fileno(), size)
# The test does not try to read more than 2 GB at once because the
# operating system is free to return less bytes than requested.
self.assertEqual(data, b'test')
def test_write(self):
# os.write() accepts bytes- and buffer-like objects but not strings
fd = os.open(support.TESTFN, os.O_CREAT | os.O_WRONLY)
self.assertRaises(TypeError, os.write, fd, "beans")
os.write(fd, b"bacon\n")
os.write(fd, bytearray(b"eggs\n"))
os.write(fd, memoryview(b"spam\n"))
os.close(fd)
with open(support.TESTFN, "rb") as fobj:
self.assertEqual(fobj.read().splitlines(),
[b"bacon", b"eggs", b"spam"])
def write_windows_console(self, *args):
retcode = subprocess.call(args,
# use a new console to not flood the test output
creationflags=subprocess.CREATE_NEW_CONSOLE,
# use a shell to hide the console window (SW_HIDE)
shell=True)
self.assertEqual(retcode, 0)
@unittest.skipUnless(sys.platform == 'win32',
'test specific to the Windows console')
def test_write_windows_console(self):
# Issue #11395: the Windows console returns an error (12: not enough
# space error) on writing into stdout if stdout mode is binary and the
# length is greater than 66,000 bytes (or less, depending on heap
# usage).
code = "print('x' * 100000)"
self.write_windows_console(sys.executable, "-c", code)
self.write_windows_console(sys.executable, "-u", "-c", code)
def fdopen_helper(self, *args):
fd = os.open(support.TESTFN, os.O_RDONLY)
f = os.fdopen(fd, *args)
f.close()
def test_fdopen(self):
fd = os.open(support.TESTFN, os.O_CREAT|os.O_RDWR)
os.close(fd)
self.fdopen_helper()
self.fdopen_helper('r')
self.fdopen_helper('r', 100)
def test_replace(self):
TESTFN2 = support.TESTFN + ".2"
self.addCleanup(support.unlink, support.TESTFN)
self.addCleanup(support.unlink, TESTFN2)
create_file(support.TESTFN, b"1")
create_file(TESTFN2, b"2")
os.replace(support.TESTFN, TESTFN2)
self.assertRaises(FileNotFoundError, os.stat, support.TESTFN)
with open(TESTFN2, 'r') as f:
self.assertEqual(f.read(), "1")
def test_open_keywords(self):
f = os.open(path=__file__, flags=os.O_RDONLY, mode=0o777,
dir_fd=None)
os.close(f)
def test_symlink_keywords(self):
symlink = support.get_attribute(os, "symlink")
try:
symlink(src='target', dst=support.TESTFN,
target_is_directory=False, dir_fd=None)
except (NotImplementedError, OSError):
pass # No OS support or unprivileged user
# Test attributes on return values from os.*stat* family.
class StatAttributeTests(unittest.TestCase):
def setUp(self):
self.fname = support.TESTFN
self.addCleanup(support.unlink, self.fname)
create_file(self.fname, b"ABC")
@unittest.skipUnless(hasattr(os, 'stat'), 'test needs os.stat()')
def check_stat_attributes(self, fname):
result = os.stat(fname)
# Make sure direct access works
self.assertEqual(result[stat.ST_SIZE], 3)
self.assertEqual(result.st_size, 3)
# Make sure all the attributes are there
members = dir(result)
for name in dir(stat):
if name[:3] == 'ST_':
attr = name.lower()
if name.endswith("TIME"):
def trunc(x): return int(x)
else:
def trunc(x): return x
self.assertEqual(trunc(getattr(result, attr)),
result[getattr(stat, name)])
self.assertIn(attr, members)
# Make sure that the st_?time and st_?time_ns fields roughly agree
# (they should always agree up to around tens-of-microseconds)
for name in 'st_atime st_mtime st_ctime'.split():
floaty = int(getattr(result, name) * 100000)
nanosecondy = getattr(result, name + "_ns") // 10000
self.assertAlmostEqual(floaty, nanosecondy, delta=2)
try:
result[200]
self.fail("No exception raised")
except IndexError:
pass
# Make sure that assignment fails
try:
result.st_mode = 1
self.fail("No exception raised")
except AttributeError:
pass
try:
result.st_rdev = 1
self.fail("No exception raised")
except (AttributeError, TypeError):
pass
try:
result.parrot = 1
self.fail("No exception raised")
except AttributeError:
pass
# Use the stat_result constructor with a too-short tuple.
try:
result2 = os.stat_result((10,))
self.fail("No exception raised")
except TypeError:
pass
# Use the constructor with a too-long tuple.
try:
result2 = os.stat_result((0,1,2,3,4,5,6,7,8,9,10,11,12,13,14))
except TypeError:
pass
def test_stat_attributes(self):
self.check_stat_attributes(self.fname)
def test_stat_attributes_bytes(self):
try:
fname = self.fname.encode(sys.getfilesystemencoding())
except UnicodeEncodeError:
self.skipTest("cannot encode %a for the filesystem" % self.fname)
self.check_stat_attributes(fname)
def test_stat_result_pickle(self):
result = os.stat(self.fname)
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
p = pickle.dumps(result, proto)
self.assertIn(b'stat_result', p)
if proto < 4:
self.assertIn(b'cos\nstat_result\n', p)
unpickled = pickle.loads(p)
self.assertEqual(result, unpickled)
@unittest.skipUnless(hasattr(os, 'statvfs'), 'test needs os.statvfs()')
def test_statvfs_attributes(self):
try:
result = os.statvfs(self.fname)
except OSError as e:
# On AtheOS, glibc always returns ENOSYS
if e.errno == errno.ENOSYS:
self.skipTest('os.statvfs() failed with ENOSYS')
# Make sure direct access works
self.assertEqual(result.f_bfree, result[3])
# Make sure all the attributes are there.
members = ('bsize', 'frsize', 'blocks', 'bfree', 'bavail', 'files',
'ffree', 'favail', 'flag', 'namemax')
for value, member in enumerate(members):
self.assertEqual(getattr(result, 'f_' + member), result[value])
# Make sure that assignment really fails
try:
result.f_bfree = 1
self.fail("No exception raised")
except AttributeError:
pass
try:
result.parrot = 1
self.fail("No exception raised")
except AttributeError:
pass
# Use the constructor with a too-short tuple.
try:
result2 = os.statvfs_result((10,))
self.fail("No exception raised")
except TypeError:
pass
# Use the constructor with a too-long tuple.
try:
result2 = os.statvfs_result((0,1,2,3,4,5,6,7,8,9,10,11,12,13,14))
except TypeError:
pass
@unittest.skipUnless(hasattr(os, 'statvfs'),
"need os.statvfs()")
def test_statvfs_result_pickle(self):
try:
result = os.statvfs(self.fname)
except OSError as e:
# On AtheOS, glibc always returns ENOSYS
if e.errno == errno.ENOSYS:
self.skipTest('os.statvfs() failed with ENOSYS')
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
p = pickle.dumps(result, proto)
self.assertIn(b'statvfs_result', p)
if proto < 4:
self.assertIn(b'cos\nstatvfs_result\n', p)
unpickled = pickle.loads(p)
self.assertEqual(result, unpickled)
@unittest.skipUnless(sys.platform == "win32", "Win32 specific tests")
def test_1686475(self):
# Verify that an open file can be stat'ed
try:
os.stat(r"c:\pagefile.sys")
except FileNotFoundError:
self.skipTest(r'c:\pagefile.sys does not exist')
except OSError as e:
self.fail("Could not stat pagefile.sys")
@unittest.skipUnless(sys.platform == "win32", "Win32 specific tests")
@unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()")
def test_15261(self):
# Verify that stat'ing a closed fd does not cause crash
r, w = os.pipe()
try:
os.stat(r) # should not raise error
finally:
os.close(r)
os.close(w)
with self.assertRaises(OSError) as ctx:
os.stat(r)
self.assertEqual(ctx.exception.errno, errno.EBADF)
def check_file_attributes(self, result):
self.assertTrue(hasattr(result, 'st_file_attributes'))
self.assertTrue(isinstance(result.st_file_attributes, int))
self.assertTrue(0 <= result.st_file_attributes <= 0xFFFFFFFF)
@unittest.skipUnless(sys.platform == "win32",
"st_file_attributes is Win32 specific")
def test_file_attributes(self):
# test file st_file_attributes (FILE_ATTRIBUTE_DIRECTORY not set)
result = os.stat(self.fname)
self.check_file_attributes(result)
self.assertEqual(
result.st_file_attributes & stat.FILE_ATTRIBUTE_DIRECTORY,
0)
# test directory st_file_attributes (FILE_ATTRIBUTE_DIRECTORY set)
dirname = support.TESTFN + "dir"
os.mkdir(dirname)
self.addCleanup(os.rmdir, dirname)
result = os.stat(dirname)
self.check_file_attributes(result)
self.assertEqual(
result.st_file_attributes & stat.FILE_ATTRIBUTE_DIRECTORY,
stat.FILE_ATTRIBUTE_DIRECTORY)
@unittest.skipUnless(sys.platform == "win32", "Win32 specific tests")
def test_access_denied(self):
# Default to FindFirstFile WIN32_FIND_DATA when access is
# denied. See issue 28075.
# os.environ['TEMP'] should be located on a volume that
# supports file ACLs.
fname = os.path.join(os.environ['TEMP'], self.fname)
self.addCleanup(support.unlink, fname)
create_file(fname, b'ABC')
# Deny the right to [S]YNCHRONIZE on the file to
# force CreateFile to fail with ERROR_ACCESS_DENIED.
DETACHED_PROCESS = 8
subprocess.check_call(
# bpo-30584: Use security identifier *S-1-5-32-545 instead
# of localized "Users" to not depend on the locale.
['icacls.exe', fname, '/deny', '*S-1-5-32-545:(S)'],
creationflags=DETACHED_PROCESS
)
result = os.stat(fname)
self.assertNotEqual(result.st_size, 0)
class UtimeTests(unittest.TestCase):
def setUp(self):
self.dirname = support.TESTFN
self.fname = os.path.join(self.dirname, "f1")
self.addCleanup(support.rmtree, self.dirname)
os.mkdir(self.dirname)
create_file(self.fname)
def restore_float_times(state):
with ignore_deprecation_warnings('stat_float_times'):
os.stat_float_times(state)
# ensure that st_atime and st_mtime are float
with ignore_deprecation_warnings('stat_float_times'):
old_float_times = os.stat_float_times(-1)
self.addCleanup(restore_float_times, old_float_times)
os.stat_float_times(True)
def support_subsecond(self, filename):
# Heuristic to check if the filesystem supports timestamp with
# subsecond resolution: check if float and int timestamps are different
st = os.stat(filename)
return ((st.st_atime != st[7])
or (st.st_mtime != st[8])
or (st.st_ctime != st[9]))
def _test_utime(self, set_time, filename=None):
if not filename:
filename = self.fname
support_subsecond = self.support_subsecond(filename)
if support_subsecond:
# Timestamp with a resolution of 1 microsecond (10^-6).
#
# The resolution of the C internal function used by os.utime()
# depends on the platform: 1 sec, 1 us, 1 ns. Writing a portable
# test with a resolution of 1 ns requires more work:
# see the issue #15745.
atime_ns = 1002003000 # 1.002003 seconds
mtime_ns = 4005006000 # 4.005006 seconds
else:
# use a resolution of 1 second
atime_ns = 5 * 10**9
mtime_ns = 8 * 10**9
set_time(filename, (atime_ns, mtime_ns))
st = os.stat(filename)
if support_subsecond:
self.assertAlmostEqual(st.st_atime, atime_ns * 1e-9, delta=1e-6)
self.assertAlmostEqual(st.st_mtime, mtime_ns * 1e-9, delta=1e-6)
else:
self.assertEqual(st.st_atime, atime_ns * 1e-9)
self.assertEqual(st.st_mtime, mtime_ns * 1e-9)
self.assertEqual(st.st_atime_ns, atime_ns)
self.assertEqual(st.st_mtime_ns, mtime_ns)
def test_utime(self):
def set_time(filename, ns):
# test the ns keyword parameter
os.utime(filename, ns=ns)
self._test_utime(set_time)
@staticmethod
def ns_to_sec(ns):
# Convert a number of nanosecond (int) to a number of seconds (float).
# Round towards infinity by adding 0.5 nanosecond to avoid rounding
# issue, os.utime() rounds towards minus infinity.
return (ns * 1e-9) + 0.5e-9
def test_utime_by_indexed(self):
# pass times as floating point seconds as the second indexed parameter
def set_time(filename, ns):
atime_ns, mtime_ns = ns
atime = self.ns_to_sec(atime_ns)
mtime = self.ns_to_sec(mtime_ns)
# test utimensat(timespec), utimes(timeval), utime(utimbuf)
# or utime(time_t)
os.utime(filename, (atime, mtime))
self._test_utime(set_time)
def test_utime_by_times(self):
def set_time(filename, ns):
atime_ns, mtime_ns = ns
atime = self.ns_to_sec(atime_ns)
mtime = self.ns_to_sec(mtime_ns)
# test the times keyword parameter
os.utime(filename, times=(atime, mtime))
self._test_utime(set_time)
@unittest.skipUnless(os.utime in os.supports_follow_symlinks,
"follow_symlinks support for utime required "
"for this test.")
def test_utime_nofollow_symlinks(self):
def set_time(filename, ns):
# use follow_symlinks=False to test utimensat(timespec)
# or lutimes(timeval)
os.utime(filename, ns=ns, follow_symlinks=False)
self._test_utime(set_time)
@unittest.skipUnless(False and os.utime in os.supports_fd,
"fd support for utime required for this test.")
def test_utime_fd(self):
def set_time(filename, ns):
with open(filename, 'wb', 0) as fp:
# use a file descriptor to test futimens(timespec)
# or futimes(timeval)
os.utime(fp.fileno(), ns=ns)
self._test_utime(set_time)
@unittest.skipUnless(os.utime in os.supports_dir_fd,
"dir_fd support for utime required for this test.")
def test_utime_dir_fd(self):
def set_time(filename, ns):
dirname, name = os.path.split(filename)
dirfd = os.open(dirname, os.O_RDONLY)
try:
# pass dir_fd to test utimensat(timespec) or futimesat(timeval)
os.utime(name, dir_fd=dirfd, ns=ns)
finally:
os.close(dirfd)
self._test_utime(set_time)
def test_utime_directory(self):
def set_time(filename, ns):
# test calling os.utime() on a directory
os.utime(filename, ns=ns)
self._test_utime(set_time, filename=self.dirname)
def _test_utime_current(self, set_time):
# Get the system clock
current = time.time()
# Call os.utime() to set the timestamp to the current system clock
set_time(self.fname)
if not self.support_subsecond(self.fname):
delta = 1.0
elif os.name == 'nt':
# On Windows, the usual resolution of time.time() is 15.6 ms.
# bpo-30649: Tolerate 50 ms for slow Windows buildbots.
delta = 0.050
else:
# bpo-30649: PPC64 Fedora 3.x buildbot requires
# at least a delta of 14 ms
delta = 0.020
st = os.stat(self.fname)
msg = ("st_time=%r, current=%r, dt=%r"
% (st.st_mtime, current, st.st_mtime - current))
self.assertAlmostEqual(st.st_mtime, current,
delta=delta, msg=msg)
def test_utime_current(self):
def set_time(filename):
# Set to the current time in the new way
os.utime(self.fname)
self._test_utime_current(set_time)
def test_utime_current_old(self):
def set_time(filename):
# Set to the current time in the old explicit way.
os.utime(self.fname, None)
self._test_utime_current(set_time)
def get_file_system(self, path):
if sys.platform == 'win32':
root = os.path.splitdrive(os.path.abspath(path))[0] + '\\'
# import ctypes
kernel32 = ctypes.windll.kernel32
buf = ctypes.create_unicode_buffer("", 100)
ok = kernel32.GetVolumeInformationW(root, None, 0,
None, None, None,
buf, len(buf))
if ok:
return buf.value
# return None if the filesystem is unknown
def test_large_time(self):
# Many filesystems are limited to the year 2038. At least, the test
# pass with NTFS filesystem.
if self.get_file_system(self.dirname) != "NTFS":
self.skipTest("requires NTFS")
large = 5000000000 # some day in 2128
os.utime(self.fname, (large, large))
self.assertEqual(os.stat(self.fname).st_mtime, large)
def test_utime_invalid_arguments(self):
# seconds and nanoseconds parameters are mutually exclusive
with self.assertRaises(ValueError):
os.utime(self.fname, (5, 5), ns=(5, 5))
with self.assertRaises(TypeError):
os.utime(self.fname, [5, 5])
with self.assertRaises(TypeError):
os.utime(self.fname, (5,))
with self.assertRaises(TypeError):
os.utime(self.fname, (5, 5, 5))
with self.assertRaises(TypeError):
os.utime(self.fname, ns=[5, 5])
with self.assertRaises(TypeError):
os.utime(self.fname, ns=(5,))
with self.assertRaises(TypeError):
os.utime(self.fname, ns=(5, 5, 5))
if os.utime not in os.supports_follow_symlinks:
with self.assertRaises(NotImplementedError):
os.utime(self.fname, (5, 5), follow_symlinks=False)
if os.utime not in os.supports_fd:
with open(self.fname, 'wb', 0) as fp:
with self.assertRaises(TypeError):
os.utime(fp.fileno(), (5, 5))
if os.utime not in os.supports_dir_fd:
with self.assertRaises(NotImplementedError):
os.utime(self.fname, (5, 5), dir_fd=0)
from test import mapping_tests
class EnvironTests(mapping_tests.BasicTestMappingProtocol):
"""check that os.environ object conform to mapping protocol"""
type2test = None
def setUp(self):
self.__save = dict(os.environ)
if os.supports_bytes_environ:
self.__saveb = dict(os.environb)
for key, value in self._reference().items():
os.environ[key] = value
def tearDown(self):
os.environ.clear()
os.environ.update(self.__save)
if os.supports_bytes_environ:
os.environb.clear()
os.environb.update(self.__saveb)
def _reference(self):
return {"KEY1":"VALUE1", "KEY2":"VALUE2", "KEY3":"VALUE3"}
def _empty_mapping(self):
os.environ.clear()
return os.environ
# Bug 1110478
@unittest.skipUnless(unix_shell and os.path.exists(unix_shell),
'requires a shell')
def test_update2(self):
os.environ.clear()
os.environ.update(HELLO="World")
with os.popen("%s -c 'echo $HELLO'" % unix_shell) as popen:
value = popen.read().strip()
self.assertEqual(value, "World")
@unittest.skipUnless(unix_shell and os.path.exists(unix_shell),
'requires a shell')
def test_os_popen_iter(self):
with os.popen("%s -c 'echo \"line1\nline2\nline3\"'"
% unix_shell) as popen:
it = iter(popen)
self.assertEqual(next(it), "line1\n")
self.assertEqual(next(it), "line2\n")
self.assertEqual(next(it), "line3\n")
self.assertRaises(StopIteration, next, it)
# Verify environ keys and values from the OS are of the
# correct str type.
def test_keyvalue_types(self):
for key, val in os.environ.items():
self.assertEqual(type(key), str)
self.assertEqual(type(val), str)
def test_items(self):
for key, value in self._reference().items():
self.assertEqual(os.environ.get(key), value)
# Issue 7310
def test___repr__(self):
"""Check that the repr() of os.environ looks like environ({...})."""
env = os.environ
self.assertEqual(repr(env), 'environ({{{}}})'.format(', '.join(
'{!r}: {!r}'.format(key, value)
for key, value in env.items())))
def test_get_exec_path(self):
defpath_list = os.defpath.split(os.pathsep)
test_path = ['/monty', '/python', '', '/flying/circus']
test_env = {'PATH': os.pathsep.join(test_path)}
saved_environ = os.environ
try:
os.environ = dict(test_env)
# Test that defaulting to os.environ works.
self.assertSequenceEqual(test_path, os.get_exec_path())
self.assertSequenceEqual(test_path, os.get_exec_path(env=None))
finally:
os.environ = saved_environ
# No PATH environment variable
self.assertSequenceEqual(defpath_list, os.get_exec_path({}))
# Empty PATH environment variable
self.assertSequenceEqual(('',), os.get_exec_path({'PATH':''}))
# Supplied PATH environment variable
self.assertSequenceEqual(test_path, os.get_exec_path(test_env))
if os.supports_bytes_environ:
# env cannot contain 'PATH' and b'PATH' keys
try:
# ignore BytesWarning warning
with warnings.catch_warnings(record=True):
mixed_env = {'PATH': '1', b'PATH': b'2'}
except BytesWarning:
# mixed_env cannot be created with python -bb
pass
else:
self.assertRaises(ValueError, os.get_exec_path, mixed_env)
# bytes key and/or value
self.assertSequenceEqual(os.get_exec_path({b'PATH': b'abc'}),
['abc'])
self.assertSequenceEqual(os.get_exec_path({b'PATH': 'abc'}),
['abc'])
self.assertSequenceEqual(os.get_exec_path({'PATH': b'abc'}),
['abc'])
@unittest.skipUnless(os.supports_bytes_environ,
"os.environb required for this test.")
def test_environb(self):
# os.environ -> os.environb
value = 'euro\u20ac'
try:
value_bytes = value.encode(sys.getfilesystemencoding(),
'surrogateescape')
except UnicodeEncodeError:
msg = "U+20AC character is not encodable to %s" % (
sys.getfilesystemencoding(),)
self.skipTest(msg)
os.environ['unicode'] = value
self.assertEqual(os.environ['unicode'], value)
self.assertEqual(os.environb[b'unicode'], value_bytes)
# os.environb -> os.environ
value = b'\xff'
os.environb[b'bytes'] = value
self.assertEqual(os.environb[b'bytes'], value)
value_str = value.decode(sys.getfilesystemencoding(), 'surrogateescape')
self.assertEqual(os.environ['bytes'], value_str)
# On FreeBSD < 7 and OS X < 10.6, unsetenv() doesn't return a value (issue
# #13415).
@support.requires_freebsd_version(7)
@support.requires_mac_ver(10, 6)
@unittest.skip
def test_unset_error(self):
if sys.platform == "win32":
# an environment variable is limited to 32,767 characters
key = 'x' * 50000
self.assertRaises(ValueError, os.environ.__delitem__, key)
else:
# "=" is not allowed in a variable name
key = 'key='
self.assertRaises(OSError, os.environ.__delitem__, key)
def test_key_type(self):
missing = 'missingkey'
self.assertNotIn(missing, os.environ)
with self.assertRaises(KeyError) as cm:
os.environ[missing]
self.assertIs(cm.exception.args[0], missing)
self.assertTrue(cm.exception.__suppress_context__)
with self.assertRaises(KeyError) as cm:
del os.environ[missing]
self.assertIs(cm.exception.args[0], missing)
self.assertTrue(cm.exception.__suppress_context__)
def _test_environ_iteration(self, collection):
iterator = iter(collection)
new_key = "__new_key__"
next(iterator) # start iteration over os.environ.items
# add a new key in os.environ mapping
os.environ[new_key] = "test_environ_iteration"
try:
next(iterator) # force iteration over modified mapping
self.assertEqual(os.environ[new_key], "test_environ_iteration")
finally:
del os.environ[new_key]
def test_iter_error_when_changing_os_environ(self):
self._test_environ_iteration(os.environ)
def test_iter_error_when_changing_os_environ_items(self):
self._test_environ_iteration(os.environ.items())
def test_iter_error_when_changing_os_environ_values(self):
self._test_environ_iteration(os.environ.values())
class WalkTests(unittest.TestCase):
"""Tests for os.walk()."""
# Wrapper to hide minor differences between os.walk and os.fwalk
# to tests both functions with the same code base
def walk(self, top, **kwargs):
if 'follow_symlinks' in kwargs:
kwargs['followlinks'] = kwargs.pop('follow_symlinks')
return os.walk(top, **kwargs)
def setUp(self):
join = os.path.join
self.addCleanup(support.rmtree, support.TESTFN)
# Build:
# TESTFN/
# TEST1/ a file kid and two directory kids
# tmp1
# SUB1/ a file kid and a directory kid
# tmp2
# SUB11/ no kids
# SUB2/ a file kid and a dirsymlink kid
# tmp3
# SUB21/ not readable
# tmp5
# link/ a symlink to TESTFN.2
# broken_link
# broken_link2
# broken_link3
# TEST2/
# tmp4 a lone file
self.walk_path = join(support.TESTFN, "TEST1")
self.sub1_path = join(self.walk_path, "SUB1")
self.sub11_path = join(self.sub1_path, "SUB11")
sub2_path = join(self.walk_path, "SUB2")
sub21_path = join(sub2_path, "SUB21")
tmp1_path = join(self.walk_path, "tmp1")
tmp2_path = join(self.sub1_path, "tmp2")
tmp3_path = join(sub2_path, "tmp3")
tmp5_path = join(sub21_path, "tmp3")
self.link_path = join(sub2_path, "link")
t2_path = join(support.TESTFN, "TEST2")
tmp4_path = join(support.TESTFN, "TEST2", "tmp4")
broken_link_path = join(sub2_path, "broken_link")
broken_link2_path = join(sub2_path, "broken_link2")
broken_link3_path = join(sub2_path, "broken_link3")
# Create stuff.
os.makedirs(self.sub11_path)
os.makedirs(sub2_path)
os.makedirs(sub21_path)
os.makedirs(t2_path)
for path in tmp1_path, tmp2_path, tmp3_path, tmp4_path, tmp5_path:
with open(path, "x") as f:
f.write("I'm " + path + " and proud of it. Blame test_os.\n")
if support.can_symlink():
os.symlink(os.path.abspath(t2_path), self.link_path)
os.symlink('broken', broken_link_path, True)
os.symlink(join('tmp3', 'broken'), broken_link2_path, True)
os.symlink(join('SUB21', 'tmp5'), broken_link3_path, True)
self.sub2_tree = (sub2_path, ["SUB21", "link"],
["broken_link", "broken_link2", "broken_link3",
"tmp3"])
else:
self.sub2_tree = (sub2_path, [], ["tmp3"])
os.chmod(sub21_path, 0)
try:
os.listdir(sub21_path)
except PermissionError:
self.addCleanup(os.chmod, sub21_path, stat.S_IRWXU)
else:
os.chmod(sub21_path, stat.S_IRWXU)
os.unlink(tmp5_path)
os.rmdir(sub21_path)
del self.sub2_tree[1][:1]
def test_walk_topdown(self):
# Walk top-down.
all = list(self.walk(self.walk_path))
self.assertEqual(len(all), 4)
# We can't know which order SUB1 and SUB2 will appear in.
# Not flipped: TESTFN, SUB1, SUB11, SUB2
# flipped: TESTFN, SUB2, SUB1, SUB11
flipped = all[0][1][0] != "SUB1"
all[0][1].sort()
all[3 - 2 * flipped][-1].sort()
all[3 - 2 * flipped][1].sort()
self.assertEqual(all[0], (self.walk_path, ["SUB1", "SUB2"], ["tmp1"]))
self.assertEqual(all[1 + flipped], (self.sub1_path, ["SUB11"], ["tmp2"]))
self.assertEqual(all[2 + flipped], (self.sub11_path, [], []))
self.assertEqual(all[3 - 2 * flipped], self.sub2_tree)
def test_walk_prune(self, walk_path=None):
if walk_path is None:
walk_path = self.walk_path
# Prune the search.
all = []
for root, dirs, files in self.walk(walk_path):
all.append((root, dirs, files))
# Don't descend into SUB1.
if 'SUB1' in dirs:
# Note that this also mutates the dirs we appended to all!
dirs.remove('SUB1')
self.assertEqual(len(all), 2)
self.assertEqual(all[0], (self.walk_path, ["SUB2"], ["tmp1"]))
all[1][-1].sort()
all[1][1].sort()
self.assertEqual(all[1], self.sub2_tree)
def test_file_like_path(self):
self.test_walk_prune(FakePath(self.walk_path))
def test_walk_bottom_up(self):
# Walk bottom-up.
all = list(self.walk(self.walk_path, topdown=False))
self.assertEqual(len(all), 4, all)
# We can't know which order SUB1 and SUB2 will appear in.
# Not flipped: SUB11, SUB1, SUB2, TESTFN
# flipped: SUB2, SUB11, SUB1, TESTFN
flipped = all[3][1][0] != "SUB1"
all[3][1].sort()
all[2 - 2 * flipped][-1].sort()
all[2 - 2 * flipped][1].sort()
self.assertEqual(all[3],
(self.walk_path, ["SUB1", "SUB2"], ["tmp1"]))
self.assertEqual(all[flipped],
(self.sub11_path, [], []))
self.assertEqual(all[flipped + 1],
(self.sub1_path, ["SUB11"], ["tmp2"]))
self.assertEqual(all[2 - 2 * flipped],
self.sub2_tree)
def test_walk_symlink(self):
if not support.can_symlink():
self.skipTest("need symlink support")
# Walk, following symlinks.
walk_it = self.walk(self.walk_path, follow_symlinks=True)
for root, dirs, files in walk_it:
if root == self.link_path:
self.assertEqual(dirs, [])
self.assertEqual(files, ["tmp4"])
break
else:
self.fail("Didn't follow symlink with followlinks=True")
def test_walk_bad_dir(self):
# Walk top-down.
errors = []
walk_it = self.walk(self.walk_path, onerror=errors.append)
root, dirs, files = next(walk_it)
self.assertEqual(errors, [])
dir1 = 'SUB1'
path1 = os.path.join(root, dir1)
path1new = os.path.join(root, dir1 + '.new')
os.rename(path1, path1new)
try:
roots = [r for r, d, f in walk_it]
self.assertTrue(errors)
self.assertNotIn(path1, roots)
self.assertNotIn(path1new, roots)
for dir2 in dirs:
if dir2 != dir1:
self.assertIn(os.path.join(root, dir2), roots)
finally:
os.rename(path1new, path1)
@unittest.skipUnless(hasattr(os, 'fwalk'), "Test needs os.fwalk()")
class FwalkTests(WalkTests):
"""Tests for os.fwalk()."""
def walk(self, top, **kwargs):
for root, dirs, files, root_fd in os.fwalk(top, **kwargs):
yield (root, dirs, files)
def _compare_to_walk(self, walk_kwargs, fwalk_kwargs):
"""
compare with walk() results.
"""
walk_kwargs = walk_kwargs.copy()
fwalk_kwargs = fwalk_kwargs.copy()
for topdown, follow_symlinks in itertools.product((True, False), repeat=2):
walk_kwargs.update(topdown=topdown, followlinks=follow_symlinks)
fwalk_kwargs.update(topdown=topdown, follow_symlinks=follow_symlinks)
expected = {}
for root, dirs, files in os.walk(**walk_kwargs):
expected[root] = (set(dirs), set(files))
for root, dirs, files, rootfd in os.fwalk(**fwalk_kwargs):
self.assertIn(root, expected)
self.assertEqual(expected[root], (set(dirs), set(files)))
def test_compare_to_walk(self):
kwargs = {'top': support.TESTFN}
self._compare_to_walk(kwargs, kwargs)
def test_dir_fd(self):
try:
fd = os.open(".", os.O_RDONLY)
walk_kwargs = {'top': support.TESTFN}
fwalk_kwargs = walk_kwargs.copy()
fwalk_kwargs['dir_fd'] = fd
self._compare_to_walk(walk_kwargs, fwalk_kwargs)
finally:
os.close(fd)
def test_yields_correct_dir_fd(self):
# check returned file descriptors
for topdown, follow_symlinks in itertools.product((True, False), repeat=2):
args = support.TESTFN, topdown, None
for root, dirs, files, rootfd in os.fwalk(*args, follow_symlinks=follow_symlinks):
# check that the FD is valid
os.fstat(rootfd)
# redundant check
os.stat(rootfd)
# check that listdir() returns consistent information
self.assertEqual(set(os.listdir(rootfd)), set(dirs) | set(files))
def test_fd_leak(self):
# Since we're opening a lot of FDs, we must be careful to avoid leaks:
# we both check that calling fwalk() a large number of times doesn't
# yield EMFILE, and that the minimum allocated FD hasn't changed.
minfd = os.dup(1)
os.close(minfd)
for i in range(256):
for x in os.fwalk(support.TESTFN):
pass
newfd = os.dup(1)
self.addCleanup(os.close, newfd)
self.assertEqual(newfd, minfd)
class BytesWalkTests(WalkTests):
"""Tests for os.walk() with bytes."""
def setUp(self):
super().setUp()
self.stack = contextlib.ExitStack()
def tearDown(self):
self.stack.close()
super().tearDown()
def walk(self, top, **kwargs):
if 'follow_symlinks' in kwargs:
kwargs['followlinks'] = kwargs.pop('follow_symlinks')
for broot, bdirs, bfiles in os.walk(os.fsencode(top), **kwargs):
root = os.fsdecode(broot)
dirs = list(map(os.fsdecode, bdirs))
files = list(map(os.fsdecode, bfiles))
yield (root, dirs, files)
bdirs[:] = list(map(os.fsencode, dirs))
bfiles[:] = list(map(os.fsencode, files))
class MakedirTests(unittest.TestCase):
def setUp(self):
os.mkdir(support.TESTFN)
def test_makedir(self):
base = support.TESTFN
path = os.path.join(base, 'dir1', 'dir2', 'dir3')
os.makedirs(path) # Should work
path = os.path.join(base, 'dir1', 'dir2', 'dir3', 'dir4')
os.makedirs(path)
# Try paths with a '.' in them
self.assertRaises(OSError, os.makedirs, os.curdir)
path = os.path.join(base, 'dir1', 'dir2', 'dir3', 'dir4', 'dir5', os.curdir)
os.makedirs(path)
path = os.path.join(base, 'dir1', os.curdir, 'dir2', 'dir3', 'dir4',
'dir5', 'dir6')
os.makedirs(path)
def test_exist_ok_existing_directory(self):
path = os.path.join(support.TESTFN, 'dir1')
mode = 0o777
old_mask = os.umask(0o022)
os.makedirs(path, mode)
self.assertRaises(OSError, os.makedirs, path, mode)
self.assertRaises(OSError, os.makedirs, path, mode, exist_ok=False)
os.makedirs(path, 0o776, exist_ok=True)
os.makedirs(path, mode=mode, exist_ok=True)
os.umask(old_mask)
# Issue #25583: A drive root could raise PermissionError on Windows
os.makedirs(os.path.abspath('/'), exist_ok=True)
def test_exist_ok_s_isgid_directory(self):
path = os.path.join(support.TESTFN, 'dir1')
S_ISGID = stat.S_ISGID
mode = 0o777
old_mask = os.umask(0o022)
try:
existing_testfn_mode = stat.S_IMODE(
os.lstat(support.TESTFN).st_mode)
try:
os.chmod(support.TESTFN, existing_testfn_mode | S_ISGID)
except PermissionError:
raise unittest.SkipTest('Cannot set S_ISGID for dir.')
if (os.lstat(support.TESTFN).st_mode & S_ISGID != S_ISGID):
raise unittest.SkipTest('No support for S_ISGID dir mode.')
# The os should apply S_ISGID from the parent dir for us, but
# this test need not depend on that behavior. Be explicit.
os.makedirs(path, mode | S_ISGID)
# http://bugs.python.org/issue14992
# Should not fail when the bit is already set.
os.makedirs(path, mode, exist_ok=True)
# remove the bit.
os.chmod(path, stat.S_IMODE(os.lstat(path).st_mode) & ~S_ISGID)
# May work even when the bit is not already set when demanded.
os.makedirs(path, mode | S_ISGID, exist_ok=True)
finally:
os.umask(old_mask)
def test_exist_ok_existing_regular_file(self):
base = support.TESTFN
path = os.path.join(support.TESTFN, 'dir1')
f = open(path, 'w')
f.write('abc')
f.close()
self.assertRaises(OSError, os.makedirs, path)
self.assertRaises(OSError, os.makedirs, path, exist_ok=False)
self.assertRaises(OSError, os.makedirs, path, exist_ok=True)
os.remove(path)
def tearDown(self):
path = os.path.join(support.TESTFN, 'dir1', 'dir2', 'dir3',
'dir4', 'dir5', 'dir6')
# If the tests failed, the bottom-most directory ('../dir6')
# may not have been created, so we look for the outermost directory
# that exists.
while not os.path.exists(path) and path != support.TESTFN:
path = os.path.dirname(path)
os.removedirs(path)
@unittest.skipUnless(hasattr(os, 'chown'), "Test needs chown")
class ChownFileTests(unittest.TestCase):
@classmethod
def setUpClass(cls):
os.mkdir(support.TESTFN)
def test_chown_uid_gid_arguments_must_be_index(self):
stat = os.stat(support.TESTFN)
uid = stat.st_uid
gid = stat.st_gid
for value in (-1.0, -1j, decimal.Decimal(-1), fractions.Fraction(-2, 2)):
self.assertRaises(TypeError, os.chown, support.TESTFN, value, gid)
self.assertRaises(TypeError, os.chown, support.TESTFN, uid, value)
self.assertIsNone(os.chown(support.TESTFN, uid, gid))
self.assertIsNone(os.chown(support.TESTFN, -1, -1))
@unittest.skipUnless(len(groups) > 1, "test needs more than one group")
def test_chown(self):
gid_1, gid_2 = groups[:2]
uid = os.stat(support.TESTFN).st_uid
os.chown(support.TESTFN, uid, gid_1)
gid = os.stat(support.TESTFN).st_gid
self.assertEqual(gid, gid_1)
os.chown(support.TESTFN, uid, gid_2)
gid = os.stat(support.TESTFN).st_gid
self.assertEqual(gid, gid_2)
@unittest.skipUnless(root_in_posix and len(all_users) > 1,
"test needs root privilege and more than one user")
def test_chown_with_root(self):
uid_1, uid_2 = all_users[:2]
gid = os.stat(support.TESTFN).st_gid
os.chown(support.TESTFN, uid_1, gid)
uid = os.stat(support.TESTFN).st_uid
self.assertEqual(uid, uid_1)
os.chown(support.TESTFN, uid_2, gid)
uid = os.stat(support.TESTFN).st_uid
self.assertEqual(uid, uid_2)
@unittest.skipUnless(not root_in_posix and len(all_users) > 1,
"test needs non-root account and more than one user")
def test_chown_without_permission(self):
uid_1, uid_2 = all_users[:2]
gid = os.stat(support.TESTFN).st_gid
with self.assertRaises(PermissionError):
os.chown(support.TESTFN, uid_1, gid)
os.chown(support.TESTFN, uid_2, gid)
@classmethod
def tearDownClass(cls):
os.rmdir(support.TESTFN)
class RemoveDirsTests(unittest.TestCase):
def setUp(self):
os.makedirs(support.TESTFN)
def tearDown(self):
support.rmtree(support.TESTFN)
def test_remove_all(self):
dira = os.path.join(support.TESTFN, 'dira')
os.mkdir(dira)
dirb = os.path.join(dira, 'dirb')
os.mkdir(dirb)
os.removedirs(dirb)
self.assertFalse(os.path.exists(dirb))
self.assertFalse(os.path.exists(dira))
self.assertFalse(os.path.exists(support.TESTFN))
def test_remove_partial(self):
dira = os.path.join(support.TESTFN, 'dira')
os.mkdir(dira)
dirb = os.path.join(dira, 'dirb')
os.mkdir(dirb)
create_file(os.path.join(dira, 'file.txt'))
os.removedirs(dirb)
self.assertFalse(os.path.exists(dirb))
self.assertTrue(os.path.exists(dira))
self.assertTrue(os.path.exists(support.TESTFN))
def test_remove_nothing(self):
dira = os.path.join(support.TESTFN, 'dira')
os.mkdir(dira)
dirb = os.path.join(dira, 'dirb')
os.mkdir(dirb)
create_file(os.path.join(dirb, 'file.txt'))
with self.assertRaises(OSError):
os.removedirs(dirb)
self.assertTrue(os.path.exists(dirb))
self.assertTrue(os.path.exists(dira))
self.assertTrue(os.path.exists(support.TESTFN))
class DevNullTests(unittest.TestCase):
def test_devnull(self):
with open(os.devnull, 'wb', 0) as f:
f.write(b'hello')
f.close()
with open(os.devnull, 'rb') as f:
self.assertEqual(f.read(), b'')
class URandomTests(unittest.TestCase):
def test_urandom_length(self):
self.assertEqual(len(os.urandom(0)), 0)
self.assertEqual(len(os.urandom(1)), 1)
self.assertEqual(len(os.urandom(10)), 10)
self.assertEqual(len(os.urandom(100)), 100)
self.assertEqual(len(os.urandom(1000)), 1000)
def test_urandom_value(self):
data1 = os.urandom(16)
self.assertIsInstance(data1, bytes)
data2 = os.urandom(16)
self.assertNotEqual(data1, data2)
def get_urandom_subprocess(self, count):
code = '\n'.join((
'import os, sys',
'data = os.urandom(%s)' % count,
'sys.stdout.buffer.write(data)',
'sys.stdout.buffer.flush()'))
out = assert_python_ok('-c', code)
stdout = out[1]
self.assertEqual(len(stdout), 16)
return stdout
def test_urandom_subprocess(self):
data1 = self.get_urandom_subprocess(16)
data2 = self.get_urandom_subprocess(16)
self.assertNotEqual(data1, data2)
@unittest.skipUnless(hasattr(os, 'getrandom'), 'need os.getrandom()')
class GetRandomTests(unittest.TestCase):
@classmethod
def setUpClass(cls):
try:
os.getrandom(1)
except OSError as exc:
if exc.errno == errno.ENOSYS:
# Python compiled on a more recent Linux version
# than the current Linux kernel
raise unittest.SkipTest("getrandom() syscall fails with ENOSYS")
else:
raise
def test_getrandom_type(self):
data = os.getrandom(16)
self.assertIsInstance(data, bytes)
self.assertEqual(len(data), 16)
def test_getrandom0(self):
empty = os.getrandom(0)
self.assertEqual(empty, b'')
def test_getrandom_random(self):
self.assertTrue(hasattr(os, 'GRND_RANDOM'))
# Don't test os.getrandom(1, os.GRND_RANDOM) to not consume the rare
# resource /dev/random
def test_getrandom_nonblock(self):
# The call must not fail. Check also that the flag exists
try:
os.getrandom(1, os.GRND_NONBLOCK)
except BlockingIOError:
# System urandom is not initialized yet
pass
def test_getrandom_value(self):
data1 = os.getrandom(16)
data2 = os.getrandom(16)
self.assertNotEqual(data1, data2)
# os.urandom() doesn't use a file descriptor when it is implemented with the
# getentropy() function, the getrandom() function or the getrandom() syscall
OS_URANDOM_DONT_USE_FD = (
sysconfig.get_config_var('HAVE_GETENTROPY') == 1
or sysconfig.get_config_var('HAVE_GETRANDOM') == 1
or sysconfig.get_config_var('HAVE_GETRANDOM_SYSCALL') == 1)
@unittest.skipIf(OS_URANDOM_DONT_USE_FD ,
"os.random() does not use a file descriptor")
class URandomFDTests(unittest.TestCase):
@unittest.skipUnless(resource, "test requires the resource module")
def test_urandom_failure(self):
# Check urandom() failing when it is not able to open /dev/random.
# We spawn a new process to make the test more robust (if getrlimit()
# failed to restore the file descriptor limit after this, the whole
# test suite would crash; this actually happened on the OS X Tiger
# buildbot).
code = """if 1:
import errno
import os
import resource
soft_limit, hard_limit = resource.getrlimit(resource.RLIMIT_NOFILE)
resource.setrlimit(resource.RLIMIT_NOFILE, (1, hard_limit))
try:
os.urandom(16)
except OSError as e:
assert e.errno == errno.EMFILE, e.errno
else:
raise AssertionError("OSError not raised")
"""
assert_python_ok('-c', code)
def test_urandom_fd_closed(self):
# Issue #21207: urandom() should reopen its fd to /dev/urandom if
# closed.
code = """if 1:
import os
import sys
import test.support
os.urandom(4)
with test.support.SuppressCrashReport():
os.closerange(3, 256)
sys.stdout.buffer.write(os.urandom(4))
"""
rc, out, err = assert_python_ok('-Sc', code)
def test_urandom_fd_reopened(self):
# Issue #21207: urandom() should detect its fd to /dev/urandom
# changed to something else, and reopen it.
self.addCleanup(support.unlink, support.TESTFN)
create_file(support.TESTFN, b"x" * 256)
code = """if 1:
import os
import sys
import test.support
os.urandom(4)
with test.support.SuppressCrashReport():
for fd in range(3, 256):
try:
os.close(fd)
except OSError:
pass
else:
# Found the urandom fd (XXX hopefully)
break
os.closerange(3, 256)
with open({TESTFN!r}, 'rb') as f:
new_fd = f.fileno()
# Issue #26935: posix allows new_fd and fd to be equal but
# some libc implementations have dup2 return an error in this
# case.
if new_fd != fd:
os.dup2(new_fd, fd)
sys.stdout.buffer.write(os.urandom(4))
sys.stdout.buffer.write(os.urandom(4))
""".format(TESTFN=support.TESTFN)
rc, out, err = assert_python_ok('-Sc', code)
self.assertEqual(len(out), 8)
self.assertNotEqual(out[0:4], out[4:8])
rc, out2, err2 = assert_python_ok('-Sc', code)
self.assertEqual(len(out2), 8)
self.assertNotEqual(out2, out)
@contextlib.contextmanager
def _execvpe_mockup(defpath=None):
"""
Stubs out execv and execve functions when used as context manager.
Records exec calls. The mock execv and execve functions always raise an
exception as they would normally never return.
"""
# A list of tuples containing (function name, first arg, args)
# of calls to execv or execve that have been made.
calls = []
def mock_execv(name, *args):
calls.append(('execv', name, args))
raise RuntimeError("execv called")
def mock_execve(name, *args):
calls.append(('execve', name, args))
raise OSError(errno.ENOTDIR, "execve called")
try:
orig_execv = os.execv
orig_execve = os.execve
orig_defpath = os.defpath
os.execv = mock_execv
os.execve = mock_execve
if defpath is not None:
os.defpath = defpath
yield calls
finally:
os.execv = orig_execv
os.execve = orig_execve
os.defpath = orig_defpath
class ExecTests(unittest.TestCase):
@unittest.skipIf(USING_LINUXTHREADS,
"avoid triggering a linuxthreads bug: see issue #4970")
def test_execvpe_with_bad_program(self):
self.assertRaises(OSError, os.execvpe, 'no such app-',
['no such app-'], None)
def test_execv_with_bad_arglist(self):
self.assertRaises(ValueError, os.execv, 'notepad', ())
self.assertRaises(ValueError, os.execv, 'notepad', [])
self.assertRaises(ValueError, os.execv, 'notepad', ('',))
self.assertRaises(ValueError, os.execv, 'notepad', [''])
def test_execvpe_with_bad_arglist(self):
self.assertRaises(ValueError, os.execvpe, 'notepad', [], None)
self.assertRaises(ValueError, os.execvpe, 'notepad', [], {})
self.assertRaises(ValueError, os.execvpe, 'notepad', [''], {})
@unittest.skipUnless(hasattr(os, '_execvpe'),
"No internal os._execvpe function to test.")
def _test_internal_execvpe(self, test_type):
program_path = os.sep + 'absolutepath'
if test_type is bytes:
program = b'executable'
fullpath = os.path.join(os.fsencode(program_path), program)
native_fullpath = fullpath
arguments = [b'progname', 'arg1', 'arg2']
else:
program = 'executable'
arguments = ['progname', 'arg1', 'arg2']
fullpath = os.path.join(program_path, program)
if os.name != "nt":
native_fullpath = os.fsencode(fullpath)
else:
native_fullpath = fullpath
env = {'spam': 'beans'}
# test os._execvpe() with an absolute path
with _execvpe_mockup() as calls:
self.assertRaises(RuntimeError,
os._execvpe, fullpath, arguments)
self.assertEqual(len(calls), 1)
self.assertEqual(calls[0], ('execv', fullpath, (arguments,)))
# test os._execvpe() with a relative path:
# os.get_exec_path() returns defpath
with _execvpe_mockup(defpath=program_path) as calls:
self.assertRaises(OSError,
os._execvpe, program, arguments, env=env)
self.assertEqual(len(calls), 1)
self.assertSequenceEqual(calls[0],
('execve', native_fullpath, (arguments, env)))
# test os._execvpe() with a relative path:
# os.get_exec_path() reads the 'PATH' variable
with _execvpe_mockup() as calls:
env_path = env.copy()
if test_type is bytes:
env_path[b'PATH'] = program_path
else:
env_path['PATH'] = program_path
self.assertRaises(OSError,
os._execvpe, program, arguments, env=env_path)
self.assertEqual(len(calls), 1)
self.assertSequenceEqual(calls[0],
('execve', native_fullpath, (arguments, env_path)))
def test_internal_execvpe_str(self):
self._test_internal_execvpe(str)
if os.name != "nt":
self._test_internal_execvpe(bytes)
def test_execve_invalid_env(self):
args = [sys.executable, '-c', 'pass']
# null character in the enviroment variable name
newenv = os.environ.copy()
newenv["FRUIT\0VEGETABLE"] = "cabbage"
with self.assertRaises(ValueError):
os.execve(args[0], args, newenv)
# null character in the enviroment variable value
newenv = os.environ.copy()
newenv["FRUIT"] = "orange\0VEGETABLE=cabbage"
with self.assertRaises(ValueError):
os.execve(args[0], args, newenv)
# equal character in the enviroment variable name
newenv = os.environ.copy()
newenv["FRUIT=ORANGE"] = "lemon"
with self.assertRaises(ValueError):
os.execve(args[0], args, newenv)
@unittest.skipUnless(sys.platform == "win32", "Win32-specific test")
def test_execve_with_empty_path(self):
# bpo-32890: Check GetLastError() misuse
try:
os.execve('', ['arg'], {})
except OSError as e:
self.assertTrue(e.winerror is None or e.winerror != 0)
else:
self.fail('No OSError raised')
@unittest.skipUnless(sys.platform == "win32", "Win32 specific tests")
class Win32ErrorTests(unittest.TestCase):
def setUp(self):
try:
os.stat(support.TESTFN)
except FileNotFoundError:
exists = False
except OSError as exc:
exists = True
self.fail("file %s must not exist; os.stat failed with %s"
% (support.TESTFN, exc))
else:
self.fail("file %s must not exist" % support.TESTFN)
def test_rename(self):
self.assertRaises(OSError, os.rename, support.TESTFN, support.TESTFN+".bak")
def test_remove(self):
self.assertRaises(OSError, os.remove, support.TESTFN)
def test_chdir(self):
self.assertRaises(OSError, os.chdir, support.TESTFN)
def test_mkdir(self):
self.addCleanup(support.unlink, support.TESTFN)
with open(support.TESTFN, "x") as f:
self.assertRaises(OSError, os.mkdir, support.TESTFN)
def test_utime(self):
self.assertRaises(OSError, os.utime, support.TESTFN, None)
def test_chmod(self):
self.assertRaises(OSError, os.chmod, support.TESTFN, 0)
@unittest.skip
class TestInvalidFD(unittest.TestCase):
singles = ["fchdir", "dup", "fdopen", "fdatasync", "fstat",
"fstatvfs", "fsync", "tcgetpgrp", "ttyname"]
#singles.append("close")
#We omit close because it doesn't raise an exception on some platforms
def get_single(f):
def helper(self):
if hasattr(os, f):
self.check(getattr(os, f))
return helper
for f in singles:
locals()["test_"+f] = get_single(f)
def check(self, f, *args):
try:
f(support.make_bad_fd(), *args)
except OSError as e:
self.assertEqual(e.errno, errno.EBADF)
else:
self.fail("%r didn't raise an OSError with a bad file descriptor"
% f)
@unittest.skipUnless(hasattr(os, 'isatty'), 'test needs os.isatty()')
def test_isatty(self):
self.assertEqual(os.isatty(support.make_bad_fd()), False)
@unittest.skipUnless(hasattr(os, 'closerange'), 'test needs os.closerange()')
def test_closerange(self):
fd = support.make_bad_fd()
# Make sure none of the descriptors we are about to close are
# currently valid (issue 6542).
for i in range(10):
try: os.fstat(fd+i)
except OSError:
pass
else:
break
if i < 2:
raise unittest.SkipTest(
"Unable to acquire a range of invalid file descriptors")
self.assertEqual(os.closerange(fd, fd + i-1), None)
@unittest.skipUnless(hasattr(os, 'dup2'), 'test needs os.dup2()')
def test_dup2(self):
self.check(os.dup2, 20)
@unittest.skipUnless(hasattr(os, 'fchmod'), 'test needs os.fchmod()')
def test_fchmod(self):
self.check(os.fchmod, 0)
@unittest.skipUnless(hasattr(os, 'fchown'), 'test needs os.fchown()')
def test_fchown(self):
self.check(os.fchown, -1, -1)
@unittest.skipUnless(hasattr(os, 'fpathconf'), 'test needs os.fpathconf()')
def test_fpathconf(self):
self.check(os.pathconf, "PC_NAME_MAX")
self.check(os.fpathconf, "PC_NAME_MAX")
@unittest.skipUnless(hasattr(os, 'ftruncate'), 'test needs os.ftruncate()')
def test_ftruncate(self):
self.check(os.truncate, 0)
self.check(os.ftruncate, 0)
@unittest.skipUnless(hasattr(os, 'lseek'), 'test needs os.lseek()')
def test_lseek(self):
self.check(os.lseek, 0, 0)
@unittest.skipUnless(hasattr(os, 'read'), 'test needs os.read()')
def test_read(self):
self.check(os.read, 1)
@unittest.skipUnless(hasattr(os, 'readv'), 'test needs os.readv()')
def test_readv(self):
buf = bytearray(10)
self.check(os.readv, [buf])
@unittest.skipUnless(hasattr(os, 'tcsetpgrp'), 'test needs os.tcsetpgrp()')
def test_tcsetpgrpt(self):
self.check(os.tcsetpgrp, 0)
@unittest.skipUnless(hasattr(os, 'write'), 'test needs os.write()')
def test_write(self):
self.check(os.write, b" ")
@unittest.skipUnless(hasattr(os, 'writev'), 'test needs os.writev()')
def test_writev(self):
self.check(os.writev, [b'abc'])
def test_inheritable(self):
self.check(os.get_inheritable)
self.check(os.set_inheritable, True)
@unittest.skipUnless(hasattr(os, 'get_blocking'),
'needs os.get_blocking() and os.set_blocking()')
def test_blocking(self):
self.check(os.get_blocking)
self.check(os.set_blocking, True)
class LinkTests(unittest.TestCase):
def setUp(self):
self.file1 = support.TESTFN
self.file2 = os.path.join(support.TESTFN + "2")
def tearDown(self):
for file in (self.file1, self.file2):
if os.path.exists(file):
os.unlink(file)
def _test_link(self, file1, file2):
create_file(file1)
os.link(file1, file2)
with open(file1, "r") as f1, open(file2, "r") as f2:
self.assertTrue(os.path.sameopenfile(f1.fileno(), f2.fileno()))
def test_link(self):
self._test_link(self.file1, self.file2)
def test_link_bytes(self):
self._test_link(bytes(self.file1, sys.getfilesystemencoding()),
bytes(self.file2, sys.getfilesystemencoding()))
def test_unicode_name(self):
try:
os.fsencode("\xf1")
except UnicodeError:
raise unittest.SkipTest("Unable to encode for this platform.")
self.file1 += "\xf1"
self.file2 = self.file1 + "2"
self._test_link(self.file1, self.file2)
@unittest.skipIf(sys.platform == "win32", "Posix specific tests")
class PosixUidGidTests(unittest.TestCase):
@unittest.skipUnless(hasattr(os, 'setuid'), 'test needs os.setuid()')
def test_setuid(self):
if os.getuid() != 0:
self.assertRaises(OSError, os.setuid, 0)
self.assertRaises(OverflowError, os.setuid, 1<<32)
@unittest.skipUnless(hasattr(os, 'setgid'), 'test needs os.setgid()')
def test_setgid(self):
if os.getuid() != 0 and not HAVE_WHEEL_GROUP:
self.assertRaises(OSError, os.setgid, 0)
self.assertRaises(OverflowError, os.setgid, 1<<32)
@unittest.skipUnless(hasattr(os, 'seteuid'), 'test needs os.seteuid()')
def test_seteuid(self):
if os.getuid() != 0:
self.assertRaises(OSError, os.seteuid, 0)
self.assertRaises(OverflowError, os.seteuid, 1<<32)
@unittest.skipUnless(hasattr(os, 'setegid'), 'test needs os.setegid()')
def test_setegid(self):
if os.getuid() != 0 and not HAVE_WHEEL_GROUP:
self.assertRaises(OSError, os.setegid, 0)
self.assertRaises(OverflowError, os.setegid, 1<<32)
@unittest.skipUnless(hasattr(os, 'setreuid'), 'test needs os.setreuid()')
def test_setreuid(self):
if os.getuid() != 0:
self.assertRaises(OSError, os.setreuid, 0, 0)
self.assertRaises(OverflowError, os.setreuid, 1<<32, 0)
self.assertRaises(OverflowError, os.setreuid, 0, 1<<32)
@unittest.skipUnless(hasattr(os, 'setreuid'), 'test needs os.setreuid()')
def test_setreuid_neg1(self):
# Needs to accept -1. We run this in a subprocess to avoid
# altering the test runner's process state (issue8045).
subprocess.check_call([
sys.executable, '-c',
'import os,sys;os.setreuid(-1,-1);sys.exit(0)'])
@unittest.skipUnless(hasattr(os, 'setregid'), 'test needs os.setregid()')
def test_setregid(self):
if os.getuid() != 0 and not HAVE_WHEEL_GROUP:
self.assertRaises(OSError, os.setregid, 0, 0)
self.assertRaises(OverflowError, os.setregid, 1<<32, 0)
self.assertRaises(OverflowError, os.setregid, 0, 1<<32)
@unittest.skipUnless(hasattr(os, 'setregid'), 'test needs os.setregid()')
def test_setregid_neg1(self):
# Needs to accept -1. We run this in a subprocess to avoid
# altering the test runner's process state (issue8045).
subprocess.check_call([
sys.executable, '-c',
'import os,sys;os.setregid(-1,-1);sys.exit(0)'])
@unittest.skipIf(sys.platform == "win32" or sys.platform == "cosmo", "Posix specific tests")
class Pep383Tests(unittest.TestCase):
def setUp(self):
if support.TESTFN_UNENCODABLE:
self.dir = support.TESTFN_UNENCODABLE
elif support.TESTFN_NONASCII:
self.dir = support.TESTFN_NONASCII
else:
self.dir = support.TESTFN
self.bdir = os.fsencode(self.dir)
bytesfn = []
def add_filename(fn):
try:
fn = os.fsencode(fn)
except UnicodeEncodeError:
return
bytesfn.append(fn)
add_filename(support.TESTFN_UNICODE)
if support.TESTFN_UNENCODABLE:
add_filename(support.TESTFN_UNENCODABLE)
if support.TESTFN_NONASCII:
add_filename(support.TESTFN_NONASCII)
if not bytesfn:
self.skipTest("couldn't create any non-ascii filename")
self.unicodefn = set()
os.mkdir(self.dir)
try:
for fn in bytesfn:
support.create_empty_file(os.path.join(self.bdir, fn))
fn = os.fsdecode(fn)
if fn in self.unicodefn:
raise ValueError("duplicate filename")
self.unicodefn.add(fn)
except:
shutil.rmtree(self.dir)
raise
def tearDown(self):
shutil.rmtree(self.dir)
def test_listdir(self):
expected = self.unicodefn
found = set(os.listdir(self.dir))
self.assertEqual(found, expected)
# test listdir without arguments
current_directory = os.getcwd()
try:
os.chdir(os.sep)
self.assertEqual(set(os.listdir()), set(os.listdir(os.sep)))
finally:
os.chdir(current_directory)
def test_open(self):
for fn in self.unicodefn:
f = open(os.path.join(self.dir, fn), 'rb')
f.close()
@unittest.skipUnless(hasattr(os, 'statvfs'),
"need os.statvfs()")
def test_statvfs(self):
# issue #9645
for fn in self.unicodefn:
# should not fail with file not found error
fullname = os.path.join(self.dir, fn)
os.statvfs(fullname)
def test_stat(self):
for fn in self.unicodefn:
os.stat(os.path.join(self.dir, fn))
@support.skip_unless_symlink
class NonLocalSymlinkTests(unittest.TestCase):
def setUp(self):
r"""
Create this structure:
base
\___ some_dir
"""
os.makedirs('base/some_dir')
def tearDown(self):
shutil.rmtree('base')
def test_directory_link_nonlocal(self):
"""
The symlink target should resolve relative to the link, not relative
to the current directory.
Then, link base/some_link -> base/some_dir and ensure that some_link
is resolved as a directory.
In issue13772, it was discovered that directory detection failed if
the symlink target was not specified relative to the current
directory, which was a defect in the implementation.
"""
src = os.path.join('base', 'some_link')
os.symlink('some_dir', src)
assert os.path.isdir(src)
class FSEncodingTests(unittest.TestCase):
def test_nop(self):
self.assertEqual(os.fsencode(b'abc\xff'), b'abc\xff')
self.assertEqual(os.fsdecode('abc\u0141'), 'abc\u0141')
def test_identity(self):
# assert fsdecode(fsencode(x)) == x
for fn in ('unicode\u0141', 'latin\xe9', 'ascii'):
try:
bytesfn = os.fsencode(fn)
except UnicodeEncodeError:
continue
self.assertEqual(os.fsdecode(bytesfn), fn)
class DeviceEncodingTests(unittest.TestCase):
def test_bad_fd(self):
# Return None when an fd doesn't actually exist.
self.assertIsNone(os.device_encoding(123456))
@unittest.skipUnless(os.isatty(0) and (sys.platform.startswith('win') or
(hasattr(locale, 'nl_langinfo') and hasattr(locale, 'CODESET'))),
'test requires a tty and either Windows or nl_langinfo(CODESET)')
def test_device_encoding(self):
encoding = os.device_encoding(0)
self.assertIsNotNone(encoding)
self.assertTrue(codecs.lookup(encoding))
class PidTests(unittest.TestCase):
@unittest.skipUnless(hasattr(os, 'getppid'), "test needs os.getppid")
def test_getppid(self):
p = subprocess.Popen([sys.executable, '-c',
'import os; print(os.getppid())'],
stdout=subprocess.PIPE)
stdout, _ = p.communicate()
# We are the parent of our subprocess
self.assertEqual(int(stdout), os.getpid())
def test_waitpid(self):
args = [sys.executable, '-c', 'pass']
# Add an implicit test for PyUnicode_FSConverter().
pid = os.spawnv(os.P_NOWAIT, FakePath(args[0]), args)
status = os.waitpid(pid, 0)
self.assertEqual(status, (pid, 0))
class SpawnTests(unittest.TestCase):
def create_args(self, *, with_env=False, use_bytes=False):
self.exitcode = 17
filename = support.TESTFN
self.addCleanup(support.unlink, filename)
if not with_env:
code = 'import sys; sys.exit(%s)' % self.exitcode
else:
self.env = dict(os.environ)
# create an unique key
self.key = str(uuid.uuid4())
self.env[self.key] = self.key
# read the variable from os.environ to check that it exists
code = ('import sys, os; magic = os.environ[%r]; sys.exit(%s)'
% (self.key, self.exitcode))
with open(filename, "w") as fp:
fp.write(code)
args = [sys.executable, filename]
if use_bytes:
args = [os.fsencode(a) for a in args]
self.env = {os.fsencode(k): os.fsencode(v)
for k, v in self.env.items()}
return args
@requires_os_func('spawnl')
def test_spawnl(self):
args = self.create_args()
exitcode = os.spawnl(os.P_WAIT, args[0], *args)
self.assertEqual(exitcode, self.exitcode)
# todo: see #431
# @requires_os_func('spawnle')
# def test_spawnle(self):
# args = self.create_args(with_env=True)
# exitcode = os.spawnle(os.P_WAIT, args[0], *args, self.env)
# self.assertEqual(exitcode, self.exitcode)
@requires_os_func('spawnlp')
def test_spawnlp(self):
args = self.create_args()
exitcode = os.spawnlp(os.P_WAIT, args[0], *args)
self.assertEqual(exitcode, self.exitcode)
# todo: see #431
# @requires_os_func('spawnlpe')
# def test_spawnlpe(self):
# args = self.create_args(with_env=True)
# exitcode = os.spawnlpe(os.P_WAIT, args[0], *args, self.env)
# self.assertEqual(exitcode, self.exitcode)
@requires_os_func('spawnv')
def test_spawnv(self):
args = self.create_args()
exitcode = os.spawnv(os.P_WAIT, args[0], args)
self.assertEqual(exitcode, self.exitcode)
# todo: see #431
# @requires_os_func('spawnve')
# def test_spawnve(self):
# args = self.create_args(with_env=True)
# exitcode = os.spawnve(os.P_WAIT, args[0], args, self.env)
# self.assertEqual(exitcode, self.exitcode)
@requires_os_func('spawnvp')
def test_spawnvp(self):
args = self.create_args()
exitcode = os.spawnvp(os.P_WAIT, args[0], args)
self.assertEqual(exitcode, self.exitcode)
# todo: see #431
# @requires_os_func('spawnvpe')
# def test_spawnvpe(self):
# args = self.create_args(with_env=True)
# exitcode = os.spawnvpe(os.P_WAIT, args[0], args, self.env)
# self.assertEqual(exitcode, self.exitcode)
@requires_os_func('spawnv')
def test_nowait(self):
args = self.create_args()
pid = os.spawnv(os.P_NOWAIT, args[0], args)
result = os.waitpid(pid, 0)
self.assertEqual(result[0], pid)
status = result[1]
if hasattr(os, 'WIFEXITED'):
self.assertTrue(os.WIFEXITED(status))
self.assertEqual(os.WEXITSTATUS(status), self.exitcode)
else:
self.assertEqual(status, self.exitcode << 8)
# todo: see #431
# @requires_os_func('spawnve')
# def test_spawnve_bytes(self):
# # Test bytes handling in parse_arglist and parse_envlist (#28114)
# args = self.create_args(with_env=True, use_bytes=True)
# exitcode = os.spawnve(os.P_WAIT, args[0], args, self.env)
# self.assertEqual(exitcode, self.exitcode)
@requires_os_func('spawnl')
def test_spawnl_noargs(self):
args = self.create_args()
self.assertRaises(ValueError, os.spawnl, os.P_NOWAIT, args[0])
self.assertRaises(ValueError, os.spawnl, os.P_NOWAIT, args[0], '')
@requires_os_func('spawnle')
def test_spawnle_noargs(self):
args = self.create_args()
self.assertRaises(ValueError, os.spawnle, os.P_NOWAIT, args[0], {})
self.assertRaises(ValueError, os.spawnle, os.P_NOWAIT, args[0], '', {})
@requires_os_func('spawnv')
def test_spawnv_noargs(self):
args = self.create_args()
self.assertRaises(ValueError, os.spawnv, os.P_NOWAIT, args[0], ())
self.assertRaises(ValueError, os.spawnv, os.P_NOWAIT, args[0], [])
self.assertRaises(ValueError, os.spawnv, os.P_NOWAIT, args[0], ('',))
self.assertRaises(ValueError, os.spawnv, os.P_NOWAIT, args[0], [''])
@requires_os_func('spawnve')
def test_spawnve_noargs(self):
args = self.create_args()
self.assertRaises(ValueError, os.spawnve, os.P_NOWAIT, args[0], (), {})
self.assertRaises(ValueError, os.spawnve, os.P_NOWAIT, args[0], [], {})
self.assertRaises(ValueError, os.spawnve, os.P_NOWAIT, args[0], ('',), {})
self.assertRaises(ValueError, os.spawnve, os.P_NOWAIT, args[0], [''], {})
def _test_invalid_env(self, spawn):
args = [sys.executable, '-c', 'pass']
# null character in the enviroment variable name
newenv = os.environ.copy()
newenv["FRUIT\0VEGETABLE"] = "cabbage"
try:
exitcode = spawn(os.P_WAIT, args[0], args, newenv)
except ValueError:
pass
else:
self.assertEqual(exitcode, 127)
# null character in the enviroment variable value
newenv = os.environ.copy()
newenv["FRUIT"] = "orange\0VEGETABLE=cabbage"
try:
exitcode = spawn(os.P_WAIT, args[0], args, newenv)
except ValueError:
pass
else:
self.assertEqual(exitcode, 127)
# equal character in the enviroment variable name
newenv = os.environ.copy()
newenv["FRUIT=ORANGE"] = "lemon"
try:
exitcode = spawn(os.P_WAIT, args[0], args, newenv)
except ValueError:
pass
else:
self.assertEqual(exitcode, 127)
# equal character in the enviroment variable value
filename = support.TESTFN
self.addCleanup(support.unlink, filename)
with open(filename, "w") as fp:
fp.write('import sys, os\n'
'if os.getenv("FRUIT") != "orange=lemon":\n'
' raise AssertionError')
args = [sys.executable, filename]
newenv = os.environ.copy()
newenv["FRUIT"] = "orange=lemon"
exitcode = spawn(os.P_WAIT, args[0], args, newenv)
self.assertEqual(exitcode, 0)
@requires_os_func('spawnve')
def test_spawnve_invalid_env(self):
self._test_invalid_env(os.spawnve)
@requires_os_func('spawnvpe')
def test_spawnvpe_invalid_env(self):
self._test_invalid_env(os.spawnvpe)
# The introduction of this TestCase caused at least two different errors on
# *nix buildbots. Temporarily skip this to let the buildbots move along.
@unittest.skip("Skip due to platform/environment differences on *NIX buildbots")
@unittest.skipUnless(hasattr(os, 'getlogin'), "test needs os.getlogin")
class LoginTests(unittest.TestCase):
def test_getlogin(self):
user_name = os.getlogin()
self.assertNotEqual(len(user_name), 0)
@unittest.skipUnless(False and hasattr(os, 'getpriority') and hasattr(os, 'setpriority'),
"needs os.getpriority and os.setpriority")
class ProgramPriorityTests(unittest.TestCase):
"""Tests for os.getpriority() and os.setpriority()."""
def test_set_get_priority(self):
base = os.getpriority(os.PRIO_PROCESS, os.getpid())
os.setpriority(os.PRIO_PROCESS, os.getpid(), base + 1)
try:
new_prio = os.getpriority(os.PRIO_PROCESS, os.getpid())
if base >= 19 and new_prio <= 19:
raise unittest.SkipTest("unable to reliably test setpriority "
"at current nice level of %s" % base)
else:
self.assertEqual(new_prio, base + 1)
finally:
try:
os.setpriority(os.PRIO_PROCESS, os.getpid(), base)
except OSError as err:
if err.errno != errno.EACCES:
raise
if threading is not None:
class SendfileTestServer(asyncore.dispatcher, threading.Thread):
class Handler(asynchat.async_chat):
def __init__(self, conn):
asynchat.async_chat.__init__(self, conn)
self.in_buffer = []
self.accumulate = True
self.closed = False
self.push(b"220 ready\r\n")
def handle_read(self):
data = self.recv(4096)
if self.accumulate:
self.in_buffer.append(data)
def get_data(self):
return b''.join(self.in_buffer)
def handle_close(self):
self.close()
self.closed = True
def handle_error(self):
raise
def __init__(self, address):
threading.Thread.__init__(self)
asyncore.dispatcher.__init__(self)
self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
self.bind(address)
self.listen(5)
self.host, self.port = self.socket.getsockname()[:2]
self.handler_instance = None
self._active = False
self._active_lock = threading.Lock()
# --- public API
@property
def running(self):
return self._active
def start(self):
assert not self.running
self.__flag = threading.Event()
threading.Thread.start(self)
self.__flag.wait()
def stop(self):
assert self.running
self._active = False
self.join()
def wait(self):
# wait for handler connection to be closed, then stop the server
while not getattr(self.handler_instance, "closed", False):
time.sleep(0.001)
self.stop()
# --- internals
def run(self):
self._active = True
self.__flag.set()
while self._active and asyncore.socket_map:
self._active_lock.acquire()
asyncore.loop(timeout=0.001, count=1)
self._active_lock.release()
asyncore.close_all()
def handle_accept(self):
conn, addr = self.accept()
self.handler_instance = self.Handler(conn)
def handle_connect(self):
self.close()
handle_read = handle_connect
def writable(self):
return 0
def handle_error(self):
raise
@unittest.skipUnless(threading is not None, "test needs threading module")
@unittest.skipUnless(hasattr(os, 'sendfile'), "test needs os.sendfile()")
class TestSendfile(unittest.TestCase):
DATA = b"12345abcde" * 16 * 1024 # 160 KB
SUPPORT_HEADERS_TRAILERS = not sys.platform.startswith("linux") and \
not sys.platform.startswith("solaris") and \
not sys.platform.startswith("sunos")
requires_headers_trailers = unittest.skipUnless(SUPPORT_HEADERS_TRAILERS,
'requires headers and trailers support')
requires_32b = unittest.skipUnless(sys.maxsize < 2**32,
'test is only meaningful on 32-bit builds')
@classmethod
def setUpClass(cls):
cls.key = support.threading_setup()
create_file(support.TESTFN, cls.DATA)
@classmethod
def tearDownClass(cls):
support.threading_cleanup(*cls.key)
support.unlink(support.TESTFN)
def setUp(self):
self.server = SendfileTestServer((support.HOST, 0))
self.server.start()
self.client = socket.socket()
self.client.connect((self.server.host, self.server.port))
self.client.settimeout(1)
# synchronize by waiting for "220 ready" response
self.client.recv(1024)
self.sockno = self.client.fileno()
self.file = open(support.TESTFN, 'rb')
self.fileno = self.file.fileno()
def tearDown(self):
self.file.close()
self.client.close()
if self.server.running:
self.server.stop()
self.server = None
def sendfile_wrapper(self, *args, **kwargs):
"""A higher level wrapper representing how an application is
supposed to use sendfile().
"""
while True:
try:
return os.sendfile(*args, **kwargs)
except OSError as err:
if err.errno == errno.ECONNRESET:
# disconnected
raise
elif err.errno in (errno.EAGAIN, errno.EBUSY):
# we have to retry send data
continue
else:
raise
def test_send_whole_file(self):
# normal send
total_sent = 0
offset = 0
nbytes = 4096
while total_sent < len(self.DATA):
sent = self.sendfile_wrapper(self.sockno, self.fileno, offset, nbytes)
if sent == 0:
break
offset += sent
total_sent += sent
self.assertTrue(sent <= nbytes)
self.assertEqual(offset, total_sent)
self.assertEqual(total_sent, len(self.DATA))
self.client.shutdown(socket.SHUT_RDWR)
self.client.close()
self.server.wait()
data = self.server.handler_instance.get_data()
self.assertEqual(len(data), len(self.DATA))
self.assertEqual(data, self.DATA)
def test_send_at_certain_offset(self):
# start sending a file at a certain offset
total_sent = 0
offset = len(self.DATA) // 2
must_send = len(self.DATA) - offset
nbytes = 4096
while total_sent < must_send:
sent = self.sendfile_wrapper(self.sockno, self.fileno, offset, nbytes)
if sent == 0:
break
offset += sent
total_sent += sent
self.assertTrue(sent <= nbytes)
self.client.shutdown(socket.SHUT_RDWR)
self.client.close()
self.server.wait()
data = self.server.handler_instance.get_data()
expected = self.DATA[len(self.DATA) // 2:]
self.assertEqual(total_sent, len(expected))
self.assertEqual(len(data), len(expected))
self.assertEqual(data, expected)
def test_offset_overflow(self):
# specify an offset > file size
offset = len(self.DATA) + 4096
try:
sent = os.sendfile(self.sockno, self.fileno, offset, 4096)
except OSError as e:
# Solaris can raise EINVAL if offset >= file length, ignore.
if e.errno != errno.EINVAL:
raise
else:
self.assertEqual(sent, 0)
self.client.shutdown(socket.SHUT_RDWR)
self.client.close()
self.server.wait()
data = self.server.handler_instance.get_data()
self.assertEqual(data, b'')
def test_invalid_offset(self):
with self.assertRaises(OSError) as cm:
os.sendfile(self.sockno, self.fileno, -1, 4096)
self.assertEqual(cm.exception.errno, errno.EINVAL)
def test_keywords(self):
# Keyword arguments should be supported
os.sendfile(out=self.sockno, offset=0, count=4096,
**{'in': self.fileno})
if self.SUPPORT_HEADERS_TRAILERS:
os.sendfile(self.sockno, self.fileno, offset=0, count=4096,
headers=(), trailers=(), flags=0)
# --- headers / trailers tests
@requires_headers_trailers
def test_headers(self):
total_sent = 0
expected_data = b"x" * 512 + b"y" * 256 + self.DATA[:-1]
sent = os.sendfile(self.sockno, self.fileno, 0, 4096,
headers=[b"x" * 512, b"y" * 256])
self.assertLessEqual(sent, 512 + 256 + 4096)
total_sent += sent
offset = 4096
while total_sent < len(expected_data):
nbytes = min(len(expected_data) - total_sent, 4096)
sent = self.sendfile_wrapper(self.sockno, self.fileno,
offset, nbytes)
if sent == 0:
break
self.assertLessEqual(sent, nbytes)
total_sent += sent
offset += sent
self.assertEqual(total_sent, len(expected_data))
self.client.close()
self.server.wait()
data = self.server.handler_instance.get_data()
self.assertEqual(hash(data), hash(expected_data))
@requires_headers_trailers
def test_trailers(self):
TESTFN2 = support.TESTFN + "2"
file_data = b"abcdef"
self.addCleanup(support.unlink, TESTFN2)
create_file(TESTFN2, file_data)
with open(TESTFN2, 'rb') as f:
os.sendfile(self.sockno, f.fileno(), 0, 5,
trailers=[b"123456", b"789"])
self.client.close()
self.server.wait()
data = self.server.handler_instance.get_data()
self.assertEqual(data, b"abcde123456789")
@requires_headers_trailers
@requires_32b
def test_headers_overflow_32bits(self):
self.server.handler_instance.accumulate = False
with self.assertRaises(OSError) as cm:
os.sendfile(self.sockno, self.fileno, 0, 0,
headers=[b"x" * 2**16] * 2**15)
self.assertEqual(cm.exception.errno, errno.EINVAL)
@requires_headers_trailers
@requires_32b
def test_trailers_overflow_32bits(self):
self.server.handler_instance.accumulate = False
with self.assertRaises(OSError) as cm:
os.sendfile(self.sockno, self.fileno, 0, 0,
trailers=[b"x" * 2**16] * 2**15)
self.assertEqual(cm.exception.errno, errno.EINVAL)
@requires_headers_trailers
@unittest.skipUnless(hasattr(os, 'SF_NODISKIO'),
'test needs os.SF_NODISKIO')
def test_flags(self):
try:
os.sendfile(self.sockno, self.fileno, 0, 4096,
flags=os.SF_NODISKIO)
except OSError as err:
if err.errno not in (errno.EBUSY, errno.EAGAIN):
raise
def supports_extended_attributes():
if not hasattr(os, "setxattr"):
return False
try:
with open(support.TESTFN, "xb", 0) as fp:
try:
os.setxattr(fp.fileno(), b"user.test", b"")
except OSError:
return False
finally:
support.unlink(support.TESTFN)
return True
@unittest.skipUnless(supports_extended_attributes(),
"no non-broken extended attribute support")
# Kernels < 2.6.39 don't respect setxattr flags.
@support.requires_linux_version(2, 6, 39)
class ExtendedAttributeTests(unittest.TestCase):
def _check_xattrs_str(self, s, getxattr, setxattr, removexattr, listxattr, **kwargs):
fn = support.TESTFN
self.addCleanup(support.unlink, fn)
create_file(fn)
with self.assertRaises(OSError) as cm:
getxattr(fn, s("user.test"), **kwargs)
self.assertEqual(cm.exception.errno, errno.ENODATA)
init_xattr = listxattr(fn)
self.assertIsInstance(init_xattr, list)
setxattr(fn, s("user.test"), b"", **kwargs)
xattr = set(init_xattr)
xattr.add("user.test")
self.assertEqual(set(listxattr(fn)), xattr)
self.assertEqual(getxattr(fn, b"user.test", **kwargs), b"")
setxattr(fn, s("user.test"), b"hello", os.XATTR_REPLACE, **kwargs)
self.assertEqual(getxattr(fn, b"user.test", **kwargs), b"hello")
with self.assertRaises(OSError) as cm:
setxattr(fn, s("user.test"), b"bye", os.XATTR_CREATE, **kwargs)
self.assertEqual(cm.exception.errno, errno.EEXIST)
with self.assertRaises(OSError) as cm:
setxattr(fn, s("user.test2"), b"bye", os.XATTR_REPLACE, **kwargs)
self.assertEqual(cm.exception.errno, errno.ENODATA)
setxattr(fn, s("user.test2"), b"foo", os.XATTR_CREATE, **kwargs)
xattr.add("user.test2")
self.assertEqual(set(listxattr(fn)), xattr)
removexattr(fn, s("user.test"), **kwargs)
with self.assertRaises(OSError) as cm:
getxattr(fn, s("user.test"), **kwargs)
self.assertEqual(cm.exception.errno, errno.ENODATA)
xattr.remove("user.test")
self.assertEqual(set(listxattr(fn)), xattr)
self.assertEqual(getxattr(fn, s("user.test2"), **kwargs), b"foo")
setxattr(fn, s("user.test"), b"a"*1024, **kwargs)
self.assertEqual(getxattr(fn, s("user.test"), **kwargs), b"a"*1024)
removexattr(fn, s("user.test"), **kwargs)
many = sorted("user.test{}".format(i) for i in range(100))
for thing in many:
setxattr(fn, thing, b"x", **kwargs)
self.assertEqual(set(listxattr(fn)), set(init_xattr) | set(many))
def _check_xattrs(self, *args, **kwargs):
self._check_xattrs_str(str, *args, **kwargs)
support.unlink(support.TESTFN)
self._check_xattrs_str(os.fsencode, *args, **kwargs)
support.unlink(support.TESTFN)
def test_simple(self):
self._check_xattrs(os.getxattr, os.setxattr, os.removexattr,
os.listxattr)
def test_lpath(self):
self._check_xattrs(os.getxattr, os.setxattr, os.removexattr,
os.listxattr, follow_symlinks=False)
def test_fds(self):
def getxattr(path, *args):
with open(path, "rb") as fp:
return os.getxattr(fp.fileno(), *args)
def setxattr(path, *args):
with open(path, "wb", 0) as fp:
os.setxattr(fp.fileno(), *args)
def removexattr(path, *args):
with open(path, "wb", 0) as fp:
os.removexattr(fp.fileno(), *args)
def listxattr(path, *args):
with open(path, "rb") as fp:
return os.listxattr(fp.fileno(), *args)
self._check_xattrs(getxattr, setxattr, removexattr, listxattr)
@unittest.skipUnless(hasattr(os, 'get_terminal_size'), "requires os.get_terminal_size")
class TermsizeTests(unittest.TestCase):
def test_does_not_crash(self):
"""Check if get_terminal_size() returns a meaningful value.
There's no easy portable way to actually check the size of the
terminal, so let's check if it returns something sensible instead.
"""
try:
size = os.get_terminal_size()
except OSError as e:
if sys.platform == "win32" or e.errno in (errno.EINVAL, errno.ENOTTY):
# Under win32 a generic OSError can be thrown if the
# handle cannot be retrieved
self.skipTest("failed to query terminal size")
raise
self.assertGreaterEqual(size.columns, 0)
self.assertGreaterEqual(size.lines, 0)
def test_stty_match(self):
"""Check if stty returns the same results
stty actually tests stdin, so get_terminal_size is invoked on
stdin explicitly. If stty succeeded, then get_terminal_size()
should work too.
"""
try:
size = subprocess.check_output(['stty', 'size']).decode().split()
except (FileNotFoundError, subprocess.CalledProcessError):
self.skipTest("stty invocation failed")
expected = (int(size[1]), int(size[0])) # reversed order
try:
actual = os.get_terminal_size(sys.__stdin__.fileno())
except OSError as e:
if sys.platform == "win32" or e.errno in (errno.EINVAL, errno.ENOTTY):
# Under win32 a generic OSError can be thrown if the
# handle cannot be retrieved
self.skipTest("failed to query terminal size")
raise
self.assertEqual(expected, actual)
class OSErrorTests(unittest.TestCase):
def setUp(self):
class Str(str):
pass
self.bytes_filenames = []
self.unicode_filenames = []
if support.TESTFN_UNENCODABLE is not None:
decoded = support.TESTFN_UNENCODABLE
else:
decoded = support.TESTFN
self.unicode_filenames.append(decoded)
self.unicode_filenames.append(Str(decoded))
if support.TESTFN_UNDECODABLE is not None:
encoded = support.TESTFN_UNDECODABLE
else:
encoded = os.fsencode(support.TESTFN)
self.bytes_filenames.append(encoded)
self.bytes_filenames.append(bytearray(encoded))
self.bytes_filenames.append(memoryview(encoded))
self.filenames = self.bytes_filenames + self.unicode_filenames
def test_oserror_filename(self):
funcs = [
(self.filenames, os.chdir,),
(self.filenames, os.chmod, 0o777),
(self.filenames, os.lstat,),
(self.filenames, os.open, os.O_RDONLY),
(self.filenames, os.rmdir,),
(self.filenames, os.stat,),
(self.filenames, os.unlink,),
]
if sys.platform == "win32":
funcs.extend((
(self.bytes_filenames, os.rename, b"dst"),
(self.bytes_filenames, os.replace, b"dst"),
(self.unicode_filenames, os.rename, "dst"),
(self.unicode_filenames, os.replace, "dst"),
(self.unicode_filenames, os.listdir, ),
))
else:
funcs.extend((
(self.filenames, os.listdir,),
(self.filenames, os.rename, "dst"),
(self.filenames, os.replace, "dst"),
))
if hasattr(os, "chown"):
funcs.append((self.filenames, os.chown, 0, 0))
if hasattr(os, "lchown"):
funcs.append((self.filenames, os.lchown, 0, 0))
if hasattr(os, "truncate"):
funcs.append((self.filenames, os.truncate, 0))
if hasattr(os, "chflags"):
funcs.append((self.filenames, os.chflags, 0))
if hasattr(os, "lchflags"):
funcs.append((self.filenames, os.lchflags, 0))
if hasattr(os, "chroot"):
funcs.append((self.filenames, os.chroot,))
if hasattr(os, "link"):
if sys.platform == "win32":
funcs.append((self.bytes_filenames, os.link, b"dst"))
funcs.append((self.unicode_filenames, os.link, "dst"))
else:
funcs.append((self.filenames, os.link, "dst"))
if hasattr(os, "listxattr"):
funcs.extend((
(self.filenames, os.listxattr,),
(self.filenames, os.getxattr, "user.test"),
(self.filenames, os.setxattr, "user.test", b'user'),
(self.filenames, os.removexattr, "user.test"),
))
if hasattr(os, "lchmod"):
funcs.append((self.filenames, os.lchmod, 0o777))
if hasattr(os, "readlink"):
if sys.platform == "win32":
funcs.append((self.unicode_filenames, os.readlink,))
else:
funcs.append((self.filenames, os.readlink,))
for filenames, func, *func_args in funcs:
for name in filenames:
try:
if isinstance(name, (str, bytes)):
func(name, *func_args)
else:
with self.assertWarnsRegex(DeprecationWarning, 'should be'):
func(name, *func_args)
except OSError as err:
self.assertIs(err.filename, name, str(func))
except UnicodeDecodeError:
pass
else:
self.fail("No exception thrown by {}".format(func))
class CPUCountTests(unittest.TestCase):
def test_cpu_count(self):
cpus = os.cpu_count()
if cpus is not None:
self.assertIsInstance(cpus, int)
self.assertGreater(cpus, 0)
else:
self.skipTest("Could not determine the number of CPUs")
@unittest.skip
class FDInheritanceTests(unittest.TestCase):
def test_get_set_inheritable(self):
fd = os.open(__file__, os.O_RDONLY)
self.addCleanup(os.close, fd)
self.assertEqual(os.get_inheritable(fd), False)
os.set_inheritable(fd, True)
self.assertEqual(os.get_inheritable(fd), True)
@unittest.skipIf(fcntl is None, "need fcntl")
def test_get_inheritable_cloexec(self):
fd = os.open(__file__, os.O_RDONLY)
self.addCleanup(os.close, fd)
self.assertEqual(os.get_inheritable(fd), False)
# clear FD_CLOEXEC flag
flags = fcntl.fcntl(fd, fcntl.F_GETFD)
flags &= ~fcntl.FD_CLOEXEC
fcntl.fcntl(fd, fcntl.F_SETFD, flags)
self.assertEqual(os.get_inheritable(fd), True)
@unittest.skipIf(fcntl is None, "need fcntl")
def test_set_inheritable_cloexec(self):
fd = os.open(__file__, os.O_RDONLY)
self.addCleanup(os.close, fd)
self.assertEqual(fcntl.fcntl(fd, fcntl.F_GETFD) & fcntl.FD_CLOEXEC,
fcntl.FD_CLOEXEC)
os.set_inheritable(fd, True)
self.assertEqual(fcntl.fcntl(fd, fcntl.F_GETFD) & fcntl.FD_CLOEXEC,
0)
def test_open(self):
fd = os.open(__file__, os.O_RDONLY)
self.addCleanup(os.close, fd)
self.assertEqual(os.get_inheritable(fd), False)
@unittest.skipUnless(hasattr(os, 'pipe'), "need os.pipe()")
def test_pipe(self):
rfd, wfd = os.pipe()
self.addCleanup(os.close, rfd)
self.addCleanup(os.close, wfd)
self.assertEqual(os.get_inheritable(rfd), False)
self.assertEqual(os.get_inheritable(wfd), False)
def test_dup(self):
fd1 = os.open(__file__, os.O_RDONLY)
self.addCleanup(os.close, fd1)
fd2 = os.dup(fd1)
self.addCleanup(os.close, fd2)
self.assertEqual(os.get_inheritable(fd2), False)
@unittest.skipUnless(hasattr(os, 'dup2'), "need os.dup2()")
def test_dup2(self):
fd = os.open(__file__, os.O_RDONLY)
self.addCleanup(os.close, fd)
# inheritable by default
fd2 = os.open(__file__, os.O_RDONLY)
try:
os.dup2(fd, fd2)
self.assertEqual(os.get_inheritable(fd2), True)
finally:
os.close(fd2)
# force non-inheritable
fd3 = os.open(__file__, os.O_RDONLY)
try:
os.dup2(fd, fd3, inheritable=False)
self.assertEqual(os.get_inheritable(fd3), False)
finally:
os.close(fd3)
@unittest.skipUnless(hasattr(os, 'openpty'), "need os.openpty()")
def test_openpty(self):
master_fd, slave_fd = os.openpty()
self.addCleanup(os.close, master_fd)
self.addCleanup(os.close, slave_fd)
self.assertEqual(os.get_inheritable(master_fd), False)
self.assertEqual(os.get_inheritable(slave_fd), False)
class PathTConverterTests(unittest.TestCase):
# tuples of (function name, allows fd arguments, additional arguments to
# function, cleanup function)
functions = [
('stat', True, (), None),
('lstat', False, (), None),
('access', False, (os.F_OK,), None),
('chflags', False, (0,), None),
('lchflags', False, (0,), None),
('open', False, (0,), getattr(os, 'close', None)),
]
def test_path_t_converter(self):
str_filename = support.TESTFN
if os.name == 'nt':
bytes_fspath = bytes_filename = None
else:
bytes_filename = support.TESTFN.encode('ascii')
bytes_fspath = FakePath(bytes_filename)
fd = os.open(FakePath(str_filename), os.O_WRONLY|os.O_CREAT)
self.addCleanup(support.unlink, support.TESTFN)
self.addCleanup(os.close, fd)
int_fspath = FakePath(fd)
str_fspath = FakePath(str_filename)
for name, allow_fd, extra_args, cleanup_fn in self.functions:
with self.subTest(name=name):
try:
fn = getattr(os, name)
except AttributeError:
continue
for path in (str_filename, bytes_filename, str_fspath,
bytes_fspath):
if path is None:
continue
with self.subTest(name=name, path=path):
result = fn(path, *extra_args)
if cleanup_fn is not None:
cleanup_fn(result)
with self.assertRaisesRegex(
TypeError, 'should be string, bytes'):
fn(int_fspath, *extra_args)
if allow_fd:
result = fn(fd, *extra_args) # should not fail
if cleanup_fn is not None:
cleanup_fn(result)
else:
with self.assertRaisesRegex(
TypeError,
'os.PathLike'):
fn(fd, *extra_args)
@unittest.skipUnless(False and hasattr(os, 'get_blocking'),
'needs os.get_blocking() and os.set_blocking()')
class BlockingTests(unittest.TestCase):
def test_blocking(self):
fd = os.open(__file__, os.O_RDONLY)
self.addCleanup(os.close, fd)
self.assertEqual(os.get_blocking(fd), True)
os.set_blocking(fd, False)
self.assertEqual(os.get_blocking(fd), False)
os.set_blocking(fd, True)
self.assertEqual(os.get_blocking(fd), True)
class ExportsTests(unittest.TestCase):
def test_os_all(self):
self.assertIn('open', os.__all__)
self.assertIn('walk', os.__all__)
class TestScandir(unittest.TestCase):
check_no_resource_warning = support.check_no_resource_warning
def setUp(self):
self.path = os.path.realpath(support.TESTFN)
self.bytes_path = os.fsencode(self.path)
self.addCleanup(support.rmtree, self.path)
os.mkdir(self.path)
def create_file(self, name="file.txt"):
path = self.bytes_path if isinstance(name, bytes) else self.path
filename = os.path.join(path, name)
create_file(filename, b'python')
return filename
def get_entries(self, names):
entries = dict((entry.name, entry)
for entry in os.scandir(self.path))
self.assertEqual(sorted(entries.keys()), names)
return entries
def assert_stat_equal(self, stat1, stat2, skip_fields):
if skip_fields:
for attr in dir(stat1):
if not attr.startswith("st_"):
continue
if attr in ("st_dev", "st_ino", "st_nlink"):
continue
self.assertEqual(getattr(stat1, attr),
getattr(stat2, attr),
(stat1, stat2, attr))
else:
self.assertEqual(stat1, stat2)
def check_entry(self, entry, name, is_dir, is_file, is_symlink):
self.assertIsInstance(entry, os.DirEntry)
self.assertEqual(entry.name, name)
self.assertEqual(entry.path, os.path.join(self.path, name))
self.assertEqual(entry.inode(),
os.stat(entry.path, follow_symlinks=False).st_ino)
entry_stat = os.stat(entry.path)
self.assertEqual(entry.is_dir(),
stat.S_ISDIR(entry_stat.st_mode))
self.assertEqual(entry.is_file(),
stat.S_ISREG(entry_stat.st_mode))
self.assertEqual(entry.is_symlink(),
os.path.islink(entry.path))
entry_lstat = os.stat(entry.path, follow_symlinks=False)
self.assertEqual(entry.is_dir(follow_symlinks=False),
stat.S_ISDIR(entry_lstat.st_mode))
self.assertEqual(entry.is_file(follow_symlinks=False),
stat.S_ISREG(entry_lstat.st_mode))
self.assert_stat_equal(entry.stat(),
entry_stat,
os.name == 'nt' and not is_symlink)
self.assert_stat_equal(entry.stat(follow_symlinks=False),
entry_lstat,
os.name == 'nt')
def test_attributes(self):
link = hasattr(os, 'link')
symlink = support.can_symlink()
dirname = os.path.join(self.path, "dir")
os.mkdir(dirname)
filename = self.create_file("file.txt")
if link:
os.link(filename, os.path.join(self.path, "link_file.txt"))
if symlink:
os.symlink(dirname, os.path.join(self.path, "symlink_dir"),
target_is_directory=True)
os.symlink(filename, os.path.join(self.path, "symlink_file.txt"))
names = ['dir', 'file.txt']
if link:
names.append('link_file.txt')
if symlink:
names.extend(('symlink_dir', 'symlink_file.txt'))
entries = self.get_entries(names)
entry = entries['dir']
self.check_entry(entry, 'dir', True, False, False)
entry = entries['file.txt']
self.check_entry(entry, 'file.txt', False, True, False)
if link:
entry = entries['link_file.txt']
self.check_entry(entry, 'link_file.txt', False, True, False)
if symlink:
entry = entries['symlink_dir']
self.check_entry(entry, 'symlink_dir', True, False, True)
entry = entries['symlink_file.txt']
self.check_entry(entry, 'symlink_file.txt', False, True, True)
def get_entry(self, name):
path = self.bytes_path if isinstance(name, bytes) else self.path
entries = list(os.scandir(path))
self.assertEqual(len(entries), 1)
entry = entries[0]
self.assertEqual(entry.name, name)
return entry
def create_file_entry(self, name='file.txt'):
filename = self.create_file(name=name)
return self.get_entry(os.path.basename(filename))
def test_current_directory(self):
filename = self.create_file()
old_dir = os.getcwd()
try:
os.chdir(self.path)
# call scandir() without parameter: it must list the content
# of the current directory
entries = dict((entry.name, entry) for entry in os.scandir())
self.assertEqual(sorted(entries.keys()),
[os.path.basename(filename)])
finally:
os.chdir(old_dir)
def test_repr(self):
entry = self.create_file_entry()
self.assertEqual(repr(entry), "<DirEntry 'file.txt'>")
def test_fspath_protocol(self):
entry = self.create_file_entry()
self.assertEqual(os.fspath(entry), os.path.join(self.path, 'file.txt'))
def test_fspath_protocol_bytes(self):
bytes_filename = os.fsencode('bytesfile.txt')
bytes_entry = self.create_file_entry(name=bytes_filename)
fspath = os.fspath(bytes_entry)
self.assertIsInstance(fspath, bytes)
self.assertEqual(fspath,
os.path.join(os.fsencode(self.path),bytes_filename))
def test_removed_dir(self):
path = os.path.join(self.path, 'dir')
os.mkdir(path)
entry = self.get_entry('dir')
os.rmdir(path)
# On POSIX, is_dir() result depends if scandir() filled d_type or not
if os.name == 'nt':
self.assertTrue(entry.is_dir())
self.assertFalse(entry.is_file())
self.assertFalse(entry.is_symlink())
if os.name == 'nt':
self.assertRaises(FileNotFoundError, entry.inode)
# don't fail
entry.stat()
entry.stat(follow_symlinks=False)
else:
self.assertGreater(entry.inode(), 0)
self.assertRaises(FileNotFoundError, entry.stat)
self.assertRaises(FileNotFoundError, entry.stat, follow_symlinks=False)
def test_removed_file(self):
entry = self.create_file_entry()
os.unlink(entry.path)
self.assertFalse(entry.is_dir())
# On POSIX, is_dir() result depends if scandir() filled d_type or not
if os.name == 'nt':
self.assertTrue(entry.is_file())
self.assertFalse(entry.is_symlink())
if os.name == 'nt':
self.assertRaises(FileNotFoundError, entry.inode)
# don't fail
entry.stat()
entry.stat(follow_symlinks=False)
else:
self.assertGreater(entry.inode(), 0)
self.assertRaises(FileNotFoundError, entry.stat)
self.assertRaises(FileNotFoundError, entry.stat, follow_symlinks=False)
def test_broken_symlink(self):
if not support.can_symlink():
return self.skipTest('cannot create symbolic link')
filename = self.create_file("file.txt")
os.symlink(filename,
os.path.join(self.path, "symlink.txt"))
entries = self.get_entries(['file.txt', 'symlink.txt'])
entry = entries['symlink.txt']
os.unlink(filename)
self.assertGreater(entry.inode(), 0)
self.assertFalse(entry.is_dir())
self.assertFalse(entry.is_file()) # broken symlink returns False
self.assertFalse(entry.is_dir(follow_symlinks=False))
self.assertFalse(entry.is_file(follow_symlinks=False))
self.assertTrue(entry.is_symlink())
self.assertRaises(FileNotFoundError, entry.stat)
# don't fail
entry.stat(follow_symlinks=False)
def test_bytes(self):
self.create_file("file.txt")
path_bytes = os.fsencode(self.path)
entries = list(os.scandir(path_bytes))
self.assertEqual(len(entries), 1, entries)
entry = entries[0]
self.assertEqual(entry.name, b'file.txt')
self.assertEqual(entry.path,
os.fsencode(os.path.join(self.path, 'file.txt')))
def test_bytes_like(self):
self.create_file("file.txt")
for cls in bytearray, memoryview:
path_bytes = cls(os.fsencode(self.path))
with self.assertWarns(DeprecationWarning):
entries = list(os.scandir(path_bytes))
self.assertEqual(len(entries), 1, entries)
entry = entries[0]
self.assertEqual(entry.name, b'file.txt')
self.assertEqual(entry.path,
os.fsencode(os.path.join(self.path, 'file.txt')))
self.assertIs(type(entry.name), bytes)
self.assertIs(type(entry.path), bytes)
def test_empty_path(self):
self.assertRaises(FileNotFoundError, os.scandir, '')
def test_consume_iterator_twice(self):
self.create_file("file.txt")
iterator = os.scandir(self.path)
entries = list(iterator)
self.assertEqual(len(entries), 1, entries)
# check than consuming the iterator twice doesn't raise exception
entries2 = list(iterator)
self.assertEqual(len(entries2), 0, entries2)
def test_bad_path_type(self):
for obj in [1234, 1.234, {}, []]:
self.assertRaises(TypeError, os.scandir, obj)
def test_close(self):
self.create_file("file.txt")
self.create_file("file2.txt")
iterator = os.scandir(self.path)
next(iterator)
iterator.close()
# multiple closes
iterator.close()
with self.check_no_resource_warning():
del iterator
def test_context_manager(self):
self.create_file("file.txt")
self.create_file("file2.txt")
with os.scandir(self.path) as iterator:
next(iterator)
with self.check_no_resource_warning():
del iterator
def test_context_manager_close(self):
self.create_file("file.txt")
self.create_file("file2.txt")
with os.scandir(self.path) as iterator:
next(iterator)
iterator.close()
def test_context_manager_exception(self):
self.create_file("file.txt")
self.create_file("file2.txt")
with self.assertRaises(ZeroDivisionError):
with os.scandir(self.path) as iterator:
next(iterator)
1/0
with self.check_no_resource_warning():
del iterator
def test_resource_warning(self):
self.create_file("file.txt")
self.create_file("file2.txt")
iterator = os.scandir(self.path)
next(iterator)
with self.assertWarns(ResourceWarning):
del iterator
support.gc_collect()
# exhausted iterator
iterator = os.scandir(self.path)
list(iterator)
with self.check_no_resource_warning():
del iterator
class TestPEP519(unittest.TestCase):
# Abstracted so it can be overridden to test pure Python implementation
# if a C version is provided.
fspath = staticmethod(os.fspath)
def test_return_bytes(self):
for b in b'hello', b'goodbye', b'some/path/and/file':
self.assertEqual(b, self.fspath(b))
def test_return_string(self):
for s in 'hello', 'goodbye', 'some/path/and/file':
self.assertEqual(s, self.fspath(s))
def test_fsencode_fsdecode(self):
for p in "path/like/object", b"path/like/object":
pathlike = FakePath(p)
self.assertEqual(p, self.fspath(pathlike))
self.assertEqual(b"path/like/object", os.fsencode(pathlike))
self.assertEqual("path/like/object", os.fsdecode(pathlike))
def test_pathlike(self):
self.assertEqual('#feelthegil', self.fspath(FakePath('#feelthegil')))
self.assertTrue(issubclass(FakePath, os.PathLike))
self.assertTrue(isinstance(FakePath('x'), os.PathLike))
def test_garbage_in_exception_out(self):
vapor = type('blah', (), {})
for o in int, type, os, vapor():
self.assertRaises(TypeError, self.fspath, o)
def test_argument_required(self):
self.assertRaises(TypeError, self.fspath)
def test_bad_pathlike(self):
# __fspath__ returns a value other than str or bytes.
self.assertRaises(TypeError, self.fspath, FakePath(42))
# __fspath__ attribute that is not callable.
c = type('foo', (), {})
c.__fspath__ = 1
self.assertRaises(TypeError, self.fspath, c())
# __fspath__ raises an exception.
self.assertRaises(ZeroDivisionError, self.fspath,
FakePath(ZeroDivisionError()))
# Only test if the C version is provided, otherwise TestPEP519 already tested
# the pure Python implementation.
if hasattr(os, "_fspath"):
class TestPEP519PurePython(TestPEP519):
"""Explicitly test the pure Python implementation of os.fspath()."""
fspath = staticmethod(os._fspath)
if __name__ == "__main__":
unittest.main()
| 121,219 | 3,290 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_strftime.py | """
Unittest for time.strftime
"""
import calendar
import sys
import re
from test import support
import time
import unittest
# helper functions
def fixasctime(s):
if s[8] == ' ':
s = s[:8] + '0' + s[9:]
return s
def escapestr(text, ampm):
"""
Escape text to deal with possible locale values that have regex
syntax while allowing regex syntax used for comparison.
"""
new_text = re.escape(text)
new_text = new_text.replace(re.escape(ampm), ampm)
new_text = new_text.replace(r'\%', '%')
new_text = new_text.replace(r'\:', ':')
new_text = new_text.replace(r'\?', '?')
return new_text
class StrftimeTest(unittest.TestCase):
def _update_variables(self, now):
# we must update the local variables on every cycle
self.gmt = time.gmtime(now)
now = time.localtime(now)
if now[3] < 12: self.ampm='(AM|am)'
else: self.ampm='(PM|pm)'
self.jan1 = time.localtime(time.mktime((now[0], 1, 1, 0, 0, 0, 0, 1, 0)))
try:
if now[8]: self.tz = time.tzname[1]
else: self.tz = time.tzname[0]
except AttributeError:
self.tz = ''
if now[3] > 12: self.clock12 = now[3] - 12
elif now[3] > 0: self.clock12 = now[3]
else: self.clock12 = 12
self.now = now
def setUp(self):
try:
import java
java.util.Locale.setDefault(java.util.Locale.US)
except ImportError:
from locale import setlocale, LC_TIME
saved_locale = setlocale(LC_TIME)
setlocale(LC_TIME, 'C')
self.addCleanup(setlocale, LC_TIME, saved_locale)
def test_strftime(self):
now = time.time()
self._update_variables(now)
self.strftest1(now)
self.strftest2(now)
if support.verbose:
print("Strftime test, platform: %s, Python version: %s" % \
(sys.platform, sys.version.split()[0]))
for j in range(-5, 5):
for i in range(25):
arg = now + (i+j*100)*23*3603
self._update_variables(arg)
self.strftest1(arg)
self.strftest2(arg)
def strftest1(self, now):
if support.verbose:
print("strftime test for", time.ctime(now))
now = self.now
# Make sure any characters that could be taken as regex syntax is
# escaped in escapestr()
expectations = (
('%a', calendar.day_abbr[now[6]], 'abbreviated weekday name'),
('%A', calendar.day_name[now[6]], 'full weekday name'),
('%b', calendar.month_abbr[now[1]], 'abbreviated month name'),
('%B', calendar.month_name[now[1]], 'full month name'),
# %c see below
('%d', '%02d' % now[2], 'day of month as number (00-31)'),
('%H', '%02d' % now[3], 'hour (00-23)'),
('%I', '%02d' % self.clock12, 'hour (01-12)'),
('%j', '%03d' % now[7], 'julian day (001-366)'),
('%m', '%02d' % now[1], 'month as number (01-12)'),
('%M', '%02d' % now[4], 'minute, (00-59)'),
('%p', self.ampm, 'AM or PM as appropriate'),
('%S', '%02d' % now[5], 'seconds of current time (00-60)'),
('%U', '%02d' % ((now[7] + self.jan1[6])//7),
'week number of the year (Sun 1st)'),
('%w', '0?%d' % ((1+now[6]) % 7), 'weekday as a number (Sun 1st)'),
('%W', '%02d' % ((now[7] + (self.jan1[6] - 1)%7)//7),
'week number of the year (Mon 1st)'),
# %x see below
('%X', '%02d:%02d:%02d' % (now[3], now[4], now[5]), '%H:%M:%S'),
('%y', '%02d' % (now[0]%100), 'year without century'),
('%Y', '%d' % now[0], 'year with century'),
# %Z see below
('%%', '%', 'single percent sign'),
)
for e in expectations:
# musn't raise a value error
try:
result = time.strftime(e[0], now)
except ValueError as error:
self.fail("strftime '%s' format gave error: %s" % (e[0], error))
if re.match(escapestr(e[1], self.ampm), result):
continue
if not result or result[0] == '%':
self.fail("strftime does not support standard '%s' format (%s)"
% (e[0], e[2]))
else:
self.fail("Conflict for %s (%s): expected %s, but got %s"
% (e[0], e[2], e[1], result))
def strftest2(self, now):
nowsecs = str(int(now))[:-1]
now = self.now
# [jart] this isn't a test it's combinatorial log spam
return
nonstandard_expectations = (
# These are standard but don't have predictable output
('%c', fixasctime(time.asctime(now)), 'near-asctime() format'),
('%x', '%02d/%02d/%02d' % (now[1], now[2], (now[0]%100)),
'%m/%d/%y %H:%M:%S'),
('%Z', '%s' % self.tz, 'time zone name'),
# These are some platform specific extensions
('%D', '%02d/%02d/%02d' % (now[1], now[2], (now[0]%100)), 'mm/dd/yy'),
('%e', '%2d' % now[2], 'day of month as number, blank padded ( 0-31)'),
('%h', calendar.month_abbr[now[1]], 'abbreviated month name'),
('%k', '%2d' % now[3], 'hour, blank padded ( 0-23)'),
('%n', '\n', 'newline character'),
('%r', '%02d:%02d:%02d %s' % (self.clock12, now[4], now[5], self.ampm),
'%I:%M:%S %p'),
('%R', '%02d:%02d' % (now[3], now[4]), '%H:%M'),
('%s', nowsecs, 'seconds since the Epoch in UCT'),
('%t', '\t', 'tab character'),
('%T', '%02d:%02d:%02d' % (now[3], now[4], now[5]), '%H:%M:%S'),
('%3y', '%03d' % (now[0]%100),
'year without century rendered using fieldwidth'),
)
for e in nonstandard_expectations:
try:
result = time.strftime(e[0], now)
except ValueError as result:
msg = "Error for nonstandard '%s' format (%s): %s" % \
(e[0], e[2], str(result))
if support.verbose:
print(msg)
continue
if re.match(escapestr(e[1], self.ampm), result):
if support.verbose:
print("Supports nonstandard '%s' format (%s)" % (e[0], e[2]))
elif not result or result[0] == '%':
if support.verbose:
print("Does not appear to support '%s' format (%s)" % \
(e[0], e[2]))
else:
if support.verbose:
print("Conflict for nonstandard '%s' format (%s):" % \
(e[0], e[2]))
print(" Expected %s, but got %s" % (e[1], result))
class Y1900Tests(unittest.TestCase):
"""A limitation of the MS C runtime library is that it crashes if
a date before 1900 is passed with a format string containing "%y"
"""
def test_y_before_1900(self):
# Issue #13674, #19634
t = (1899, 1, 1, 0, 0, 0, 0, 0, 0)
if (sys.platform == "win32"
or sys.platform.startswith(("aix", "sunos", "solaris"))):
with self.assertRaises(ValueError):
time.strftime("%y", t)
else:
self.assertEqual(time.strftime("%y", t), "99")
def test_y_1900(self):
self.assertEqual(
time.strftime("%y", (1900, 1, 1, 0, 0, 0, 0, 0, 0)), "00")
def test_y_after_1900(self):
self.assertEqual(
time.strftime("%y", (2013, 1, 1, 0, 0, 0, 0, 0, 0)), "13")
if __name__ == '__main__':
unittest.main()
| 7,800 | 208 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_frame.py | import gc
import sys
import types
import unittest
import weakref
from test import support
class ClearTest(unittest.TestCase):
"""
Tests for frame.clear().
"""
def inner(self, x=5, **kwargs):
1/0
def outer(self, **kwargs):
try:
self.inner(**kwargs)
except ZeroDivisionError as e:
exc = e
return exc
def clear_traceback_frames(self, tb):
"""
Clear all frames in a traceback.
"""
while tb is not None:
tb.tb_frame.clear()
tb = tb.tb_next
def test_clear_locals(self):
class C:
pass
c = C()
wr = weakref.ref(c)
exc = self.outer(c=c)
del c
support.gc_collect()
# A reference to c is held through the frames
self.assertIsNot(None, wr())
self.clear_traceback_frames(exc.__traceback__)
support.gc_collect()
# The reference was released by .clear()
self.assertIs(None, wr())
def test_clear_generator(self):
endly = False
def g():
nonlocal endly
try:
yield
inner()
finally:
endly = True
gen = g()
next(gen)
self.assertFalse(endly)
# Clearing the frame closes the generator
gen.gi_frame.clear()
self.assertTrue(endly)
def test_clear_executing(self):
# Attempting to clear an executing frame is forbidden.
try:
1/0
except ZeroDivisionError as e:
f = e.__traceback__.tb_frame
with self.assertRaises(RuntimeError):
f.clear()
with self.assertRaises(RuntimeError):
f.f_back.clear()
def test_clear_executing_generator(self):
# Attempting to clear an executing generator frame is forbidden.
endly = False
def g():
nonlocal endly
try:
1/0
except ZeroDivisionError as e:
f = e.__traceback__.tb_frame
with self.assertRaises(RuntimeError):
f.clear()
with self.assertRaises(RuntimeError):
f.f_back.clear()
yield f
finally:
endly = True
gen = g()
f = next(gen)
self.assertFalse(endly)
# Clearing the frame closes the generator
f.clear()
self.assertTrue(endly)
@support.cpython_only
def test_clear_refcycles(self):
# .clear() doesn't leave any refcycle behind
with support.disable_gc():
class C:
pass
c = C()
wr = weakref.ref(c)
exc = self.outer(c=c)
del c
self.assertIsNot(None, wr())
self.clear_traceback_frames(exc.__traceback__)
self.assertIs(None, wr())
class FrameLocalsTest(unittest.TestCase):
"""
Tests for the .f_locals attribute.
"""
def make_frames(self):
def outer():
x = 5
y = 6
def inner():
z = x + 2
1/0
t = 9
return inner()
try:
outer()
except ZeroDivisionError as e:
tb = e.__traceback__
frames = []
while tb:
frames.append(tb.tb_frame)
tb = tb.tb_next
return frames
def test_locals(self):
f, outer, inner = self.make_frames()
outer_locals = outer.f_locals
self.assertIsInstance(outer_locals.pop('inner'), types.FunctionType)
self.assertEqual(outer_locals, {'x': 5, 'y': 6})
inner_locals = inner.f_locals
self.assertEqual(inner_locals, {'x': 5, 'z': 7})
def test_clear_locals(self):
# Test f_locals after clear() (issue #21897)
f, outer, inner = self.make_frames()
outer.clear()
inner.clear()
self.assertEqual(outer.f_locals, {})
self.assertEqual(inner.f_locals, {})
def test_locals_clear_locals(self):
# Test f_locals before and after clear() (to exercise caching)
f, outer, inner = self.make_frames()
outer.f_locals
inner.f_locals
outer.clear()
inner.clear()
self.assertEqual(outer.f_locals, {})
self.assertEqual(inner.f_locals, {})
if __name__ == "__main__":
unittest.main()
| 4,476 | 166 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/floating_points.txt | # These numbers are used to test floating point binary-to-decimal conversion.
# They are based on the TCL test suite (tests/expr.test), which is based on
# test data from:
# Brigitte Verdonk, Annie Cuyt, Dennis Verschaeren, A precision and range
# independent tool for testing floating-point arithmetic II: Conversions,
# ACM Transactions on Mathematical Software 27:2 (March 2001), pp. 119-140.
0E0
-0E0
1E0
15E-1
125E-2
1125E-3
10625E-4
103125E-5
1015625E-6
10078125E-7
100390625E-8
1001953125E-9
10009765625E-10
100048828125E-11
1000244140625E-12
10001220703125E-13
100006103515625E-14
1000030517578125E-15
10000152587890625E-16
+8E153
-1E153
+9E306
-2E153
+7E-304
-3E-49
+7E-303
-6E-49
+9E43
-9E44
+8E303
-1E303
+7E-287
-2E-204
+2E-205
-9E-47
+34E195
-68E195
+85E194
-67E97
+93E-234
-19E-87
+38E-87
-38E-88
-69E220
+18E43
-36E43
+61E-99
-43E-92
+86E-92
-51E-74
+283E85
-566E85
+589E187
-839E143
-744E-234
+930E-235
-186E-234
+604E175
-302E175
+755E174
-151E175
+662E-213
-408E-74
+510E-75
+6782E55
-2309E92
+7963E34
-3391E55
+7903E-96
-7611E-226
+4907E-196
-5547E-311
+5311E241
-5311E243
+5311E242
+9269E-45
-8559E-289
+8699E-276
-8085E-64
+74819E201
-82081E41
+51881E37
-55061E157
+77402E-215
-33891E-92
+38701E-215
-82139E-76
+75859E25
+89509E140
-57533E287
+46073E-32
-92146E-32
+83771E-74
-34796E-276
+584169E229
+164162E41
-328324E41
+209901E-11
-419802E-11
+940189E-112
-892771E-213
+757803E120
-252601E120
+252601E121
-505202E120
+970811E-264
-654839E-60
+289767E-178
-579534E-178
-8823691E130
+9346704E229
-1168338E229
-6063369E-136
+3865421E-225
-5783893E-127
+2572231E223
-5144462E223
+1817623E109
+6431543E-97
-5444097E-21
+8076999E-121
-9997649E-270
+50609263E157
+70589528E130
-88236910E129
+87575437E-310
-23135572E-127
+85900881E177
-84863171E113
+68761586E232
-50464069E286
+27869147E-248
-55738294E-248
+70176353E-53
-80555086E-32
-491080654E121
+526250918E287
-245540327E121
-175150874E-310
+350301748E-310
-437877185E-311
+458117166E52
-916234332E52
+229058583E52
-525789935E98
+282926897E-227
-565853794E-227
+667284113E-240
-971212611E-126
+9981396317E-182
-5035231965E-156
+8336960483E-153
-8056371144E-155
+6418488827E79
-3981006983E252
+7962013966E252
-4713898551E261
+8715380633E-58
-9078555839E-109
+9712126110E-127
+42333842451E201
-84667684902E201
+23792120709E-315
-78564021519E-227
+71812054883E-188
-30311163631E-116
+71803914657E292
+36314223356E-109
+18157111678E-109
-45392779195E-110
+778380362293E218
-685763015669E280
+952918668151E70
-548357443505E32
+384865004907E-285
-769730009814E-285
+697015418417E-93
-915654049301E-28
+178548656339E169
-742522891517E259
+742522891517E258
-357097312678E169
-3113521449172E218
+3891901811465E217
-1556760724586E218
+9997878507563E-195
-7247563029154E-319
+3623781514577E-319
-3092446298323E-200
+6363857920591E145
-8233559360849E94
+2689845954547E49
-5379691909094E49
+5560322501926E-301
-7812878489261E-179
+8439398533053E-256
-2780161250963E-301
-87605699161665E155
-17521139832333E156
-88218101363513E-170
+38639244311627E-115
+35593959807306E261
-53390939710959E260
+71187919614612E261
-88984899518265E260
+77003665618895E-73
-15400733123779E-72
+61602932495116E-72
-30801466247558E-72
+834735494917063E-300
-589795149206434E-151
+475603213226859E-42
-294897574603217E-151
+850813008001913E93
-203449172043339E185
+406898344086678E185
-813796688173356E185
+6045338514609393E244
-5145963778954906E142
+2572981889477453E142
-6965949469487146E74
+6182410494241627E-119
-8510309498186985E-277
+6647704637273331E-212
-2215901545757777E-212
+3771476185376383E276
-3729901848043846E212
+3771476185376383E277
-9977830465649166E119
+8439928496349319E-142
-8204230082070882E-59
+8853686434843997E-244
-5553274272288559E-104
+36149023611096162E144
-36149023611096162E147
+18074511805548081E146
-18074511805548081E147
+97338774138954421E-290
-88133809804950961E-308
+94080055902682397E-243
-24691002732654881E-115
+52306490527514614E49
-26153245263757307E49
+55188692254193604E165
-68985865317742005E164
+27176258005319167E-261
-73169230107256116E-248
+91461537634070145E-249
-54352516010638334E-261
+586144289638535878E280
-601117006785295431E245
+293072144819267939E280
-953184713238516652E272
+902042358290366539E-281
-557035730189854663E-294
+902042358290366539E-280
-354944100507554393E-238
+272104041512242479E199
-816312124536727437E199
+544208083024484958E199
-792644927852378159E78
-679406450132979175E-263
+543525160106383340E-262
+7400253695682920196E215
-1850063423920730049E215
+3700126847841460098E215
-9250317119603650245E214
+8396094300569779681E-252
-3507665085003296281E-75
+7015330170006592562E-75
-7015330170006592562E-74
+7185620434951919351E205
-1360520207561212395E198
+2178999185345151731E-184
-8691089486201567102E-218
+4345544743100783551E-218
-4357998370690303462E-184
+59825267349106892461E177
-62259110684423957791E47
+58380168477038565599E265
-62259110684423957791E48
-33584377202279118724E-252
-57484963479615354808E205
+71856204349519193510E204
-14371240869903838702E205
+36992084760177624177E-318
-73984169520355248354E-318
+99257763227713890244E-115
-87336362425182547697E-280
+7E289
-3E153
+6E153
-5E243
+7E-161
-7E-172
+8E-63
-7E-113
+8E126
-4E126
+5E125
-1E126
+8E-163
-1E-163
+2E-163
-4E-163
+51E195
-37E46
+74E46
-56E289
+69E-145
-70E-162
+56E-161
-21E-303
+34E-276
-68E-276
+85E-277
-87E-274
+829E102
-623E100
+723E-162
-457E-102
+914E-102
-323E-135
+151E176
-302E176
+921E90
-604E176
+823E-206
-463E-114
+348E-274
+9968E100
-6230E99
+1246E100
+6676E-296
-8345E-297
+1669E-296
-3338E-296
+3257E58
-6514E58
+2416E176
+8085E-63
-3234E-62
+1617E-62
-6468E-62
+53418E111
-60513E160
+26709E111
-99447E166
+12549E48
-25098E48
+50196E48
-62745E47
+83771E-73
-97451E-167
+86637E-203
-75569E-254
+473806E83
-947612E83
+292369E76
-584738E76
+933587E-140
-720919E-14
+535001E-149
-890521E-235
+548057E81
-706181E88
+820997E106
-320681E63
+928609E-261
-302276E-254
+151138E-254
+4691773E45
-9383546E45
+3059949E-243
-6119898E-243
+5356626E-213
-4877378E-199
+7716693E223
-5452869E109
+4590831E156
-9181662E156
-3714436E-261
+4643045E-262
-7428872E-261
+52942146E130
-27966061E145
+26471073E130
-55932122E145
+95412548E-99
-47706274E-99
+23853137E-99
-78493654E-301
+65346417E29
-51083099E167
+89396333E264
-84863171E114
+59540836E-251
-74426045E-252
+14885209E-251
-29770418E-251
+982161308E122
-245540327E122
+491080654E122
+525452622E-310
-771837113E-134
+820858081E-150
-262726311E-310
+923091487E209
-653777767E273
+842116236E-53
-741111169E-202
+839507247E-284
-951487269E-264
-9821613080E121
+6677856011E-31
-3573796826E-266
+7147593652E-266
-9981396317E-181
+3268888835E272
-2615111068E273
+1307555534E273
+2990671154E-190
-1495335577E-190
+5981342308E-190
-7476677885E-191
+82259684194E-202
-93227267727E-49
+41129842097E-202
-47584241418E-314
-79360293406E92
+57332259349E225
-57202326162E111
+86860597053E-206
-53827010643E-200
+53587107423E-61
+635007636765E200
+508006109412E201
-254003054706E201
+561029718715E-72
-897647549944E-71
+112205943743E-71
-873947086081E-236
+809184709177E116
-573112917422E81
+286556458711E81
+952805821491E-259
-132189992873E-44
-173696038493E-144
+1831132757599E-107
-9155663787995E-108
+7324531030396E-107
-9277338894969E-200
+8188292423973E287
-5672557437938E59
+2836278718969E59
-9995153153494E54
+9224786422069E-291
-3142213164987E-294
+6284426329974E-294
-8340483752889E-301
+67039371486466E89
-62150786615239E197
+33519685743233E89
-52563419496999E156
+32599460466991E-65
-41010988798007E-133
+65198920933982E-65
-82021977596014E-133
+80527976643809E61
-74712611505209E158
+53390939710959E261
-69277302659155E225
+46202199371337E-72
-23438635467783E-179
+41921560615349E-67
-92404398742674E-72
+738545606647197E124
-972708181182949E117
-837992143580825E87
+609610927149051E-255
-475603213226859E-41
+563002800671023E-177
-951206426453718E-41
+805416432656519E202
-530658674694337E159
+946574173863918E208
-318329953318553E113
-462021993713370E-73
+369617594970696E-72
+3666156212014994E233
-1833078106007497E233
+8301790508624232E174
-1037723813578029E174
+7297662880581139E-286
-5106185698912191E-276
+7487252720986826E-165
-3743626360493413E-165
+3773057430100257E230
-7546114860200514E230
+4321222892463822E58
-7793560217139653E51
+26525993941010681E112
-53051987882021362E112
+72844871414247907E77
-88839359596763261E105
+18718131802467065E-166
-14974505441973652E-165
+73429396004640239E106
-58483921078398283E57
+41391519190645203E165
-82783038381290406E165
+58767043776702677E-163
-90506231831231999E-129
+64409240769861689E-159
-77305427432277771E-190
+476592356619258326E273
-953184713238516652E273
+899810892172646163E283
-929167076892018333E187
+647761278967534239E-312
-644290479820542942E-180
+926145344610700019E-225
-958507931896511964E-246
+272104041512242479E200
-792644927852378159E79
+544208083024484958E200
-929963218616126365E290
+305574339166810102E-219
-152787169583405051E-219
+611148678333620204E-219
-763935847917025255E-220
+7439550220920798612E158
-3719775110460399306E158
+9299437776150998265E157
-7120190517612959703E120
+3507665085003296281E-73
-7015330170006592562E-73
-6684428762278255956E-294
-1088416166048969916E200
-8707329328391759328E200
+4439021781608558002E-65
-8878043563217116004E-65
+2219510890804279001E-65
+33051223951904955802E55
-56961524140903677624E120
+71201905176129597030E119
+14030660340013185124E-73
-17538325425016481405E-74
+67536228609141569109E-133
-35620497849450218807E-306
+66550376797582521751E-126
-71240995698900437614E-306
+3E24
-6E24
+6E26
-7E25
+1E-14
-2E-14
+4E-14
-8E-14
+5E26
-8E27
+1E27
-4E27
+9E-13
-7E-20
+56E25
-70E24
+51E26
+71E-17
-31E-5
+62E-5
-94E-8
+67E27
-81E24
+54E23
-54E25
+63E-22
-63E-23
+43E-4
-86E-4
+942E26
-471E25
+803E24
-471E26
-409E-21
+818E-21
-867E-8
+538E27
-857E24
+269E27
-403E26
+959E-7
-959E-6
+373E-27
-746E-27
+4069E24
-4069E23
-8138E24
+8294E-15
-4147E-14
+4147E-15
-8294E-14
+538E27
-2690E26
+269E27
-2152E27
+1721E-17
-7979E-27
+6884E-17
-8605E-18
+82854E27
-55684E24
+27842E24
-48959E25
+81921E-17
-76207E-8
+4147E-15
-41470E-16
+89309E24
+75859E26
-75859E25
+14257E-23
-28514E-23
+57028E-23
-71285E-24
+344863E27
-951735E27
+200677E23
-401354E24
+839604E-11
-209901E-11
+419802E-11
-537734E-24
+910308E26
-227577E26
+455154E26
-531013E25
+963019E-21
-519827E-13
+623402E-27
-311701E-27
+9613651E26
-9191316E23
+4595658E23
-2297829E23
-1679208E-11
+3379223E27
-6758446E27
+5444097E-21
-8399969E-27
+8366487E-16
-8366487E-15
+65060671E25
+65212389E23
+55544957E-13
-51040905E-20
+99585767E-22
-99585767E-23
+40978393E26
-67488159E24
+69005339E23
-81956786E26
-87105552E-21
+10888194E-21
-21776388E-21
+635806667E27
-670026614E25
+335013307E26
-335013307E25
+371790617E-24
-371790617E-25
+743581234E-24
-743581234E-25
+202464477E24
-404928954E24
+997853758E27
-997853758E26
+405498418E-17
-582579084E-14
+608247627E-18
-291289542E-14
-9537100005E26
+6358066670E27
-1271613334E27
+5229646999E-16
+5229646999E-17
+4429943614E24
-8859887228E24
+2214971807E24
-4176887093E26
+4003495257E-20
-4361901637E-23
+8723803274E-23
-8006990514E-20
+72835110098E27
-36417555049E27
+84279630104E25
-84279630104E24
+21206176437E-27
-66461566917E-22
+64808355539E-16
-84932679673E-19
+65205430094E26
-68384463429E25
+32602715047E26
-62662203426E27
+58784444678E-18
-50980203373E-21
+29392222339E-18
-75529940323E-27
-937495906299E26
+842642485799E-20
-387824150699E-23
+924948814726E-27
-775648301398E-23
+547075707432E25
+683844634290E24
-136768926858E25
+509802033730E-22
+101960406746E-21
-815683253968E-21
+7344124123524E24
-9180155154405E23
+6479463327323E27
-1836031030881E24
+4337269293039E-19
-4599163554373E-23
+9198327108746E-23
+4812803938347E27
-8412030890011E23
+9625607876694E27
-4739968828249E24
+9697183891673E-23
-7368108517543E-20
+51461358161422E25
-77192037242133E26
+77192037242133E25
-51461358161422E27
+43999661561541E-21
-87999323123082E-21
+48374886826137E-26
-57684246567111E-23
+87192805957686E23
-75108713005913E24
+64233110587487E27
-77577471133384E-23
+48485919458365E-24
-56908598265713E-26
+589722294620133E23
+652835804449289E-22
-656415363936202E-23
+579336749585745E-25
-381292764980839E-26
+965265859649698E23
-848925235434882E27
+536177612222491E23
-424462617717441E27
+276009279888989E-27
-608927158043691E-26
+552018559777978E-27
-425678377667758E-22
+8013702726927119E26
+8862627962362001E27
-5068007907757162E26
-7379714799828406E-23
+4114538064016107E-27
-3689857399914203E-23
+5575954851815478E23
+3395700941739528E27
+4115535777581961E-23
-8231071555163922E-23
+6550246696190871E-26
-68083046403986701E27
+43566388595783643E27
-87132777191567286E27
+59644881059342141E25
-83852770718576667E23
+99482967418206961E-25
-99482967418206961E-26
+87446669969994614E-27
-43723334984997307E-27
+5E24
-8E25
+1E25
-4E25
+2E-5
-5E-6
+4E-5
-3E-20
+3E27
-9E26
+7E25
-6E27
+2E-21
-5E-22
-4E-21
+87E25
-97E24
+82E-24
-41E-24
+76E-23
+83E25
-50E27
+25E27
-99E27
+97E-10
-57E-20
+997E23
+776E24
-388E24
+521E-10
-506E-26
+739E-10
-867E-7
-415E24
+332E25
-664E25
+291E-13
-982E-8
+582E-13
-491E-8
+4574E26
-8609E26
+2287E26
-4818E24
+6529E-8
-8151E-21
+1557E-12
-2573E-18
+4929E-16
-3053E-22
+9858E-16
-7767E-11
+54339E26
-62409E25
+32819E27
-89849E27
+63876E-20
-15969E-20
+31938E-20
-79845E-21
+89306E27
-25487E24
+79889E24
-97379E26
+81002E-8
-43149E-25
+40501E-8
-60318E-10
-648299E27
+780649E24
+720919E-14
-629703E-11
+557913E24
-847899E23
+565445E27
-736531E24
+680013E-19
-529981E-10
+382923E-23
-633614E-18
+2165479E27
-8661916E27
+4330958E27
-9391993E22
-5767352E-14
+7209190E-15
-1441838E-14
+8478990E22
+1473062E24
+8366487E-14
-8399969E-25
+9366737E-12
-9406141E-13
+65970979E24
-65060671E26
+54923002E27
-63846927E25
+99585767E-21
+67488159E25
-69005339E24
+81956786E27
-40978393E27
+77505754E-12
-38752877E-12
+82772981E-15
-95593517E-25
+200036989E25
-772686455E27
+859139907E23
-400073978E25
+569014327E-14
-794263862E-15
+397131931E-15
-380398957E-16
+567366773E27
-337440795E24
+134976318E25
-269952636E25
+932080597E-20
-331091924E-15
-413864905E-16
+8539246247E26
-5859139791E26
+6105010149E24
-3090745820E27
+3470877773E-20
-6136309089E-27
+8917758713E-19
-6941755546E-20
+9194900535E25
-1838980107E26
+7355920428E26
-3677960214E26
+8473634343E-17
-8870766274E-16
+4435383137E-16
-9598990129E-15
+71563496764E26
-89454370955E25
+17890874191E26
-35781748382E26
+57973447842E-19
-28986723921E-19
+76822711313E-19
-97699466874E-20
+67748656762E27
-19394840991E24
+38789681982E24
-33874328381E27
+54323763886E-27
-58987193887E-20
+27161881943E-27
-93042648033E-19
+520831059055E27
-768124264394E25
+384062132197E25
+765337749889E-25
+794368912771E25
-994162090146E23
+781652779431E26
+910077190046E-26
-455038595023E-26
+471897551096E-20
-906698409911E-21
+8854128003935E25
-8146122716299E27
+7083302403148E26
-3541651201574E26
+8394920649291E-25
-7657975756753E-22
+5473834002228E-20
-6842292502785E-21
-2109568884597E25
+8438275538388E25
-4219137769194E25
+3200141789841E-25
-8655689322607E-22
+6400283579682E-25
-8837719634493E-21
+19428217075297E24
-38856434150594E24
+77712868301188E24
-77192037242133E27
+76579757567530E-23
+15315951513506E-22
-38289878783765E-23
+49378033925202E25
-50940527102367E24
+98756067850404E25
-99589397544892E26
-56908598265713E-25
+97470695699657E-22
-35851901247343E-25
+154384074484266E27
-308768148968532E27
+910990389005985E23
+271742424169201E-27
-543484848338402E-27
+162192083357563E-26
-869254552770081E-23
+664831007626046E24
-332415503813023E24
+943701829041427E24
-101881054204734E24
+828027839666967E-27
-280276135608777E-27
+212839188833879E-21
-113817196531426E-25
+9711553197796883E27
-2739849386524269E26
+5479698773048538E26
+6124568318523113E-25
-1139777988171071E-24
+6322612303128019E-27
-2955864564844617E-25
-9994029144998961E25
-2971238324022087E27
-1656055679333934E-27
-1445488709150234E-26
+55824717499885172E27
-69780896874856465E26
+84161538867545199E25
-27912358749942586E27
+24711112462926331E-25
-12645224606256038E-27
-12249136637046226E-25
+74874448287465757E27
-35642836832753303E24
-71285673665506606E24
+43723334984997307E-26
+10182419849537963E-24
-93501703572661982E-26
# A value that caused a crash in debug builds for Python >= 2.7, 3.1
# See http://bugs.python.org/issue7632
2183167012312112312312.23538020374420446192e-370
# Another value designed to test a corner case of Python's strtod code.
0.99999999999999999999999999999999999999999e+23
| 16,302 | 1,029 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_future.py | # Test various flavors of legal and illegal future statements
import unittest
from test import support
import os
import re
rx = re.compile(r'\((\S+).py, line (\d+)')
def get_error_location(msg):
mo = rx.search(str(msg))
return mo.group(1, 2)
class FutureTest(unittest.TestCase):
def check_syntax_error(self, err, basename, lineno, offset=0):
self.assertIn('%s.py, line %d' % (basename, lineno), str(err))
self.assertEqual(os.path.basename(err.filename), basename + '.py')
self.assertEqual(err.lineno, lineno)
self.assertEqual(err.offset, offset)
def test_future1(self):
with support.CleanImport('future_test1'):
from test import future_test1
self.assertEqual(future_test1.result, 6)
def test_future2(self):
with support.CleanImport('future_test2'):
from test import future_test2
self.assertEqual(future_test2.result, 6)
def test_future3(self):
with support.CleanImport('test_future3'):
from test import test_future3
# def test_badfuture3(self):
# with self.assertRaises(SyntaxError) as cm:
# from test import badsyntax_future3
# self.check_syntax_error(cm.exception, "badsyntax_future3", 3)
# def test_badfuture4(self):
# with self.assertRaises(SyntaxError) as cm:
# from test import badsyntax_future4
# self.check_syntax_error(cm.exception, "badsyntax_future4", 3)
# def test_badfuture5(self):
# with self.assertRaises(SyntaxError) as cm:
# from test import badsyntax_future5
# self.check_syntax_error(cm.exception, "badsyntax_future5", 4)
# def test_badfuture6(self):
# with self.assertRaises(SyntaxError) as cm:
# from test import badsyntax_future6
# self.check_syntax_error(cm.exception, "badsyntax_future6", 3)
# def test_badfuture7(self):
# with self.assertRaises(SyntaxError) as cm:
# from test import badsyntax_future7
# self.check_syntax_error(cm.exception, "badsyntax_future7", 3, 53)
# def test_badfuture8(self):
# with self.assertRaises(SyntaxError) as cm:
# from test import badsyntax_future8
# self.check_syntax_error(cm.exception, "badsyntax_future8", 3)
# def test_badfuture9(self):
# with self.assertRaises(SyntaxError) as cm:
# from test import badsyntax_future9
# self.check_syntax_error(cm.exception, "badsyntax_future9", 3, 0)
# def test_badfuture10(self):
# with self.assertRaises(SyntaxError) as cm:
# from test import badsyntax_future10
# self.check_syntax_error(cm.exception, "badsyntax_future10", 3, 0)
def test_parserhack(self):
# test that the parser.c::future_hack function works as expected
# Note: although this test must pass, it's not testing the original
# bug as of 2.6 since the with statement is not optional and
# the parser hack disabled. If a new keyword is introduced in
# 2.6, change this to refer to the new future import.
try:
exec("from __future__ import print_function; print 0")
except SyntaxError:
pass
else:
self.fail("syntax error didn't occur")
try:
exec("from __future__ import (print_function); print 0")
except SyntaxError:
pass
else:
self.fail("syntax error didn't occur")
def test_multiple_features(self):
with support.CleanImport("test.test_future5"):
from test import test_future5
def test_unicode_literals_exec(self):
scope = {}
exec("from __future__ import unicode_literals; x = ''", {}, scope)
self.assertIsInstance(scope["x"], str)
if __name__ == "__main__":
unittest.main()
| 3,894 | 109 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_faulthandler.py | from contextlib import contextmanager
import datetime
import faulthandler
import os
import re
import signal
import subprocess
import sys
import cosmo
from test import support
from test.support import script_helper, is_android, requires_android_level
import tempfile
import unittest
from textwrap import dedent
try:
import _thread
import threading
HAVE_THREADS = True
except ImportError:
HAVE_THREADS = False
try:
import _testcapi
except ImportError:
_testcapi = None
TIMEOUT = 0.5
MS_WINDOWS = (os.name == 'nt')
def expected_traceback(lineno1, lineno2, header, min_count=1):
regex = header
regex += ' File "<string>", line %s in func\n' % lineno1
regex += ' File "<string>", line %s in <module>' % lineno2
if 1 < min_count:
return '^' + (regex + '\n') * (min_count - 1) + regex
else:
return '^' + regex + '$'
@contextmanager
def temporary_filename():
filename = tempfile.mktemp()
try:
yield filename
finally:
support.unlink(filename)
def requires_raise(test):
return (test if not is_android else
requires_android_level(24, 'raise() is buggy')(test))
@unittest.skipIf(cosmo.MODE in ('dbg', 'asan'), "regex can't match backtrace")
class FaultHandlerTests(unittest.TestCase):
def get_output(self, code, filename=None, fd=None):
"""
Run the specified code in Python (in a new child process) and read the
output from the standard error or from a file (if filename is set).
Return the output lines as a list.
Strip the reference count from the standard error for Python debug
build, and replace "Current thread 0x00007f8d8fbd9700" by "Current
thread XXX".
"""
code = dedent(code).strip()
pass_fds = []
if fd is not None:
pass_fds.append(fd)
with support.SuppressCrashReport():
process = script_helper.spawn_python('-c', code, pass_fds=pass_fds)
with process:
stdout, stderr = process.communicate()
exitcode = process.wait()
output = support.strip_python_stderr(stdout)
output = output.decode('ascii', 'backslashreplace')
if filename:
self.assertEqual(output, '')
with open(filename, "rb") as fp:
output = fp.read()
output = output.decode('ascii', 'backslashreplace')
elif fd is not None:
self.assertEqual(output, '')
os.lseek(fd, os.SEEK_SET, 0)
with open(fd, "rb", closefd=False) as fp:
output = fp.read()
output = output.decode('ascii', 'backslashreplace')
return output.splitlines(), exitcode
def check_error(self, code, line_number, fatal_error, *,
filename=None, all_threads=True, other_regex=None,
fd=None, know_current_thread=True):
"""
Check that the fault handler for fatal errors is enabled and check the
traceback from the child process output.
Raise an error if the output doesn't match the expected format.
"""
if all_threads:
if know_current_thread:
header = 'Current thread 0x[0-9a-f]+'
else:
header = 'Thread 0x[0-9a-f]+'
else:
header = 'Stack'
regex = r"""
^{fatal_error}
{header} \(most recent call first\):
File "<string>", line {lineno} in <module>
"""
regex = dedent(regex.format(
lineno=line_number,
fatal_error=fatal_error,
header=header)).strip()
if other_regex:
regex += '|' + other_regex
output, exitcode = self.get_output(code, filename=filename, fd=fd)
output = '\n'.join(output)
self.assertRegex(output, regex)
self.assertNotEqual(exitcode, 0)
def check_fatal_error(self, code, line_number, name_regex, **kw):
fatal_error = 'Fatal Python error: %s' % name_regex
self.check_error(code, line_number, fatal_error, **kw)
def check_windows_exception(self, code, line_number, name_regex, **kw):
fatal_error = 'Windows fatal exception: %s' % name_regex
self.check_error(code, line_number, fatal_error, **kw)
@unittest.skipIf(sys.platform.startswith('aix'),
"the first page of memory is a mapped read-only on AIX")
def test_read_null(self):
if not MS_WINDOWS:
self.check_fatal_error("""
import faulthandler
faulthandler.enable()
faulthandler._read_null()
""",
3,
# Issue #12700: Read NULL raises SIGILL on Mac OS X Lion
'(?:Segmentation fault'
'|Bus error'
'|Illegal instruction)')
else:
self.check_windows_exception("""
import faulthandler
faulthandler.enable()
faulthandler._read_null()
""",
3,
'access violation')
@requires_raise
def test_sigsegv(self):
self.check_fatal_error("""
import faulthandler
faulthandler.enable()
faulthandler._sigsegv()
""",
3,
'Segmentation fault')
@unittest.skipIf(not HAVE_THREADS, 'need threads')
def test_fatal_error_c_thread(self):
self.check_fatal_error("""
import faulthandler
faulthandler.enable()
faulthandler._fatal_error_c_thread()
""",
3,
'in new thread',
know_current_thread=False)
def test_sigabrt(self):
self.check_fatal_error("""
import faulthandler
faulthandler.enable()
faulthandler._sigabrt()
""",
3,
'Aborted')
@unittest.skipIf(sys.platform == 'win32',
"SIGFPE cannot be caught on Windows")
def test_sigfpe(self):
self.check_fatal_error("""
import faulthandler
faulthandler.enable()
faulthandler._sigfpe()
""",
3,
'Floating point exception')
@unittest.skipIf(_testcapi is None, 'need _testcapi')
@unittest.skipUnless(hasattr(signal, 'SIGBUS'), 'need signal.SIGBUS')
@requires_raise
def test_sigbus(self):
self.check_fatal_error("""
import _testcapi
import faulthandler
import signal
faulthandler.enable()
_testcapi.raise_signal(signal.SIGBUS)
""",
6,
'Bus error')
@unittest.skipIf(_testcapi is None, 'need _testcapi')
@unittest.skipUnless(hasattr(signal, 'SIGILL'), 'need signal.SIGILL')
@requires_raise
def test_sigill(self):
self.check_fatal_error("""
import _testcapi
import faulthandler
import signal
faulthandler.enable()
_testcapi.raise_signal(signal.SIGILL)
""",
6,
'Illegal instruction')
def test_fatal_error(self):
self.check_fatal_error("""
import faulthandler
faulthandler._fatal_error(b'xyz')
""",
2,
'xyz')
# TODO: Fix Me
# ======================================================================
# FAIL: test_fatal_error_without_gil (__main__.FaultHandlerTests)
# ----------------------------------------------------------------------
# Traceback (most recent call last):
# File "/zip/.python/test/test_faulthandler.py", line 236, in test_fatal_error_without_gil
# 'xyz')
# File "/zip/.python/test/test_faulthandler.py", line 122, in check_fatal_error
# self.check_error(code, line_number, fatal_error, **kw)
# File "/zip/.python/test/test_faulthandler.py", line 117, in check_error
# self.assertRegex(output, regex)
# AssertionError: Regex didn't match: '^Fatal Python error: xyz\n\nCurrent thread 0x[0-9a-f]+ \\(most recent call first\\):\n File "<string>", line 2 in <module>' not found in 'Fatal Python error: xyz'
# def test_fatal_error_without_gil(self):
# self.check_fatal_error("""
# import faulthandler
# faulthandler._fatal_error(b'xyz', True)
# """,
# 2,
# 'xyz')
@unittest.skipIf(sys.platform.startswith('openbsd') and HAVE_THREADS,
"Issue #12868: sigaltstack() doesn't work on "
"OpenBSD if Python is compiled with pthread")
@unittest.skipIf(not hasattr(faulthandler, '_stack_overflow'),
'need faulthandler._stack_overflow()')
def test_stack_overflow(self):
self.check_fatal_error("""
import faulthandler
faulthandler.enable()
faulthandler._stack_overflow()
""",
3,
'(?:Segmentation fault|Bus error)',
other_regex='unable to raise a stack overflow')
@requires_raise
def test_gil_released(self):
self.check_fatal_error("""
import faulthandler
faulthandler.enable()
faulthandler._sigsegv(True)
""",
3,
'Segmentation fault')
@requires_raise
def test_enable_file(self):
with temporary_filename() as filename:
self.check_fatal_error("""
import faulthandler
output = open({filename}, 'wb')
faulthandler.enable(output)
faulthandler._sigsegv()
""".format(filename=repr(filename)),
4,
'Segmentation fault',
filename=filename)
@unittest.skipIf(sys.platform == "win32",
"subprocess doesn't support pass_fds on Windows")
@requires_raise
def test_enable_fd(self):
with tempfile.TemporaryFile('wb+') as fp:
fd = fp.fileno()
self.check_fatal_error("""
import faulthandler
import sys
faulthandler.enable(%s)
faulthandler._sigsegv()
""" % fd,
4,
'Segmentation fault',
fd=fd)
@requires_raise
def test_enable_single_thread(self):
self.check_fatal_error("""
import faulthandler
faulthandler.enable(all_threads=False)
faulthandler._sigsegv()
""",
3,
'Segmentation fault',
all_threads=False)
@requires_raise
def test_disable(self):
code = """
import faulthandler
faulthandler.enable()
faulthandler.disable()
faulthandler._sigsegv()
"""
not_expected = 'Fatal Python error'
stderr, exitcode = self.get_output(code)
stderr = '\n'.join(stderr)
self.assertTrue(not_expected not in stderr,
"%r is present in %r" % (not_expected, stderr))
self.assertNotEqual(exitcode, 0)
def test_is_enabled(self):
orig_stderr = sys.stderr
try:
# regrtest may replace sys.stderr by io.StringIO object, but
# faulthandler.enable() requires that sys.stderr has a fileno()
# method
sys.stderr = sys.__stderr__
was_enabled = faulthandler.is_enabled()
try:
faulthandler.enable()
self.assertTrue(faulthandler.is_enabled())
faulthandler.disable()
self.assertFalse(faulthandler.is_enabled())
finally:
if was_enabled:
faulthandler.enable()
else:
faulthandler.disable()
finally:
sys.stderr = orig_stderr
def test_disabled_by_default(self):
# By default, the module should be disabled
code = "import faulthandler; print(faulthandler.is_enabled())"
args = filter(None, (sys.executable,
"-E" if sys.flags.ignore_environment else "",
"-c", code))
env = os.environ.copy()
env.pop("PYTHONFAULTHANDLER", None)
# don't use assert_python_ok() because it always enables faulthandler
output = subprocess.check_output(args, env=env)
self.assertEqual(output.rstrip(), b"False")
def test_sys_xoptions(self):
# Test python -X faulthandler
code = "import faulthandler; print(faulthandler.is_enabled())"
args = filter(None, (sys.executable,
"-E" if sys.flags.ignore_environment else "",
"-X", "faulthandler", "-c", code))
env = os.environ.copy()
env.pop("PYTHONFAULTHANDLER", None)
# don't use assert_python_ok() because it always enables faulthandler
output = subprocess.check_output(args, env=env)
self.assertEqual(output.rstrip(), b"True")
def test_env_var(self):
# empty env var
code = "import faulthandler; print(faulthandler.is_enabled())"
args = (sys.executable, "-c", code)
env = os.environ.copy()
env['PYTHONFAULTHANDLER'] = ''
# don't use assert_python_ok() because it always enables faulthandler
output = subprocess.check_output(args, env=env)
self.assertEqual(output.rstrip(), b"False")
# non-empty env var
env = os.environ.copy()
env['PYTHONFAULTHANDLER'] = '1'
output = subprocess.check_output(args, env=env)
self.assertEqual(output.rstrip(), b"True")
def check_dump_traceback(self, *, filename=None, fd=None):
"""
Explicitly call dump_traceback() function and check its output.
Raise an error if the output doesn't match the expected format.
"""
code = """
import faulthandler
filename = {filename!r}
fd = {fd}
def funcB():
if filename:
with open(filename, "wb") as fp:
faulthandler.dump_traceback(fp, all_threads=False)
elif fd is not None:
faulthandler.dump_traceback(fd,
all_threads=False)
else:
faulthandler.dump_traceback(all_threads=False)
def funcA():
funcB()
funcA()
"""
code = code.format(
filename=filename,
fd=fd,
)
if filename:
lineno = 9
elif fd is not None:
lineno = 12
else:
lineno = 14
expected = [
'Stack (most recent call first):',
' File "<string>", line %s in funcB' % lineno,
' File "<string>", line 17 in funcA',
' File "<string>", line 19 in <module>'
]
trace, exitcode = self.get_output(code, filename, fd)
self.assertEqual(trace, expected)
self.assertEqual(exitcode, 0)
def test_dump_traceback(self):
self.check_dump_traceback()
def test_dump_traceback_file(self):
with temporary_filename() as filename:
self.check_dump_traceback(filename=filename)
@unittest.skipIf(sys.platform == "win32",
"subprocess doesn't support pass_fds on Windows")
def test_dump_traceback_fd(self):
with tempfile.TemporaryFile('wb+') as fp:
self.check_dump_traceback(fd=fp.fileno())
def test_truncate(self):
maxlen = 500
func_name = 'x' * (maxlen + 50)
truncated = 'x' * maxlen + '...'
code = """
import faulthandler
def {func_name}():
faulthandler.dump_traceback(all_threads=False)
{func_name}()
"""
code = code.format(
func_name=func_name,
)
expected = [
'Stack (most recent call first):',
' File "<string>", line 4 in %s' % truncated,
' File "<string>", line 6 in <module>'
]
trace, exitcode = self.get_output(code)
self.assertEqual(trace, expected)
self.assertEqual(exitcode, 0)
@unittest.skipIf(not HAVE_THREADS, 'need threads')
def check_dump_traceback_threads(self, filename):
"""
Call explicitly dump_traceback(all_threads=True) and check the output.
Raise an error if the output doesn't match the expected format.
"""
code = """
import faulthandler
from threading import Thread, Event
import time
def dump():
if {filename}:
with open({filename}, "wb") as fp:
faulthandler.dump_traceback(fp, all_threads=True)
else:
faulthandler.dump_traceback(all_threads=True)
class Waiter(Thread):
# avoid blocking if the main thread raises an exception.
daemon = True
def __init__(self):
Thread.__init__(self)
self.running = Event()
self.stop = Event()
def run(self):
self.running.set()
self.stop.wait()
waiter = Waiter()
waiter.start()
waiter.running.wait()
dump()
waiter.stop.set()
waiter.join()
"""
code = code.format(filename=repr(filename))
output, exitcode = self.get_output(code, filename)
output = '\n'.join(output)
if filename:
lineno = 8
else:
lineno = 10
regex = r"""
^Thread 0x[0-9a-f]+ \(most recent call first\):
(?: File ".*threading.py", line [0-9]+ in [_a-z]+
){{1,3}} File "<string>", line 23 in run
File ".*threading.py", line [0-9]+ in _bootstrap_inner
File ".*threading.py", line [0-9]+ in _bootstrap
Current thread 0x[0-9a-f]+ \(most recent call first\):
File "<string>", line {lineno} in dump
File "<string>", line 28 in <module>$
"""
regex = dedent(regex.format(lineno=lineno)).strip()
self.assertRegex(output, regex)
self.assertEqual(exitcode, 0)
def test_dump_traceback_threads(self):
self.check_dump_traceback_threads(None)
def test_dump_traceback_threads_file(self):
with temporary_filename() as filename:
self.check_dump_traceback_threads(filename)
@unittest.skipIf(not hasattr(faulthandler, 'dump_traceback_later'),
'need faulthandler.dump_traceback_later()')
def check_dump_traceback_later(self, repeat=False, cancel=False, loops=1,
*, filename=None, fd=None):
"""
Check how many times the traceback is written in timeout x 2.5 seconds,
or timeout x 3.5 seconds if cancel is True: 1, 2 or 3 times depending
on repeat and cancel options.
Raise an error if the output doesn't match the expect format.
"""
timeout_str = str(datetime.timedelta(seconds=TIMEOUT))
code = """
import faulthandler
import time
import sys
timeout = {timeout}
repeat = {repeat}
cancel = {cancel}
loops = {loops}
filename = {filename!r}
fd = {fd}
def func(timeout, repeat, cancel, file, loops):
for loop in range(loops):
faulthandler.dump_traceback_later(timeout, repeat=repeat, file=file)
if cancel:
faulthandler.cancel_dump_traceback_later()
time.sleep(timeout * 5)
faulthandler.cancel_dump_traceback_later()
if filename:
file = open(filename, "wb")
elif fd is not None:
file = sys.stderr.fileno()
else:
file = None
func(timeout, repeat, cancel, file, loops)
if filename:
file.close()
"""
code = code.format(
timeout=TIMEOUT,
repeat=repeat,
cancel=cancel,
loops=loops,
filename=filename,
fd=fd,
)
trace, exitcode = self.get_output(code, filename)
trace = '\n'.join(trace)
if not cancel:
count = loops
if repeat:
count *= 2
header = r'Timeout \(%s\)!\nThread 0x[0-9a-f]+ \(most recent call first\):\n' % timeout_str
regex = expected_traceback(17, 26, header, min_count=count)
self.assertRegex(trace, regex)
else:
self.assertEqual(trace, '')
self.assertEqual(exitcode, 0)
def test_dump_traceback_later(self):
self.check_dump_traceback_later()
def test_dump_traceback_later_repeat(self):
self.check_dump_traceback_later(repeat=True)
def test_dump_traceback_later_cancel(self):
self.check_dump_traceback_later(cancel=True)
def test_dump_traceback_later_file(self):
with temporary_filename() as filename:
self.check_dump_traceback_later(filename=filename)
@unittest.skipIf(sys.platform == "win32",
"subprocess doesn't support pass_fds on Windows")
def test_dump_traceback_later_fd(self):
with tempfile.TemporaryFile('wb+') as fp:
self.check_dump_traceback_later(fd=fp.fileno())
def test_dump_traceback_later_twice(self):
self.check_dump_traceback_later(loops=2)
@unittest.skipIf(not hasattr(faulthandler, "register"),
"need faulthandler.register")
def check_register(self, filename=False, all_threads=False,
unregister=False, chain=False, fd=None):
"""
Register a handler displaying the traceback on a user signal. Raise the
signal and check the written traceback.
If chain is True, check that the previous signal handler is called.
Raise an error if the output doesn't match the expected format.
"""
signum = signal.SIGUSR1
code = """
import faulthandler
import os
import signal
import sys
all_threads = {all_threads}
signum = {signum}
unregister = {unregister}
chain = {chain}
filename = {filename!r}
fd = {fd}
def func(signum):
os.kill(os.getpid(), signum)
def handler(signum, frame):
handler.called = True
handler.called = False
if filename:
file = open(filename, "wb")
elif fd is not None:
file = sys.stderr.fileno()
else:
file = None
if chain:
signal.signal(signum, handler)
faulthandler.register(signum, file=file,
all_threads=all_threads, chain={chain})
if unregister:
faulthandler.unregister(signum)
func(signum)
if chain and not handler.called:
if file is not None:
output = file
else:
output = sys.stderr
print("Error: signal handler not called!", file=output)
exitcode = 1
else:
exitcode = 0
if filename:
file.close()
sys.exit(exitcode)
"""
code = code.format(
all_threads=all_threads,
signum=signum,
unregister=unregister,
chain=chain,
filename=filename,
fd=fd,
)
trace, exitcode = self.get_output(code, filename)
trace = '\n'.join(trace)
if not unregister:
if all_threads:
regex = r'Current thread 0x[0-9a-f]+ \(most recent call first\):\n'
else:
regex = r'Stack \(most recent call first\):\n'
regex = expected_traceback(14, 32, regex)
self.assertRegex(trace, regex)
else:
self.assertEqual(trace, '')
if unregister:
self.assertNotEqual(exitcode, 0)
else:
self.assertEqual(exitcode, 0)
def test_register(self):
self.check_register()
def test_unregister(self):
self.check_register(unregister=True)
def test_register_file(self):
with temporary_filename() as filename:
self.check_register(filename=filename)
@unittest.skipIf(sys.platform == "win32",
"subprocess doesn't support pass_fds on Windows")
def test_register_fd(self):
with tempfile.TemporaryFile('wb+') as fp:
self.check_register(fd=fp.fileno())
def test_register_threads(self):
self.check_register(all_threads=True)
def test_register_chain(self):
self.check_register(chain=True)
@contextmanager
def check_stderr_none(self):
stderr = sys.stderr
try:
sys.stderr = None
with self.assertRaises(RuntimeError) as cm:
yield
self.assertEqual(str(cm.exception), "sys.stderr is None")
finally:
sys.stderr = stderr
def test_stderr_None(self):
# Issue #21497: provide a helpful error if sys.stderr is None,
# instead of just an attribute error: "None has no attribute fileno".
with self.check_stderr_none():
faulthandler.enable()
with self.check_stderr_none():
faulthandler.dump_traceback()
if hasattr(faulthandler, 'dump_traceback_later'):
with self.check_stderr_none():
faulthandler.dump_traceback_later(1e-3)
if hasattr(faulthandler, "register"):
with self.check_stderr_none():
faulthandler.register(signal.SIGUSR1)
@unittest.skipUnless(MS_WINDOWS, 'specific to Windows')
def test_raise_exception(self):
for exc, name in (
('EXCEPTION_ACCESS_VIOLATION', 'access violation'),
('EXCEPTION_INT_DIVIDE_BY_ZERO', 'int divide by zero'),
('EXCEPTION_STACK_OVERFLOW', 'stack overflow'),
):
self.check_windows_exception(f"""
import faulthandler
faulthandler.enable()
faulthandler._raise_exception(faulthandler._{exc})
""",
3,
name)
@unittest.skipUnless(MS_WINDOWS, 'specific to Windows')
def test_ignore_exception(self):
for exc_code in (
0xE06D7363, # MSC exception ("Emsc")
0xE0434352, # COM Callable Runtime exception ("ECCR")
):
code = f"""
import faulthandler
faulthandler.enable()
faulthandler._raise_exception({exc_code})
"""
code = dedent(code)
output, exitcode = self.get_output(code)
self.assertEqual(output, [])
self.assertEqual(exitcode, exc_code)
@unittest.skipUnless(MS_WINDOWS, 'specific to Windows')
def test_raise_nonfatal_exception(self):
# These exceptions are not strictly errors. Letting
# faulthandler display the traceback when they are
# raised is likely to result in noise. However, they
# may still terminate the process if there is no
# handler installed for them (which there typically
# is, e.g. for debug messages).
for exc in (
0x00000000,
0x34567890,
0x40000000,
0x40001000,
0x70000000,
0x7FFFFFFF,
):
output, exitcode = self.get_output(f"""
import faulthandler
faulthandler.enable()
faulthandler._raise_exception(0x{exc:x})
"""
)
self.assertEqual(output, [])
# On Windows older than 7 SP1, the actual exception code has
# bit 29 cleared.
self.assertIn(exitcode,
(exc, exc & ~0x10000000))
@unittest.skipUnless(MS_WINDOWS, 'specific to Windows')
def test_disable_windows_exc_handler(self):
code = dedent("""
import faulthandler
faulthandler.enable()
faulthandler.disable()
code = faulthandler._EXCEPTION_ACCESS_VIOLATION
faulthandler._raise_exception(code)
""")
output, exitcode = self.get_output(code)
self.assertEqual(output, [])
self.assertEqual(exitcode, 0xC0000005)
if __name__ == "__main__":
unittest.main()
| 29,204 | 834 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_unpack_ex.py | # Tests for extended unpacking, starred expressions.
doctests = """
Unpack tuple
>>> t = (1, 2, 3)
>>> a, *b, c = t
>>> a == 1 and b == [2] and c == 3
True
Unpack list
>>> l = [4, 5, 6]
>>> a, *b = l
>>> a == 4 and b == [5, 6]
True
Unpack implied tuple
>>> *a, = 7, 8, 9
>>> a == [7, 8, 9]
True
Unpack string... fun!
>>> a, *b = 'one'
>>> a == 'o' and b == ['n', 'e']
True
Unpack long sequence
>>> a, b, c, *d, e, f, g = range(10)
>>> (a, b, c, d, e, f, g) == (0, 1, 2, [3, 4, 5, 6], 7, 8, 9)
True
Unpack short sequence
>>> a, *b, c = (1, 2)
>>> a == 1 and c == 2 and b == []
True
Unpack generic sequence
>>> class Seq:
... def __getitem__(self, i):
... if i >= 0 and i < 3: return i
... raise IndexError
...
>>> a, *b = Seq()
>>> a == 0 and b == [1, 2]
True
Unpack in for statement
>>> for a, *b, c in [(1,2,3), (4,5,6,7)]:
... print(a, b, c)
...
1 [2] 3
4 [5, 6] 7
Unpack in list
>>> [a, *b, c] = range(5)
>>> a == 0 and b == [1, 2, 3] and c == 4
True
Multiple targets
>>> a, *b, c = *d, e = range(5)
>>> a == 0 and b == [1, 2, 3] and c == 4 and d == [0, 1, 2, 3] and e == 4
True
Assignment unpacking
>>> a, b, *c = range(5)
>>> a, b, c
(0, 1, [2, 3, 4])
>>> *a, b, c = a, b, *c
>>> a, b, c
([0, 1, 2], 3, 4)
Set display element unpacking
>>> a = [1, 2, 3]
>>> sorted({1, *a, 0, 4})
[0, 1, 2, 3, 4]
>>> {1, *1, 0, 4}
Traceback (most recent call last):
...
TypeError: 'int' object is not iterable
Dict display element unpacking
>>> kwds = {'z': 0, 'w': 12}
>>> sorted({'x': 1, 'y': 2, **kwds}.items())
[('w', 12), ('x', 1), ('y', 2), ('z', 0)]
>>> sorted({**{'x': 1}, 'y': 2, **{'z': 3}}.items())
[('x', 1), ('y', 2), ('z', 3)]
>>> sorted({**{'x': 1}, 'y': 2, **{'x': 3}}.items())
[('x', 3), ('y', 2)]
>>> sorted({**{'x': 1}, **{'x': 3}, 'x': 4}.items())
[('x', 4)]
>>> {**{}}
{}
>>> a = {}
>>> {**a}[0] = 1
>>> a
{}
>>> {**1}
Traceback (most recent call last):
...
TypeError: 'int' object is not a mapping
>>> {**[]}
Traceback (most recent call last):
...
TypeError: 'list' object is not a mapping
>>> len(eval("{" + ", ".join("**{{{}: {}}}".format(i, i)
... for i in range(1000)) + "}"))
1000
>>> {0:1, **{0:2}, 0:3, 0:4}
{0: 4}
List comprehension element unpacking
>>> a, b, c = [0, 1, 2], 3, 4
>>> [*a, b, c]
[0, 1, 2, 3, 4]
>>> l = [a, (3, 4), {5}, {6: None}, (i for i in range(7, 10))]
>>> [*item for item in l]
Traceback (most recent call last):
...
SyntaxError: iterable unpacking cannot be used in comprehension
>>> [*[0, 1] for i in range(10)]
Traceback (most recent call last):
...
SyntaxError: iterable unpacking cannot be used in comprehension
>>> [*'a' for i in range(10)]
Traceback (most recent call last):
...
SyntaxError: iterable unpacking cannot be used in comprehension
>>> [*[] for i in range(10)]
Traceback (most recent call last):
...
SyntaxError: iterable unpacking cannot be used in comprehension
Generator expression in function arguments
>>> list(*x for x in (range(5) for i in range(3)))
Traceback (most recent call last):
...
list(*x for x in (range(5) for i in range(3)))
^
SyntaxError: invalid syntax
>>> dict(**x for x in [{1:2}])
Traceback (most recent call last):
...
dict(**x for x in [{1:2}])
^
SyntaxError: invalid syntax
Iterable argument unpacking
>>> print(*[1], *[2], 3)
1 2 3
Make sure that they don't corrupt the passed-in dicts.
>>> def f(x, y):
... print(x, y)
...
>>> original_dict = {'x': 1}
>>> f(**original_dict, y=2)
1 2
>>> original_dict
{'x': 1}
Now for some failures
Make sure the raised errors are right for keyword argument unpackings
>>> from collections.abc import MutableMapping
>>> class CrazyDict(MutableMapping):
... def __init__(self):
... self.d = {}
...
... def __iter__(self):
... for x in self.d.__iter__():
... if x == 'c':
... self.d['z'] = 10
... yield x
...
... def __getitem__(self, k):
... return self.d[k]
...
... def __len__(self):
... return len(self.d)
...
... def __setitem__(self, k, v):
... self.d[k] = v
...
... def __delitem__(self, k):
... del self.d[k]
...
>>> d = CrazyDict()
>>> d.d = {chr(ord('a') + x): x for x in range(5)}
>>> e = {**d}
Traceback (most recent call last):
...
RuntimeError: dictionary changed size during iteration
>>> d.d = {chr(ord('a') + x): x for x in range(5)}
>>> def f(**kwargs): print(kwargs)
>>> f(**d)
Traceback (most recent call last):
...
RuntimeError: dictionary changed size during iteration
Overridden parameters
>>> f(x=5, **{'x': 3}, y=2)
Traceback (most recent call last):
...
TypeError: f() got multiple values for keyword argument 'x'
>>> f(**{'x': 3}, x=5, y=2)
Traceback (most recent call last):
...
TypeError: f() got multiple values for keyword argument 'x'
>>> f(**{'x': 3}, **{'x': 5}, y=2)
Traceback (most recent call last):
...
TypeError: f() got multiple values for keyword argument 'x'
>>> f(x=5, **{'x': 3}, **{'x': 2})
Traceback (most recent call last):
...
TypeError: f() got multiple values for keyword argument 'x'
>>> f(**{1: 3}, **{1: 5})
Traceback (most recent call last):
...
TypeError: f() keywords must be strings
Unpacking non-sequence
>>> a, *b = 7
Traceback (most recent call last):
...
TypeError: 'int' object is not iterable
Unpacking sequence too short
>>> a, *b, c, d, e = Seq()
Traceback (most recent call last):
...
ValueError: not enough values to unpack (expected at least 4, got 3)
Unpacking sequence too short and target appears last
>>> a, b, c, d, *e = Seq()
Traceback (most recent call last):
...
ValueError: not enough values to unpack (expected at least 4, got 3)
Unpacking a sequence where the test for too long raises a different kind of
error
>>> class BozoError(Exception):
... pass
...
>>> class BadSeq:
... def __getitem__(self, i):
... if i >= 0 and i < 3:
... return i
... elif i == 3:
... raise BozoError
... else:
... raise IndexError
...
Trigger code while not expecting an IndexError (unpack sequence too long, wrong
error)
>>> a, *b, c, d, e = BadSeq()
Traceback (most recent call last):
...
test.test_unpack_ex.BozoError
Now some general starred expressions (all fail).
>>> a, *b, c, *d, e = range(10) # doctest:+ELLIPSIS
Traceback (most recent call last):
...
SyntaxError: two starred expressions in assignment
>>> [*b, *c] = range(10) # doctest:+ELLIPSIS
Traceback (most recent call last):
...
SyntaxError: two starred expressions in assignment
>>> *a = range(10) # doctest:+ELLIPSIS
Traceback (most recent call last):
...
SyntaxError: starred assignment target must be in a list or tuple
>>> *a # doctest:+ELLIPSIS
Traceback (most recent call last):
...
SyntaxError: can't use starred expression here
>>> *1 # doctest:+ELLIPSIS
Traceback (most recent call last):
...
SyntaxError: can't use starred expression here
>>> x = *a # doctest:+ELLIPSIS
Traceback (most recent call last):
...
SyntaxError: can't use starred expression here
Some size constraints (all fail.)
>>> s = ", ".join("a%d" % i for i in range(1<<8)) + ", *rest = range(1<<8 + 1)"
>>> compile(s, 'test', 'exec') # doctest:+ELLIPSIS
Traceback (most recent call last):
...
SyntaxError: too many expressions in star-unpacking assignment
>>> s = ", ".join("a%d" % i for i in range(1<<8 + 1)) + ", *rest = range(1<<8 + 2)"
>>> compile(s, 'test', 'exec') # doctest:+ELLIPSIS
Traceback (most recent call last):
...
SyntaxError: too many expressions in star-unpacking assignment
(there is an additional limit, on the number of expressions after the
'*rest', but it's 1<<24 and testing it takes too much memory.)
"""
__test__ = {'doctests' : doctests}
def test_main(verbose=False):
from test import support
from test import test_unpack_ex
support.run_doctest(test_unpack_ex, verbose)
if __name__ == "__main__":
test_main(verbose=True)
| 8,932 | 366 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_concurrent_futures.py | import test.support
# Skip tests if _multiprocessing wasn't built.
test.support.import_module('_multiprocessing')
# Skip tests if sem_open implementation is broken.
test.support.import_module('multiprocessing.synchronize')
# import threading after _multiprocessing to raise a more relevant error
# message: "No module named _multiprocessing". _multiprocessing is not compiled
# without thread support.
test.support.import_module('threading')
from test.support.script_helper import assert_python_ok
import itertools
import os
import sys
import threading
import time
import unittest
import weakref
from concurrent import futures
from concurrent.futures._base import (
PENDING, RUNNING, CANCELLED, CANCELLED_AND_NOTIFIED, FINISHED, Future)
from concurrent.futures.process import BrokenProcessPool
def create_future(state=PENDING, exception=None, result=None):
f = Future()
f._state = state
f._exception = exception
f._result = result
return f
PENDING_FUTURE = create_future(state=PENDING)
RUNNING_FUTURE = create_future(state=RUNNING)
CANCELLED_FUTURE = create_future(state=CANCELLED)
CANCELLED_AND_NOTIFIED_FUTURE = create_future(state=CANCELLED_AND_NOTIFIED)
EXCEPTION_FUTURE = create_future(state=FINISHED, exception=OSError())
SUCCESSFUL_FUTURE = create_future(state=FINISHED, result=42)
def mul(x, y):
return x * y
def sleep_and_raise(t):
time.sleep(t)
raise Exception('this is an exception')
def sleep_and_print(t, msg):
time.sleep(t)
print(msg)
sys.stdout.flush()
class MyObject(object):
def my_method(self):
pass
def make_dummy_object(_):
return MyObject()
class BaseTestCase(unittest.TestCase):
def setUp(self):
self._thread_key = test.support.threading_setup()
def tearDown(self):
test.support.reap_children()
test.support.threading_cleanup(*self._thread_key)
class ExecutorMixin:
worker_count = 5
def setUp(self):
super().setUp()
self.t1 = time.monotonic()
try:
self.executor = self.executor_type(max_workers=self.worker_count)
except NotImplementedError as e:
self.skipTest(str(e))
self._prime_executor()
def tearDown(self):
self.executor.shutdown(wait=True)
self.executor = None
dt = time.monotonic() - self.t1
if test.support.verbose:
print("%.2fs" % dt, end=' ')
self.assertLess(dt, 300, "synchronization issue: test lasted too long")
super().tearDown()
def _prime_executor(self):
# Make sure that the executor is ready to do work before running the
# tests. This should reduce the probability of timeouts in the tests.
futures = [self.executor.submit(time.sleep, 0.1)
for _ in range(self.worker_count)]
for f in futures:
f.result()
class ThreadPoolMixin(ExecutorMixin):
executor_type = futures.ThreadPoolExecutor
class ProcessPoolMixin(ExecutorMixin):
executor_type = futures.ProcessPoolExecutor
class ExecutorShutdownTest:
def test_run_after_shutdown(self):
self.executor.shutdown()
self.assertRaises(RuntimeError,
self.executor.submit,
pow, 2, 5)
def test_interpreter_shutdown(self):
# Test the atexit hook for shutdown of worker threads and processes
rc, out, err = assert_python_ok('-c', """if 1:
from concurrent.futures import {executor_type}
from time import sleep
from test.test_concurrent_futures import sleep_and_print
t = {executor_type}(5)
t.submit(sleep_and_print, 1.0, "apple")
""".format(executor_type=self.executor_type.__name__))
# Errors in atexit hooks don't change the process exit code, check
# stderr manually.
self.assertFalse(err)
self.assertEqual(out.strip(), b"apple")
def test_hang_issue12364(self):
fs = [self.executor.submit(time.sleep, 0.1) for _ in range(50)]
self.executor.shutdown()
for f in fs:
f.result()
class ThreadPoolShutdownTest(ThreadPoolMixin, ExecutorShutdownTest, BaseTestCase):
def _prime_executor(self):
pass
def test_threads_terminate(self):
self.executor.submit(mul, 21, 2)
self.executor.submit(mul, 6, 7)
self.executor.submit(mul, 3, 14)
self.assertEqual(len(self.executor._threads), 3)
self.executor.shutdown()
for t in self.executor._threads:
t.join()
def test_context_manager_shutdown(self):
with futures.ThreadPoolExecutor(max_workers=5) as e:
executor = e
self.assertEqual(list(e.map(abs, range(-5, 5))),
[5, 4, 3, 2, 1, 0, 1, 2, 3, 4])
for t in executor._threads:
t.join()
def test_del_shutdown(self):
executor = futures.ThreadPoolExecutor(max_workers=5)
executor.map(abs, range(-5, 5))
threads = executor._threads
del executor
for t in threads:
t.join()
def test_thread_names_assigned(self):
executor = futures.ThreadPoolExecutor(
max_workers=5, thread_name_prefix='SpecialPool')
executor.map(abs, range(-5, 5))
threads = executor._threads
del executor
for t in threads:
self.assertRegex(t.name, r'^SpecialPool_[0-4]$')
t.join()
def test_thread_names_default(self):
executor = futures.ThreadPoolExecutor(max_workers=5)
executor.map(abs, range(-5, 5))
threads = executor._threads
del executor
for t in threads:
# Ensure that our default name is reasonably sane and unique when
# no thread_name_prefix was supplied.
self.assertRegex(t.name, r'ThreadPoolExecutor-\d+_[0-4]$')
t.join()
class ProcessPoolShutdownTest(ProcessPoolMixin, ExecutorShutdownTest, BaseTestCase):
def _prime_executor(self):
pass
def test_processes_terminate(self):
self.executor.submit(mul, 21, 2)
self.executor.submit(mul, 6, 7)
self.executor.submit(mul, 3, 14)
self.assertEqual(len(self.executor._processes), 5)
processes = self.executor._processes
self.executor.shutdown()
for p in processes.values():
p.join()
def test_context_manager_shutdown(self):
with futures.ProcessPoolExecutor(max_workers=5) as e:
processes = e._processes
self.assertEqual(list(e.map(abs, range(-5, 5))),
[5, 4, 3, 2, 1, 0, 1, 2, 3, 4])
for p in processes.values():
p.join()
def test_del_shutdown(self):
executor = futures.ProcessPoolExecutor(max_workers=5)
list(executor.map(abs, range(-5, 5)))
queue_management_thread = executor._queue_management_thread
processes = executor._processes
call_queue = executor._call_queue
del executor
queue_management_thread.join()
for p in processes.values():
p.join()
call_queue.close()
call_queue.join_thread()
class WaitTests:
def test_first_completed(self):
future1 = self.executor.submit(mul, 21, 2)
future2 = self.executor.submit(time.sleep, 1.5)
done, not_done = futures.wait(
[CANCELLED_FUTURE, future1, future2],
return_when=futures.FIRST_COMPLETED)
self.assertEqual(set([future1]), done)
self.assertEqual(set([CANCELLED_FUTURE, future2]), not_done)
def test_first_completed_some_already_completed(self):
future1 = self.executor.submit(time.sleep, 1.5)
finished, pending = futures.wait(
[CANCELLED_AND_NOTIFIED_FUTURE, SUCCESSFUL_FUTURE, future1],
return_when=futures.FIRST_COMPLETED)
self.assertEqual(
set([CANCELLED_AND_NOTIFIED_FUTURE, SUCCESSFUL_FUTURE]),
finished)
self.assertEqual(set([future1]), pending)
def test_first_exception(self):
future1 = self.executor.submit(mul, 2, 21)
future2 = self.executor.submit(sleep_and_raise, 1.5)
future3 = self.executor.submit(time.sleep, 3)
finished, pending = futures.wait(
[future1, future2, future3],
return_when=futures.FIRST_EXCEPTION)
self.assertEqual(set([future1, future2]), finished)
self.assertEqual(set([future3]), pending)
def test_first_exception_some_already_complete(self):
future1 = self.executor.submit(divmod, 21, 0)
future2 = self.executor.submit(time.sleep, 1.5)
finished, pending = futures.wait(
[SUCCESSFUL_FUTURE,
CANCELLED_FUTURE,
CANCELLED_AND_NOTIFIED_FUTURE,
future1, future2],
return_when=futures.FIRST_EXCEPTION)
self.assertEqual(set([SUCCESSFUL_FUTURE,
CANCELLED_AND_NOTIFIED_FUTURE,
future1]), finished)
self.assertEqual(set([CANCELLED_FUTURE, future2]), pending)
def test_first_exception_one_already_failed(self):
future1 = self.executor.submit(time.sleep, 2)
finished, pending = futures.wait(
[EXCEPTION_FUTURE, future1],
return_when=futures.FIRST_EXCEPTION)
self.assertEqual(set([EXCEPTION_FUTURE]), finished)
self.assertEqual(set([future1]), pending)
def test_all_completed(self):
future1 = self.executor.submit(divmod, 2, 0)
future2 = self.executor.submit(mul, 2, 21)
finished, pending = futures.wait(
[SUCCESSFUL_FUTURE,
CANCELLED_AND_NOTIFIED_FUTURE,
EXCEPTION_FUTURE,
future1,
future2],
return_when=futures.ALL_COMPLETED)
self.assertEqual(set([SUCCESSFUL_FUTURE,
CANCELLED_AND_NOTIFIED_FUTURE,
EXCEPTION_FUTURE,
future1,
future2]), finished)
self.assertEqual(set(), pending)
def test_timeout(self):
future1 = self.executor.submit(mul, 6, 7)
future2 = self.executor.submit(time.sleep, 6)
finished, pending = futures.wait(
[CANCELLED_AND_NOTIFIED_FUTURE,
EXCEPTION_FUTURE,
SUCCESSFUL_FUTURE,
future1, future2],
timeout=5,
return_when=futures.ALL_COMPLETED)
self.assertEqual(set([CANCELLED_AND_NOTIFIED_FUTURE,
EXCEPTION_FUTURE,
SUCCESSFUL_FUTURE,
future1]), finished)
self.assertEqual(set([future2]), pending)
class ThreadPoolWaitTests(ThreadPoolMixin, WaitTests, BaseTestCase):
def test_pending_calls_race(self):
# Issue #14406: multi-threaded race condition when waiting on all
# futures.
event = threading.Event()
def future_func():
event.wait()
oldswitchinterval = sys.getswitchinterval()
sys.setswitchinterval(1e-6)
try:
fs = {self.executor.submit(future_func) for i in range(100)}
event.set()
futures.wait(fs, return_when=futures.ALL_COMPLETED)
finally:
sys.setswitchinterval(oldswitchinterval)
class ProcessPoolWaitTests(ProcessPoolMixin, WaitTests, BaseTestCase):
pass
class AsCompletedTests:
# TODO([email protected]): Should have a test with a non-zero timeout.
def test_no_timeout(self):
future1 = self.executor.submit(mul, 2, 21)
future2 = self.executor.submit(mul, 7, 6)
completed = set(futures.as_completed(
[CANCELLED_AND_NOTIFIED_FUTURE,
EXCEPTION_FUTURE,
SUCCESSFUL_FUTURE,
future1, future2]))
self.assertEqual(set(
[CANCELLED_AND_NOTIFIED_FUTURE,
EXCEPTION_FUTURE,
SUCCESSFUL_FUTURE,
future1, future2]),
completed)
def test_zero_timeout(self):
future1 = self.executor.submit(time.sleep, 2)
completed_futures = set()
try:
for future in futures.as_completed(
[CANCELLED_AND_NOTIFIED_FUTURE,
EXCEPTION_FUTURE,
SUCCESSFUL_FUTURE,
future1],
timeout=0):
completed_futures.add(future)
except futures.TimeoutError:
pass
self.assertEqual(set([CANCELLED_AND_NOTIFIED_FUTURE,
EXCEPTION_FUTURE,
SUCCESSFUL_FUTURE]),
completed_futures)
def test_duplicate_futures(self):
# Issue 20367. Duplicate futures should not raise exceptions or give
# duplicate responses.
# Issue #31641: accept arbitrary iterables.
future1 = self.executor.submit(time.sleep, 2)
completed = [
f for f in futures.as_completed(itertools.repeat(future1, 3))
]
self.assertEqual(len(completed), 1)
def test_free_reference_yielded_future(self):
# Issue #14406: Generator should not keep references
# to finished futures.
futures_list = [Future() for _ in range(8)]
futures_list.append(create_future(state=CANCELLED_AND_NOTIFIED))
futures_list.append(create_future(state=FINISHED, result=42))
with self.assertRaises(futures.TimeoutError):
for future in futures.as_completed(futures_list, timeout=0):
futures_list.remove(future)
wr = weakref.ref(future)
del future
self.assertIsNone(wr())
futures_list[0].set_result("test")
for future in futures.as_completed(futures_list):
futures_list.remove(future)
wr = weakref.ref(future)
del future
self.assertIsNone(wr())
if futures_list:
futures_list[0].set_result("test")
def test_correct_timeout_exception_msg(self):
futures_list = [CANCELLED_AND_NOTIFIED_FUTURE, PENDING_FUTURE,
RUNNING_FUTURE, SUCCESSFUL_FUTURE]
with self.assertRaises(futures.TimeoutError) as cm:
list(futures.as_completed(futures_list, timeout=0))
self.assertEqual(str(cm.exception), '2 (of 4) futures unfinished')
class ThreadPoolAsCompletedTests(ThreadPoolMixin, AsCompletedTests, BaseTestCase):
pass
class ProcessPoolAsCompletedTests(ProcessPoolMixin, AsCompletedTests, BaseTestCase):
pass
class ExecutorTest:
# Executor.shutdown() and context manager usage is tested by
# ExecutorShutdownTest.
def test_submit(self):
future = self.executor.submit(pow, 2, 8)
self.assertEqual(256, future.result())
def test_submit_keyword(self):
future = self.executor.submit(mul, 2, y=8)
self.assertEqual(16, future.result())
def test_map(self):
self.assertEqual(
list(self.executor.map(pow, range(10), range(10))),
list(map(pow, range(10), range(10))))
self.assertEqual(
list(self.executor.map(pow, range(10), range(10), chunksize=3)),
list(map(pow, range(10), range(10))))
def test_map_exception(self):
i = self.executor.map(divmod, [1, 1, 1, 1], [2, 3, 0, 5])
self.assertEqual(i.__next__(), (0, 1))
self.assertEqual(i.__next__(), (0, 1))
self.assertRaises(ZeroDivisionError, i.__next__)
def test_map_timeout(self):
results = []
try:
for i in self.executor.map(time.sleep,
[0, 0, 6],
timeout=5):
results.append(i)
except futures.TimeoutError:
pass
else:
self.fail('expected TimeoutError')
self.assertEqual([None, None], results)
def test_shutdown_race_issue12456(self):
# Issue #12456: race condition at shutdown where trying to post a
# sentinel in the call queue blocks (the queue is full while processes
# have exited).
self.executor.map(str, [2] * (self.worker_count + 1))
self.executor.shutdown()
@test.support.cpython_only
def test_no_stale_references(self):
# Issue #16284: check that the executors don't unnecessarily hang onto
# references.
my_object = MyObject()
my_object_collected = threading.Event()
my_object_callback = weakref.ref(
my_object, lambda obj: my_object_collected.set())
# Deliberately discarding the future.
self.executor.submit(my_object.my_method)
del my_object
collected = my_object_collected.wait(timeout=5.0)
self.assertTrue(collected,
"Stale reference not collected within timeout.")
def test_max_workers_negative(self):
for number in (0, -1):
with self.assertRaisesRegex(ValueError,
"max_workers must be greater "
"than 0"):
self.executor_type(max_workers=number)
def test_free_reference(self):
# Issue #14406: Result iterator should not keep an internal
# reference to result objects.
for obj in self.executor.map(make_dummy_object, range(10)):
wr = weakref.ref(obj)
del obj
self.assertIsNone(wr())
class ThreadPoolExecutorTest(ThreadPoolMixin, ExecutorTest, BaseTestCase):
def test_map_submits_without_iteration(self):
"""Tests verifying issue 11777."""
finished = []
def record_finished(n):
finished.append(n)
self.executor.map(record_finished, range(10))
self.executor.shutdown(wait=True)
self.assertCountEqual(finished, range(10))
def test_default_workers(self):
executor = self.executor_type()
self.assertEqual(executor._max_workers,
(os.cpu_count() or 1) * 5)
class ProcessPoolExecutorTest(ProcessPoolMixin, ExecutorTest, BaseTestCase):
def test_killed_child(self):
# When a child process is abruptly terminated, the whole pool gets
# "broken".
futures = [self.executor.submit(time.sleep, 3)]
# Get one of the processes, and terminate (kill) it
p = next(iter(self.executor._processes.values()))
p.terminate()
for fut in futures:
self.assertRaises(BrokenProcessPool, fut.result)
# Submitting other jobs fails as well.
self.assertRaises(BrokenProcessPool, self.executor.submit, pow, 2, 8)
def test_map_chunksize(self):
def bad_map():
list(self.executor.map(pow, range(40), range(40), chunksize=-1))
ref = list(map(pow, range(40), range(40)))
self.assertEqual(
list(self.executor.map(pow, range(40), range(40), chunksize=6)),
ref)
self.assertEqual(
list(self.executor.map(pow, range(40), range(40), chunksize=50)),
ref)
self.assertEqual(
list(self.executor.map(pow, range(40), range(40), chunksize=40)),
ref)
self.assertRaises(ValueError, bad_map)
@classmethod
def _test_traceback(cls):
raise RuntimeError(123) # some comment
def test_traceback(self):
# We want ensure that the traceback from the child process is
# contained in the traceback raised in the main process.
future = self.executor.submit(self._test_traceback)
with self.assertRaises(Exception) as cm:
future.result()
exc = cm.exception
self.assertIs(type(exc), RuntimeError)
self.assertEqual(exc.args, (123,))
cause = exc.__cause__
self.assertIs(type(cause), futures.process._RemoteTraceback)
self.assertIn('raise RuntimeError(123) # some comment', cause.tb)
with test.support.captured_stderr() as f1:
try:
raise exc
except RuntimeError:
sys.excepthook(*sys.exc_info())
self.assertIn('raise RuntimeError(123) # some comment',
f1.getvalue())
class FutureTests(BaseTestCase):
def test_done_callback_with_result(self):
callback_result = None
def fn(callback_future):
nonlocal callback_result
callback_result = callback_future.result()
f = Future()
f.add_done_callback(fn)
f.set_result(5)
self.assertEqual(5, callback_result)
def test_done_callback_with_exception(self):
callback_exception = None
def fn(callback_future):
nonlocal callback_exception
callback_exception = callback_future.exception()
f = Future()
f.add_done_callback(fn)
f.set_exception(Exception('test'))
self.assertEqual(('test',), callback_exception.args)
def test_done_callback_with_cancel(self):
was_cancelled = None
def fn(callback_future):
nonlocal was_cancelled
was_cancelled = callback_future.cancelled()
f = Future()
f.add_done_callback(fn)
self.assertTrue(f.cancel())
self.assertTrue(was_cancelled)
def test_done_callback_raises(self):
with test.support.captured_stderr() as stderr:
raising_was_called = False
fn_was_called = False
def raising_fn(callback_future):
nonlocal raising_was_called
raising_was_called = True
raise Exception('doh!')
def fn(callback_future):
nonlocal fn_was_called
fn_was_called = True
f = Future()
f.add_done_callback(raising_fn)
f.add_done_callback(fn)
f.set_result(5)
self.assertTrue(raising_was_called)
self.assertTrue(fn_was_called)
self.assertIn('Exception: doh!', stderr.getvalue())
def test_done_callback_already_successful(self):
callback_result = None
def fn(callback_future):
nonlocal callback_result
callback_result = callback_future.result()
f = Future()
f.set_result(5)
f.add_done_callback(fn)
self.assertEqual(5, callback_result)
def test_done_callback_already_failed(self):
callback_exception = None
def fn(callback_future):
nonlocal callback_exception
callback_exception = callback_future.exception()
f = Future()
f.set_exception(Exception('test'))
f.add_done_callback(fn)
self.assertEqual(('test',), callback_exception.args)
def test_done_callback_already_cancelled(self):
was_cancelled = None
def fn(callback_future):
nonlocal was_cancelled
was_cancelled = callback_future.cancelled()
f = Future()
self.assertTrue(f.cancel())
f.add_done_callback(fn)
self.assertTrue(was_cancelled)
def test_repr(self):
self.assertRegex(repr(PENDING_FUTURE),
'<Future at 0x[0-9a-f]+ state=pending>')
self.assertRegex(repr(RUNNING_FUTURE),
'<Future at 0x[0-9a-f]+ state=running>')
self.assertRegex(repr(CANCELLED_FUTURE),
'<Future at 0x[0-9a-f]+ state=cancelled>')
self.assertRegex(repr(CANCELLED_AND_NOTIFIED_FUTURE),
'<Future at 0x[0-9a-f]+ state=cancelled>')
self.assertRegex(
repr(EXCEPTION_FUTURE),
'<Future at 0x[0-9a-f]+ state=finished raised OSError>')
self.assertRegex(
repr(SUCCESSFUL_FUTURE),
'<Future at 0x[0-9a-f]+ state=finished returned int>')
def test_cancel(self):
f1 = create_future(state=PENDING)
f2 = create_future(state=RUNNING)
f3 = create_future(state=CANCELLED)
f4 = create_future(state=CANCELLED_AND_NOTIFIED)
f5 = create_future(state=FINISHED, exception=OSError())
f6 = create_future(state=FINISHED, result=5)
self.assertTrue(f1.cancel())
self.assertEqual(f1._state, CANCELLED)
self.assertFalse(f2.cancel())
self.assertEqual(f2._state, RUNNING)
self.assertTrue(f3.cancel())
self.assertEqual(f3._state, CANCELLED)
self.assertTrue(f4.cancel())
self.assertEqual(f4._state, CANCELLED_AND_NOTIFIED)
self.assertFalse(f5.cancel())
self.assertEqual(f5._state, FINISHED)
self.assertFalse(f6.cancel())
self.assertEqual(f6._state, FINISHED)
def test_cancelled(self):
self.assertFalse(PENDING_FUTURE.cancelled())
self.assertFalse(RUNNING_FUTURE.cancelled())
self.assertTrue(CANCELLED_FUTURE.cancelled())
self.assertTrue(CANCELLED_AND_NOTIFIED_FUTURE.cancelled())
self.assertFalse(EXCEPTION_FUTURE.cancelled())
self.assertFalse(SUCCESSFUL_FUTURE.cancelled())
def test_done(self):
self.assertFalse(PENDING_FUTURE.done())
self.assertFalse(RUNNING_FUTURE.done())
self.assertTrue(CANCELLED_FUTURE.done())
self.assertTrue(CANCELLED_AND_NOTIFIED_FUTURE.done())
self.assertTrue(EXCEPTION_FUTURE.done())
self.assertTrue(SUCCESSFUL_FUTURE.done())
def test_running(self):
self.assertFalse(PENDING_FUTURE.running())
self.assertTrue(RUNNING_FUTURE.running())
self.assertFalse(CANCELLED_FUTURE.running())
self.assertFalse(CANCELLED_AND_NOTIFIED_FUTURE.running())
self.assertFalse(EXCEPTION_FUTURE.running())
self.assertFalse(SUCCESSFUL_FUTURE.running())
def test_result_with_timeout(self):
self.assertRaises(futures.TimeoutError,
PENDING_FUTURE.result, timeout=0)
self.assertRaises(futures.TimeoutError,
RUNNING_FUTURE.result, timeout=0)
self.assertRaises(futures.CancelledError,
CANCELLED_FUTURE.result, timeout=0)
self.assertRaises(futures.CancelledError,
CANCELLED_AND_NOTIFIED_FUTURE.result, timeout=0)
self.assertRaises(OSError, EXCEPTION_FUTURE.result, timeout=0)
self.assertEqual(SUCCESSFUL_FUTURE.result(timeout=0), 42)
def test_result_with_success(self):
# TODO([email protected]): This test is timing dependent.
def notification():
# Wait until the main thread is waiting for the result.
time.sleep(1)
f1.set_result(42)
f1 = create_future(state=PENDING)
t = threading.Thread(target=notification)
t.start()
self.assertEqual(f1.result(timeout=5), 42)
t.join()
def test_result_with_cancel(self):
# TODO([email protected]): This test is timing dependent.
def notification():
# Wait until the main thread is waiting for the result.
time.sleep(1)
f1.cancel()
f1 = create_future(state=PENDING)
t = threading.Thread(target=notification)
t.start()
self.assertRaises(futures.CancelledError, f1.result, timeout=5)
t.join()
def test_exception_with_timeout(self):
self.assertRaises(futures.TimeoutError,
PENDING_FUTURE.exception, timeout=0)
self.assertRaises(futures.TimeoutError,
RUNNING_FUTURE.exception, timeout=0)
self.assertRaises(futures.CancelledError,
CANCELLED_FUTURE.exception, timeout=0)
self.assertRaises(futures.CancelledError,
CANCELLED_AND_NOTIFIED_FUTURE.exception, timeout=0)
self.assertTrue(isinstance(EXCEPTION_FUTURE.exception(timeout=0),
OSError))
self.assertEqual(SUCCESSFUL_FUTURE.exception(timeout=0), None)
def test_exception_with_success(self):
def notification():
# Wait until the main thread is waiting for the exception.
time.sleep(1)
with f1._condition:
f1._state = FINISHED
f1._exception = OSError()
f1._condition.notify_all()
f1 = create_future(state=PENDING)
t = threading.Thread(target=notification)
t.start()
self.assertTrue(isinstance(f1.exception(timeout=5), OSError))
t.join()
@test.support.reap_threads
def test_main():
try:
test.support.run_unittest(__name__)
finally:
test.support.reap_children()
if __name__ == "__main__":
test_main()
| 29,066 | 837 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_sqlite.py | import test.support
# Skip test if _sqlite3 module not installed
test.support.import_module('_sqlite3')
import unittest
import sqlite3
from sqlite3.test import (dbapi, types, userfunctions,
factory, transactions, hooks, regression,
dump)
def load_tests(*args):
if test.support.verbose:
print("test_sqlite: testing with version",
"{!r}, sqlite_version {!r}".format(sqlite3.version,
sqlite3.sqlite_version))
return unittest.TestSuite([dbapi.suite(), types.suite(),
userfunctions.suite(),
factory.suite(), transactions.suite(),
hooks.suite(), regression.suite(),
dump.suite()])
if __name__ == "__main__":
unittest.main()
| 893 | 25 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/__init__.py | # Dummy file to make this directory a package.
| 47 | 2 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_getargs2.py | import unittest
import math
import string
import sys
from test import support
# Skip this test if the _testcapi module isn't available.
_testcapi = support.import_module('_testcapi')
from _testcapi import getargs_keywords, getargs_keyword_only
# > How about the following counterproposal. This also changes some of
# > the other format codes to be a little more regular.
# >
# > Code C type Range check
# >
# > b unsigned char 0..UCHAR_MAX
# > h signed short SHRT_MIN..SHRT_MAX
# > B unsigned char none **
# > H unsigned short none **
# > k * unsigned long none
# > I * unsigned int 0..UINT_MAX
#
#
# > i int INT_MIN..INT_MAX
# > l long LONG_MIN..LONG_MAX
#
# > K * unsigned long long none
# > L long long LLONG_MIN..LLONG_MAX
#
# > Notes:
# >
# > * New format codes.
# >
# > ** Changed from previous "range-and-a-half" to "none"; the
# > range-and-a-half checking wasn't particularly useful.
#
# Plus a C API or two, e.g. PyLong_AsUnsignedLongMask() ->
# unsigned long and PyLong_AsUnsignedLongLongMask() -> unsigned
# long long (if that exists).
LARGE = 0x7FFFFFFF
VERY_LARGE = 0xFF0000121212121212121242
from _testcapi import UCHAR_MAX, USHRT_MAX, UINT_MAX, ULONG_MAX, INT_MAX, \
INT_MIN, LONG_MIN, LONG_MAX, PY_SSIZE_T_MIN, PY_SSIZE_T_MAX, \
SHRT_MIN, SHRT_MAX, FLT_MIN, FLT_MAX, DBL_MIN, DBL_MAX
DBL_MAX_EXP = sys.float_info.max_exp
INF = float('inf')
NAN = float('nan')
# fake, they are not defined in Python's header files
LLONG_MAX = 2**63-1
LLONG_MIN = -2**63
ULLONG_MAX = 2**64-1
class Int:
def __int__(self):
return 99
class IntSubclass(int):
def __int__(self):
return 99
class BadInt:
def __int__(self):
return 1.0
class BadInt2:
def __int__(self):
return True
class BadInt3(int):
def __int__(self):
return True
class Float:
def __float__(self):
return 4.25
class FloatSubclass(float):
pass
class FloatSubclass2(float):
def __float__(self):
return 4.25
class BadFloat:
def __float__(self):
return 687
class BadFloat2:
def __float__(self):
return FloatSubclass(4.25)
class BadFloat3(float):
def __float__(self):
return FloatSubclass(4.25)
class Complex:
def __complex__(self):
return 4.25+0.5j
class ComplexSubclass(complex):
pass
class ComplexSubclass2(complex):
def __complex__(self):
return 4.25+0.5j
class BadComplex:
def __complex__(self):
return 1.25
class BadComplex2:
def __complex__(self):
return ComplexSubclass(4.25+0.5j)
class BadComplex3(complex):
def __complex__(self):
return ComplexSubclass(4.25+0.5j)
class TupleSubclass(tuple):
pass
class DictSubclass(dict):
pass
class Unsigned_TestCase(unittest.TestCase):
def test_b(self):
from _testcapi import getargs_b
# b returns 'unsigned char', and does range checking (0 ... UCHAR_MAX)
self.assertRaises(TypeError, getargs_b, 3.14)
self.assertEqual(99, getargs_b(Int()))
self.assertEqual(0, getargs_b(IntSubclass()))
self.assertRaises(TypeError, getargs_b, BadInt())
with self.assertWarns(DeprecationWarning):
self.assertEqual(1, getargs_b(BadInt2()))
self.assertEqual(0, getargs_b(BadInt3()))
self.assertRaises(OverflowError, getargs_b, -1)
self.assertEqual(0, getargs_b(0))
self.assertEqual(UCHAR_MAX, getargs_b(UCHAR_MAX))
self.assertRaises(OverflowError, getargs_b, UCHAR_MAX + 1)
self.assertEqual(42, getargs_b(42))
self.assertRaises(OverflowError, getargs_b, VERY_LARGE)
def test_B(self):
from _testcapi import getargs_B
# B returns 'unsigned char', no range checking
self.assertRaises(TypeError, getargs_B, 3.14)
self.assertEqual(99, getargs_B(Int()))
self.assertEqual(0, getargs_B(IntSubclass()))
self.assertRaises(TypeError, getargs_B, BadInt())
with self.assertWarns(DeprecationWarning):
self.assertEqual(1, getargs_B(BadInt2()))
self.assertEqual(0, getargs_B(BadInt3()))
self.assertEqual(UCHAR_MAX, getargs_B(-1))
self.assertEqual(0, getargs_B(0))
self.assertEqual(UCHAR_MAX, getargs_B(UCHAR_MAX))
self.assertEqual(0, getargs_B(UCHAR_MAX+1))
self.assertEqual(42, getargs_B(42))
self.assertEqual(UCHAR_MAX & VERY_LARGE, getargs_B(VERY_LARGE))
def test_H(self):
from _testcapi import getargs_H
# H returns 'unsigned short', no range checking
self.assertRaises(TypeError, getargs_H, 3.14)
self.assertEqual(99, getargs_H(Int()))
self.assertEqual(0, getargs_H(IntSubclass()))
self.assertRaises(TypeError, getargs_H, BadInt())
with self.assertWarns(DeprecationWarning):
self.assertEqual(1, getargs_H(BadInt2()))
self.assertEqual(0, getargs_H(BadInt3()))
self.assertEqual(USHRT_MAX, getargs_H(-1))
self.assertEqual(0, getargs_H(0))
self.assertEqual(USHRT_MAX, getargs_H(USHRT_MAX))
self.assertEqual(0, getargs_H(USHRT_MAX+1))
self.assertEqual(42, getargs_H(42))
self.assertEqual(VERY_LARGE & USHRT_MAX, getargs_H(VERY_LARGE))
def test_I(self):
from _testcapi import getargs_I
# I returns 'unsigned int', no range checking
self.assertRaises(TypeError, getargs_I, 3.14)
self.assertEqual(99, getargs_I(Int()))
self.assertEqual(0, getargs_I(IntSubclass()))
self.assertRaises(TypeError, getargs_I, BadInt())
with self.assertWarns(DeprecationWarning):
self.assertEqual(1, getargs_I(BadInt2()))
self.assertEqual(0, getargs_I(BadInt3()))
self.assertEqual(UINT_MAX, getargs_I(-1))
self.assertEqual(0, getargs_I(0))
self.assertEqual(UINT_MAX, getargs_I(UINT_MAX))
self.assertEqual(0, getargs_I(UINT_MAX+1))
self.assertEqual(42, getargs_I(42))
self.assertEqual(VERY_LARGE & UINT_MAX, getargs_I(VERY_LARGE))
def test_k(self):
from _testcapi import getargs_k
# k returns 'unsigned long', no range checking
# it does not accept float, or instances with __int__
self.assertRaises(TypeError, getargs_k, 3.14)
self.assertRaises(TypeError, getargs_k, Int())
self.assertEqual(0, getargs_k(IntSubclass()))
self.assertRaises(TypeError, getargs_k, BadInt())
self.assertRaises(TypeError, getargs_k, BadInt2())
self.assertEqual(0, getargs_k(BadInt3()))
self.assertEqual(ULONG_MAX, getargs_k(-1))
self.assertEqual(0, getargs_k(0))
self.assertEqual(ULONG_MAX, getargs_k(ULONG_MAX))
self.assertEqual(0, getargs_k(ULONG_MAX+1))
self.assertEqual(42, getargs_k(42))
self.assertEqual(VERY_LARGE & ULONG_MAX, getargs_k(VERY_LARGE))
class Signed_TestCase(unittest.TestCase):
def test_h(self):
from _testcapi import getargs_h
# h returns 'short', and does range checking (SHRT_MIN ... SHRT_MAX)
self.assertRaises(TypeError, getargs_h, 3.14)
self.assertEqual(99, getargs_h(Int()))
self.assertEqual(0, getargs_h(IntSubclass()))
self.assertRaises(TypeError, getargs_h, BadInt())
with self.assertWarns(DeprecationWarning):
self.assertEqual(1, getargs_h(BadInt2()))
self.assertEqual(0, getargs_h(BadInt3()))
self.assertRaises(OverflowError, getargs_h, SHRT_MIN-1)
self.assertEqual(SHRT_MIN, getargs_h(SHRT_MIN))
self.assertEqual(SHRT_MAX, getargs_h(SHRT_MAX))
self.assertRaises(OverflowError, getargs_h, SHRT_MAX+1)
self.assertEqual(42, getargs_h(42))
self.assertRaises(OverflowError, getargs_h, VERY_LARGE)
def test_i(self):
from _testcapi import getargs_i
# i returns 'int', and does range checking (INT_MIN ... INT_MAX)
self.assertRaises(TypeError, getargs_i, 3.14)
self.assertEqual(99, getargs_i(Int()))
self.assertEqual(0, getargs_i(IntSubclass()))
self.assertRaises(TypeError, getargs_i, BadInt())
with self.assertWarns(DeprecationWarning):
self.assertEqual(1, getargs_i(BadInt2()))
self.assertEqual(0, getargs_i(BadInt3()))
self.assertRaises(OverflowError, getargs_i, INT_MIN-1)
self.assertEqual(INT_MIN, getargs_i(INT_MIN))
self.assertEqual(INT_MAX, getargs_i(INT_MAX))
self.assertRaises(OverflowError, getargs_i, INT_MAX+1)
self.assertEqual(42, getargs_i(42))
self.assertRaises(OverflowError, getargs_i, VERY_LARGE)
def test_l(self):
from _testcapi import getargs_l
# l returns 'long', and does range checking (LONG_MIN ... LONG_MAX)
self.assertRaises(TypeError, getargs_l, 3.14)
self.assertEqual(99, getargs_l(Int()))
self.assertEqual(0, getargs_l(IntSubclass()))
self.assertRaises(TypeError, getargs_l, BadInt())
with self.assertWarns(DeprecationWarning):
self.assertEqual(1, getargs_l(BadInt2()))
self.assertEqual(0, getargs_l(BadInt3()))
self.assertRaises(OverflowError, getargs_l, LONG_MIN-1)
self.assertEqual(LONG_MIN, getargs_l(LONG_MIN))
self.assertEqual(LONG_MAX, getargs_l(LONG_MAX))
self.assertRaises(OverflowError, getargs_l, LONG_MAX+1)
self.assertEqual(42, getargs_l(42))
self.assertRaises(OverflowError, getargs_l, VERY_LARGE)
def test_n(self):
from _testcapi import getargs_n
# n returns 'Py_ssize_t', and does range checking
# (PY_SSIZE_T_MIN ... PY_SSIZE_T_MAX)
self.assertRaises(TypeError, getargs_n, 3.14)
self.assertRaises(TypeError, getargs_n, Int())
self.assertEqual(0, getargs_n(IntSubclass()))
self.assertRaises(TypeError, getargs_n, BadInt())
self.assertRaises(TypeError, getargs_n, BadInt2())
self.assertEqual(0, getargs_n(BadInt3()))
self.assertRaises(OverflowError, getargs_n, PY_SSIZE_T_MIN-1)
self.assertEqual(PY_SSIZE_T_MIN, getargs_n(PY_SSIZE_T_MIN))
self.assertEqual(PY_SSIZE_T_MAX, getargs_n(PY_SSIZE_T_MAX))
self.assertRaises(OverflowError, getargs_n, PY_SSIZE_T_MAX+1)
self.assertEqual(42, getargs_n(42))
self.assertRaises(OverflowError, getargs_n, VERY_LARGE)
class LongLong_TestCase(unittest.TestCase):
def test_L(self):
from _testcapi import getargs_L
# L returns 'long long', and does range checking (LLONG_MIN
# ... LLONG_MAX)
self.assertRaises(TypeError, getargs_L, 3.14)
self.assertRaises(TypeError, getargs_L, "Hello")
self.assertEqual(99, getargs_L(Int()))
self.assertEqual(0, getargs_L(IntSubclass()))
self.assertRaises(TypeError, getargs_L, BadInt())
with self.assertWarns(DeprecationWarning):
self.assertEqual(1, getargs_L(BadInt2()))
self.assertEqual(0, getargs_L(BadInt3()))
self.assertRaises(OverflowError, getargs_L, LLONG_MIN-1)
self.assertEqual(LLONG_MIN, getargs_L(LLONG_MIN))
self.assertEqual(LLONG_MAX, getargs_L(LLONG_MAX))
self.assertRaises(OverflowError, getargs_L, LLONG_MAX+1)
self.assertEqual(42, getargs_L(42))
self.assertRaises(OverflowError, getargs_L, VERY_LARGE)
def test_K(self):
from _testcapi import getargs_K
# K return 'unsigned long long', no range checking
self.assertRaises(TypeError, getargs_K, 3.14)
self.assertRaises(TypeError, getargs_K, Int())
self.assertEqual(0, getargs_K(IntSubclass()))
self.assertRaises(TypeError, getargs_K, BadInt())
self.assertRaises(TypeError, getargs_K, BadInt2())
self.assertEqual(0, getargs_K(BadInt3()))
self.assertEqual(ULLONG_MAX, getargs_K(ULLONG_MAX))
self.assertEqual(0, getargs_K(0))
self.assertEqual(0, getargs_K(ULLONG_MAX+1))
self.assertEqual(42, getargs_K(42))
self.assertEqual(VERY_LARGE & ULLONG_MAX, getargs_K(VERY_LARGE))
class Float_TestCase(unittest.TestCase):
def assertEqualWithSign(self, actual, expected):
self.assertEqual(actual, expected)
self.assertEqual(math.copysign(1, actual), math.copysign(1, expected))
def test_f(self):
from _testcapi import getargs_f
self.assertEqual(getargs_f(4.25), 4.25)
self.assertEqual(getargs_f(4), 4.0)
self.assertRaises(TypeError, getargs_f, 4.25+0j)
self.assertEqual(getargs_f(Float()), 4.25)
self.assertEqual(getargs_f(FloatSubclass(7.5)), 7.5)
self.assertEqual(getargs_f(FloatSubclass2(7.5)), 7.5)
self.assertRaises(TypeError, getargs_f, BadFloat())
with self.assertWarns(DeprecationWarning):
self.assertEqual(getargs_f(BadFloat2()), 4.25)
self.assertEqual(getargs_f(BadFloat3(7.5)), 7.5)
for x in (FLT_MIN, -FLT_MIN, FLT_MAX, -FLT_MAX, INF, -INF):
self.assertEqual(getargs_f(x), x)
if FLT_MAX < DBL_MAX:
self.assertEqual(getargs_f(DBL_MAX), INF)
self.assertEqual(getargs_f(-DBL_MAX), -INF)
if FLT_MIN > DBL_MIN:
self.assertEqualWithSign(getargs_f(DBL_MIN), 0.0)
self.assertEqualWithSign(getargs_f(-DBL_MIN), -0.0)
self.assertEqualWithSign(getargs_f(0.0), 0.0)
self.assertEqualWithSign(getargs_f(-0.0), -0.0)
r = getargs_f(NAN)
self.assertNotEqual(r, r)
@support.requires_IEEE_754
def test_f_rounding(self):
from _testcapi import getargs_f
self.assertEqual(getargs_f(3.40282356e38), FLT_MAX)
self.assertEqual(getargs_f(-3.40282356e38), -FLT_MAX)
def test_d(self):
from _testcapi import getargs_d
self.assertEqual(getargs_d(4.25), 4.25)
self.assertEqual(getargs_d(4), 4.0)
self.assertRaises(TypeError, getargs_d, 4.25+0j)
self.assertEqual(getargs_d(Float()), 4.25)
self.assertEqual(getargs_d(FloatSubclass(7.5)), 7.5)
self.assertEqual(getargs_d(FloatSubclass2(7.5)), 7.5)
self.assertRaises(TypeError, getargs_d, BadFloat())
with self.assertWarns(DeprecationWarning):
self.assertEqual(getargs_d(BadFloat2()), 4.25)
self.assertEqual(getargs_d(BadFloat3(7.5)), 7.5)
for x in (DBL_MIN, -DBL_MIN, DBL_MAX, -DBL_MAX, INF, -INF):
self.assertEqual(getargs_d(x), x)
self.assertRaises(OverflowError, getargs_d, 1<<DBL_MAX_EXP)
self.assertRaises(OverflowError, getargs_d, -1<<DBL_MAX_EXP)
self.assertEqualWithSign(getargs_d(0.0), 0.0)
self.assertEqualWithSign(getargs_d(-0.0), -0.0)
r = getargs_d(NAN)
self.assertNotEqual(r, r)
def test_D(self):
from _testcapi import getargs_D
self.assertEqual(getargs_D(4.25+0.5j), 4.25+0.5j)
self.assertEqual(getargs_D(4.25), 4.25+0j)
self.assertEqual(getargs_D(4), 4.0+0j)
self.assertEqual(getargs_D(Complex()), 4.25+0.5j)
self.assertEqual(getargs_D(ComplexSubclass(7.5+0.25j)), 7.5+0.25j)
self.assertEqual(getargs_D(ComplexSubclass2(7.5+0.25j)), 7.5+0.25j)
self.assertRaises(TypeError, getargs_D, BadComplex())
self.assertEqual(getargs_D(BadComplex2()), 4.25+0.5j)
self.assertEqual(getargs_D(BadComplex3(7.5+0.25j)), 7.5+0.25j)
for x in (DBL_MIN, -DBL_MIN, DBL_MAX, -DBL_MAX, INF, -INF):
c = complex(x, 1.0)
self.assertEqual(getargs_D(c), c)
c = complex(1.0, x)
self.assertEqual(getargs_D(c), c)
self.assertEqualWithSign(getargs_D(complex(0.0, 1.0)).real, 0.0)
self.assertEqualWithSign(getargs_D(complex(-0.0, 1.0)).real, -0.0)
self.assertEqualWithSign(getargs_D(complex(1.0, 0.0)).imag, 0.0)
self.assertEqualWithSign(getargs_D(complex(1.0, -0.0)).imag, -0.0)
class Paradox:
"This statement is false."
def __bool__(self):
raise NotImplementedError
class Boolean_TestCase(unittest.TestCase):
def test_p(self):
from _testcapi import getargs_p
self.assertEqual(0, getargs_p(False))
self.assertEqual(0, getargs_p(None))
self.assertEqual(0, getargs_p(0))
self.assertEqual(0, getargs_p(0.0))
self.assertEqual(0, getargs_p(0j))
self.assertEqual(0, getargs_p(''))
self.assertEqual(0, getargs_p(()))
self.assertEqual(0, getargs_p([]))
self.assertEqual(0, getargs_p({}))
self.assertEqual(1, getargs_p(True))
self.assertEqual(1, getargs_p(1))
self.assertEqual(1, getargs_p(1.0))
self.assertEqual(1, getargs_p(1j))
self.assertEqual(1, getargs_p('x'))
self.assertEqual(1, getargs_p((1,)))
self.assertEqual(1, getargs_p([1]))
self.assertEqual(1, getargs_p({1:2}))
self.assertEqual(1, getargs_p(unittest.TestCase))
self.assertRaises(NotImplementedError, getargs_p, Paradox())
class Tuple_TestCase(unittest.TestCase):
def test_args(self):
from _testcapi import get_args
ret = get_args(1, 2)
self.assertEqual(ret, (1, 2))
self.assertIs(type(ret), tuple)
ret = get_args(1, *(2, 3))
self.assertEqual(ret, (1, 2, 3))
self.assertIs(type(ret), tuple)
ret = get_args(*[1, 2])
self.assertEqual(ret, (1, 2))
self.assertIs(type(ret), tuple)
ret = get_args(*TupleSubclass([1, 2]))
self.assertEqual(ret, (1, 2))
self.assertIs(type(ret), tuple)
ret = get_args()
self.assertIn(ret, ((), None))
self.assertIn(type(ret), (tuple, type(None)))
ret = get_args(*())
self.assertIn(ret, ((), None))
self.assertIn(type(ret), (tuple, type(None)))
def test_tuple(self):
from _testcapi import getargs_tuple
ret = getargs_tuple(1, (2, 3))
self.assertEqual(ret, (1,2,3))
# make sure invalid tuple arguments are handled correctly
class seq:
def __len__(self):
return 2
def __getitem__(self, n):
raise ValueError
self.assertRaises(TypeError, getargs_tuple, 1, seq())
class Keywords_TestCase(unittest.TestCase):
def test_kwargs(self):
from _testcapi import get_kwargs
ret = get_kwargs(a=1, b=2)
self.assertEqual(ret, {'a': 1, 'b': 2})
self.assertIs(type(ret), dict)
ret = get_kwargs(a=1, **{'b': 2, 'c': 3})
self.assertEqual(ret, {'a': 1, 'b': 2, 'c': 3})
self.assertIs(type(ret), dict)
ret = get_kwargs(**DictSubclass({'a': 1, 'b': 2}))
self.assertEqual(ret, {'a': 1, 'b': 2})
self.assertIs(type(ret), dict)
ret = get_kwargs()
self.assertIn(ret, ({}, None))
self.assertIn(type(ret), (dict, type(None)))
ret = get_kwargs(**{})
self.assertIn(ret, ({}, None))
self.assertIn(type(ret), (dict, type(None)))
def test_positional_args(self):
# using all positional args
self.assertEqual(
getargs_keywords((1,2), 3, (4,(5,6)), (7,8,9), 10),
(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
)
def test_mixed_args(self):
# positional and keyword args
self.assertEqual(
getargs_keywords((1,2), 3, (4,(5,6)), arg4=(7,8,9), arg5=10),
(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
)
def test_keyword_args(self):
# all keywords
self.assertEqual(
getargs_keywords(arg1=(1,2), arg2=3, arg3=(4,(5,6)), arg4=(7,8,9), arg5=10),
(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
)
def test_optional_args(self):
# missing optional keyword args, skipping tuples
self.assertEqual(
getargs_keywords(arg1=(1,2), arg2=3, arg5=10),
(1, 2, 3, -1, -1, -1, -1, -1, -1, 10)
)
def test_required_args(self):
# required arg missing
try:
getargs_keywords(arg1=(1,2))
except TypeError as err:
self.assertEqual(str(err), "Required argument 'arg2' (pos 2) not found")
else:
self.fail('TypeError should have been raised')
def test_too_many_args(self):
try:
getargs_keywords((1,2),3,(4,(5,6)),(7,8,9),10,111)
except TypeError as err:
self.assertEqual(str(err), "function takes at most 5 arguments (6 given)")
else:
self.fail('TypeError should have been raised')
def test_invalid_keyword(self):
# extraneous keyword arg
try:
getargs_keywords((1,2),3,arg5=10,arg666=666)
except TypeError as err:
self.assertEqual(str(err), "'arg666' is an invalid keyword argument for this function")
else:
self.fail('TypeError should have been raised')
def test_surrogate_keyword(self):
try:
getargs_keywords((1,2), 3, (4,(5,6)), (7,8,9), **{'\uDC80': 10})
except TypeError as err:
self.assertEqual(str(err), "'\udc80' is an invalid keyword argument for this function")
else:
self.fail('TypeError should have been raised')
class KeywordOnly_TestCase(unittest.TestCase):
def test_positional_args(self):
# using all possible positional args
self.assertEqual(
getargs_keyword_only(1, 2),
(1, 2, -1)
)
def test_mixed_args(self):
# positional and keyword args
self.assertEqual(
getargs_keyword_only(1, 2, keyword_only=3),
(1, 2, 3)
)
def test_keyword_args(self):
# all keywords
self.assertEqual(
getargs_keyword_only(required=1, optional=2, keyword_only=3),
(1, 2, 3)
)
def test_optional_args(self):
# missing optional keyword args, skipping tuples
self.assertEqual(
getargs_keyword_only(required=1, optional=2),
(1, 2, -1)
)
self.assertEqual(
getargs_keyword_only(required=1, keyword_only=3),
(1, -1, 3)
)
def test_required_args(self):
self.assertEqual(
getargs_keyword_only(1),
(1, -1, -1)
)
self.assertEqual(
getargs_keyword_only(required=1),
(1, -1, -1)
)
# required arg missing
with self.assertRaisesRegex(TypeError,
r"Required argument 'required' \(pos 1\) not found"):
getargs_keyword_only(optional=2)
with self.assertRaisesRegex(TypeError,
r"Required argument 'required' \(pos 1\) not found"):
getargs_keyword_only(keyword_only=3)
def test_too_many_args(self):
with self.assertRaisesRegex(TypeError,
r"Function takes at most 2 positional arguments \(3 given\)"):
getargs_keyword_only(1, 2, 3)
with self.assertRaisesRegex(TypeError,
r"function takes at most 3 arguments \(4 given\)"):
getargs_keyword_only(1, 2, 3, keyword_only=5)
def test_invalid_keyword(self):
# extraneous keyword arg
with self.assertRaisesRegex(TypeError,
"'monster' is an invalid keyword argument for this function"):
getargs_keyword_only(1, 2, monster=666)
def test_surrogate_keyword(self):
with self.assertRaisesRegex(TypeError,
"'\udc80' is an invalid keyword argument for this function"):
getargs_keyword_only(1, 2, **{'\uDC80': 10})
class PositionalOnlyAndKeywords_TestCase(unittest.TestCase):
from _testcapi import getargs_positional_only_and_keywords as getargs
def test_positional_args(self):
# using all possible positional args
self.assertEqual(self.getargs(1, 2, 3), (1, 2, 3))
def test_mixed_args(self):
# positional and keyword args
self.assertEqual(self.getargs(1, 2, keyword=3), (1, 2, 3))
def test_optional_args(self):
# missing optional args
self.assertEqual(self.getargs(1, 2), (1, 2, -1))
self.assertEqual(self.getargs(1, keyword=3), (1, -1, 3))
def test_required_args(self):
self.assertEqual(self.getargs(1), (1, -1, -1))
# required positional arg missing
with self.assertRaisesRegex(TypeError,
r"Function takes at least 1 positional arguments \(0 given\)"):
self.getargs()
with self.assertRaisesRegex(TypeError,
r"Function takes at least 1 positional arguments \(0 given\)"):
self.getargs(keyword=3)
def test_empty_keyword(self):
with self.assertRaisesRegex(TypeError,
"'' is an invalid keyword argument for this function"):
self.getargs(1, 2, **{'': 666})
class Bytes_TestCase(unittest.TestCase):
def test_c(self):
from _testcapi import getargs_c
self.assertRaises(TypeError, getargs_c, b'abc') # len > 1
self.assertEqual(getargs_c(b'a'), 97)
self.assertEqual(getargs_c(bytearray(b'a')), 97)
self.assertRaises(TypeError, getargs_c, memoryview(b'a'))
self.assertRaises(TypeError, getargs_c, 's')
self.assertRaises(TypeError, getargs_c, 97)
self.assertRaises(TypeError, getargs_c, None)
def test_y(self):
from _testcapi import getargs_y
self.assertRaises(TypeError, getargs_y, 'abc\xe9')
self.assertEqual(getargs_y(b'bytes'), b'bytes')
self.assertRaises(ValueError, getargs_y, b'nul:\0')
self.assertRaises(TypeError, getargs_y, bytearray(b'bytearray'))
self.assertRaises(TypeError, getargs_y, memoryview(b'memoryview'))
self.assertRaises(TypeError, getargs_y, None)
def test_y_star(self):
from _testcapi import getargs_y_star
self.assertRaises(TypeError, getargs_y_star, 'abc\xe9')
self.assertEqual(getargs_y_star(b'bytes'), b'bytes')
self.assertEqual(getargs_y_star(b'nul:\0'), b'nul:\0')
self.assertEqual(getargs_y_star(bytearray(b'bytearray')), b'bytearray')
self.assertEqual(getargs_y_star(memoryview(b'memoryview')), b'memoryview')
self.assertRaises(TypeError, getargs_y_star, None)
def test_y_hash(self):
from _testcapi import getargs_y_hash
self.assertRaises(TypeError, getargs_y_hash, 'abc\xe9')
self.assertEqual(getargs_y_hash(b'bytes'), b'bytes')
self.assertEqual(getargs_y_hash(b'nul:\0'), b'nul:\0')
self.assertRaises(TypeError, getargs_y_hash, bytearray(b'bytearray'))
self.assertRaises(TypeError, getargs_y_hash, memoryview(b'memoryview'))
self.assertRaises(TypeError, getargs_y_hash, None)
def test_w_star(self):
# getargs_w_star() modifies first and last byte
from _testcapi import getargs_w_star
self.assertRaises(TypeError, getargs_w_star, 'abc\xe9')
self.assertRaises(TypeError, getargs_w_star, b'bytes')
self.assertRaises(TypeError, getargs_w_star, b'nul:\0')
self.assertRaises(TypeError, getargs_w_star, memoryview(b'bytes'))
buf = bytearray(b'bytearray')
self.assertEqual(getargs_w_star(buf), b'[ytearra]')
self.assertEqual(buf, bytearray(b'[ytearra]'))
buf = bytearray(b'memoryview')
self.assertEqual(getargs_w_star(memoryview(buf)), b'[emoryvie]')
self.assertEqual(buf, bytearray(b'[emoryvie]'))
self.assertRaises(TypeError, getargs_w_star, None)
class String_TestCase(unittest.TestCase):
def test_C(self):
from _testcapi import getargs_C
self.assertRaises(TypeError, getargs_C, 'abc') # len > 1
self.assertEqual(getargs_C('a'), 97)
self.assertEqual(getargs_C('\u20ac'), 0x20ac)
self.assertEqual(getargs_C('\U0001f40d'), 0x1f40d)
self.assertRaises(TypeError, getargs_C, b'a')
self.assertRaises(TypeError, getargs_C, bytearray(b'a'))
self.assertRaises(TypeError, getargs_C, memoryview(b'a'))
self.assertRaises(TypeError, getargs_C, 97)
self.assertRaises(TypeError, getargs_C, None)
def test_s(self):
from _testcapi import getargs_s
self.assertEqual(getargs_s('abc\xe9'), b'abc\xc3\xa9')
self.assertRaises(ValueError, getargs_s, 'nul:\0')
self.assertRaises(TypeError, getargs_s, b'bytes')
self.assertRaises(TypeError, getargs_s, bytearray(b'bytearray'))
self.assertRaises(TypeError, getargs_s, memoryview(b'memoryview'))
self.assertRaises(TypeError, getargs_s, None)
def test_s_star(self):
from _testcapi import getargs_s_star
self.assertEqual(getargs_s_star('abc\xe9'), b'abc\xc3\xa9')
self.assertEqual(getargs_s_star('nul:\0'), b'nul:\0')
self.assertEqual(getargs_s_star(b'bytes'), b'bytes')
self.assertEqual(getargs_s_star(bytearray(b'bytearray')), b'bytearray')
self.assertEqual(getargs_s_star(memoryview(b'memoryview')), b'memoryview')
self.assertRaises(TypeError, getargs_s_star, None)
def test_s_hash(self):
from _testcapi import getargs_s_hash
self.assertEqual(getargs_s_hash('abc\xe9'), b'abc\xc3\xa9')
self.assertEqual(getargs_s_hash('nul:\0'), b'nul:\0')
self.assertEqual(getargs_s_hash(b'bytes'), b'bytes')
self.assertRaises(TypeError, getargs_s_hash, bytearray(b'bytearray'))
self.assertRaises(TypeError, getargs_s_hash, memoryview(b'memoryview'))
self.assertRaises(TypeError, getargs_s_hash, None)
def test_z(self):
from _testcapi import getargs_z
self.assertEqual(getargs_z('abc\xe9'), b'abc\xc3\xa9')
self.assertRaises(ValueError, getargs_z, 'nul:\0')
self.assertRaises(TypeError, getargs_z, b'bytes')
self.assertRaises(TypeError, getargs_z, bytearray(b'bytearray'))
self.assertRaises(TypeError, getargs_z, memoryview(b'memoryview'))
self.assertIsNone(getargs_z(None))
def test_z_star(self):
from _testcapi import getargs_z_star
self.assertEqual(getargs_z_star('abc\xe9'), b'abc\xc3\xa9')
self.assertEqual(getargs_z_star('nul:\0'), b'nul:\0')
self.assertEqual(getargs_z_star(b'bytes'), b'bytes')
self.assertEqual(getargs_z_star(bytearray(b'bytearray')), b'bytearray')
self.assertEqual(getargs_z_star(memoryview(b'memoryview')), b'memoryview')
self.assertIsNone(getargs_z_star(None))
def test_z_hash(self):
from _testcapi import getargs_z_hash
self.assertEqual(getargs_z_hash('abc\xe9'), b'abc\xc3\xa9')
self.assertEqual(getargs_z_hash('nul:\0'), b'nul:\0')
self.assertEqual(getargs_z_hash(b'bytes'), b'bytes')
self.assertRaises(TypeError, getargs_z_hash, bytearray(b'bytearray'))
self.assertRaises(TypeError, getargs_z_hash, memoryview(b'memoryview'))
self.assertIsNone(getargs_z_hash(None))
def test_es(self):
from _testcapi import getargs_es
self.assertEqual(getargs_es('abc\xe9'), b'abc\xc3\xa9')
self.assertEqual(getargs_es('abc\xe9', 'latin1'), b'abc\xe9')
self.assertRaises(UnicodeEncodeError, getargs_es, 'abc\xe9', 'ascii')
self.assertRaises(LookupError, getargs_es, 'abc\xe9', 'spam')
self.assertRaises(TypeError, getargs_es, b'bytes', 'latin1')
self.assertRaises(TypeError, getargs_es, bytearray(b'bytearray'), 'latin1')
self.assertRaises(TypeError, getargs_es, memoryview(b'memoryview'), 'latin1')
self.assertRaises(TypeError, getargs_es, None, 'latin1')
self.assertRaises(TypeError, getargs_es, 'nul:\0', 'latin1')
def test_et(self):
from _testcapi import getargs_et
self.assertEqual(getargs_et('abc\xe9'), b'abc\xc3\xa9')
self.assertEqual(getargs_et('abc\xe9', 'latin1'), b'abc\xe9')
self.assertRaises(UnicodeEncodeError, getargs_et, 'abc\xe9', 'ascii')
self.assertRaises(LookupError, getargs_et, 'abc\xe9', 'spam')
self.assertEqual(getargs_et(b'bytes', 'latin1'), b'bytes')
self.assertEqual(getargs_et(bytearray(b'bytearray'), 'latin1'), b'bytearray')
self.assertRaises(TypeError, getargs_et, memoryview(b'memoryview'), 'latin1')
self.assertRaises(TypeError, getargs_et, None, 'latin1')
self.assertRaises(TypeError, getargs_et, 'nul:\0', 'latin1')
self.assertRaises(TypeError, getargs_et, b'nul:\0', 'latin1')
self.assertRaises(TypeError, getargs_et, bytearray(b'nul:\0'), 'latin1')
def test_es_hash(self):
from _testcapi import getargs_es_hash
self.assertEqual(getargs_es_hash('abc\xe9'), b'abc\xc3\xa9')
self.assertEqual(getargs_es_hash('abc\xe9', 'latin1'), b'abc\xe9')
self.assertRaises(UnicodeEncodeError, getargs_es_hash, 'abc\xe9', 'ascii')
self.assertRaises(LookupError, getargs_es_hash, 'abc\xe9', 'spam')
self.assertRaises(TypeError, getargs_es_hash, b'bytes', 'latin1')
self.assertRaises(TypeError, getargs_es_hash, bytearray(b'bytearray'), 'latin1')
self.assertRaises(TypeError, getargs_es_hash, memoryview(b'memoryview'), 'latin1')
self.assertRaises(TypeError, getargs_es_hash, None, 'latin1')
self.assertEqual(getargs_es_hash('nul:\0', 'latin1'), b'nul:\0')
buf = bytearray(b'x'*8)
self.assertEqual(getargs_es_hash('abc\xe9', 'latin1', buf), b'abc\xe9')
self.assertEqual(buf, bytearray(b'abc\xe9\x00xxx'))
buf = bytearray(b'x'*5)
self.assertEqual(getargs_es_hash('abc\xe9', 'latin1', buf), b'abc\xe9')
self.assertEqual(buf, bytearray(b'abc\xe9\x00'))
buf = bytearray(b'x'*4)
self.assertRaises(ValueError, getargs_es_hash, 'abc\xe9', 'latin1', buf)
self.assertEqual(buf, bytearray(b'x'*4))
buf = bytearray()
self.assertRaises(ValueError, getargs_es_hash, 'abc\xe9', 'latin1', buf)
def test_et_hash(self):
from _testcapi import getargs_et_hash
self.assertEqual(getargs_et_hash('abc\xe9'), b'abc\xc3\xa9')
self.assertEqual(getargs_et_hash('abc\xe9', 'latin1'), b'abc\xe9')
self.assertRaises(UnicodeEncodeError, getargs_et_hash, 'abc\xe9', 'ascii')
self.assertRaises(LookupError, getargs_et_hash, 'abc\xe9', 'spam')
self.assertEqual(getargs_et_hash(b'bytes', 'latin1'), b'bytes')
self.assertEqual(getargs_et_hash(bytearray(b'bytearray'), 'latin1'), b'bytearray')
self.assertRaises(TypeError, getargs_et_hash, memoryview(b'memoryview'), 'latin1')
self.assertRaises(TypeError, getargs_et_hash, None, 'latin1')
self.assertEqual(getargs_et_hash('nul:\0', 'latin1'), b'nul:\0')
self.assertEqual(getargs_et_hash(b'nul:\0', 'latin1'), b'nul:\0')
self.assertEqual(getargs_et_hash(bytearray(b'nul:\0'), 'latin1'), b'nul:\0')
buf = bytearray(b'x'*8)
self.assertEqual(getargs_et_hash('abc\xe9', 'latin1', buf), b'abc\xe9')
self.assertEqual(buf, bytearray(b'abc\xe9\x00xxx'))
buf = bytearray(b'x'*5)
self.assertEqual(getargs_et_hash('abc\xe9', 'latin1', buf), b'abc\xe9')
self.assertEqual(buf, bytearray(b'abc\xe9\x00'))
buf = bytearray(b'x'*4)
self.assertRaises(ValueError, getargs_et_hash, 'abc\xe9', 'latin1', buf)
self.assertEqual(buf, bytearray(b'x'*4))
buf = bytearray()
self.assertRaises(ValueError, getargs_et_hash, 'abc\xe9', 'latin1', buf)
def test_u(self):
from _testcapi import getargs_u
self.assertEqual(getargs_u('abc\xe9'), 'abc\xe9')
self.assertRaises(ValueError, getargs_u, 'nul:\0')
self.assertRaises(TypeError, getargs_u, b'bytes')
self.assertRaises(TypeError, getargs_u, bytearray(b'bytearray'))
self.assertRaises(TypeError, getargs_u, memoryview(b'memoryview'))
self.assertRaises(TypeError, getargs_u, None)
def test_u_hash(self):
from _testcapi import getargs_u_hash
self.assertEqual(getargs_u_hash('abc\xe9'), 'abc\xe9')
self.assertEqual(getargs_u_hash('nul:\0'), 'nul:\0')
self.assertRaises(TypeError, getargs_u_hash, b'bytes')
self.assertRaises(TypeError, getargs_u_hash, bytearray(b'bytearray'))
self.assertRaises(TypeError, getargs_u_hash, memoryview(b'memoryview'))
self.assertRaises(TypeError, getargs_u_hash, None)
def test_Z(self):
from _testcapi import getargs_Z
self.assertEqual(getargs_Z('abc\xe9'), 'abc\xe9')
self.assertRaises(ValueError, getargs_Z, 'nul:\0')
self.assertRaises(TypeError, getargs_Z, b'bytes')
self.assertRaises(TypeError, getargs_Z, bytearray(b'bytearray'))
self.assertRaises(TypeError, getargs_Z, memoryview(b'memoryview'))
self.assertIsNone(getargs_Z(None))
def test_Z_hash(self):
from _testcapi import getargs_Z_hash
self.assertEqual(getargs_Z_hash('abc\xe9'), 'abc\xe9')
self.assertEqual(getargs_Z_hash('nul:\0'), 'nul:\0')
self.assertRaises(TypeError, getargs_Z_hash, b'bytes')
self.assertRaises(TypeError, getargs_Z_hash, bytearray(b'bytearray'))
self.assertRaises(TypeError, getargs_Z_hash, memoryview(b'memoryview'))
self.assertIsNone(getargs_Z_hash(None))
class Object_TestCase(unittest.TestCase):
def test_S(self):
from _testcapi import getargs_S
obj = b'bytes'
self.assertIs(getargs_S(obj), obj)
self.assertRaises(TypeError, getargs_S, bytearray(b'bytearray'))
self.assertRaises(TypeError, getargs_S, 'str')
self.assertRaises(TypeError, getargs_S, None)
self.assertRaises(TypeError, getargs_S, memoryview(obj))
def test_Y(self):
from _testcapi import getargs_Y
obj = bytearray(b'bytearray')
self.assertIs(getargs_Y(obj), obj)
self.assertRaises(TypeError, getargs_Y, b'bytes')
self.assertRaises(TypeError, getargs_Y, 'str')
self.assertRaises(TypeError, getargs_Y, None)
self.assertRaises(TypeError, getargs_Y, memoryview(obj))
def test_U(self):
from _testcapi import getargs_U
obj = 'str'
self.assertIs(getargs_U(obj), obj)
self.assertRaises(TypeError, getargs_U, b'bytes')
self.assertRaises(TypeError, getargs_U, bytearray(b'bytearray'))
self.assertRaises(TypeError, getargs_U, None)
# Bug #6012
class Test6012(unittest.TestCase):
def test(self):
self.assertEqual(_testcapi.argparsing("Hello", "World"), 1)
class SkipitemTest(unittest.TestCase):
def test_skipitem(self):
"""
If this test failed, you probably added a new "format unit"
in Python/getargs.c, but neglected to update our poor friend
skipitem() in the same file. (If so, shame on you!)
With a few exceptions**, this function brute-force tests all
printable ASCII*** characters (32 to 126 inclusive) as format units,
checking to see that PyArg_ParseTupleAndKeywords() return consistent
errors both when the unit is attempted to be used and when it is
skipped. If the format unit doesn't exist, we'll get one of two
specific error messages (one for used, one for skipped); if it does
exist we *won't* get that error--we'll get either no error or some
other error. If we get the specific "does not exist" error for one
test and not for the other, there's a mismatch, and the test fails.
** Some format units have special funny semantics and it would
be difficult to accommodate them here. Since these are all
well-established and properly skipped in skipitem() we can
get away with not testing them--this test is really intended
to catch *new* format units.
*** Python C source files must be ASCII. Therefore it's impossible
to have non-ASCII format units.
"""
empty_tuple = ()
tuple_1 = (0,)
dict_b = {'b':1}
keywords = ["a", "b"]
for i in range(32, 127):
c = chr(i)
# skip parentheses, the error reporting is inconsistent about them
# skip 'e', it's always a two-character code
# skip '|' and '$', they don't represent arguments anyway
if c in '()e|$':
continue
# test the format unit when not skipped
format = c + "i"
try:
_testcapi.parse_tuple_and_keywords(tuple_1, dict_b,
format, keywords)
when_not_skipped = False
except SystemError as e:
s = "argument 1 (impossible<bad format char>)"
when_not_skipped = (str(e) == s)
except TypeError:
when_not_skipped = False
# test the format unit when skipped
optional_format = "|" + format
try:
_testcapi.parse_tuple_and_keywords(empty_tuple, dict_b,
optional_format, keywords)
when_skipped = False
except SystemError as e:
s = "impossible<bad format char>: '{}'".format(format)
when_skipped = (str(e) == s)
message = ("test_skipitem_parity: "
"detected mismatch between convertsimple and skipitem "
"for format unit '{}' ({}), not skipped {}, skipped {}".format(
c, i, when_skipped, when_not_skipped))
self.assertIs(when_skipped, when_not_skipped, message)
def test_skipitem_with_suffix(self):
parse = _testcapi.parse_tuple_and_keywords
empty_tuple = ()
tuple_1 = (0,)
dict_b = {'b':1}
keywords = ["a", "b"]
supported = ('s#', 's*', 'z#', 'z*', 'u#', 'Z#', 'y#', 'y*', 'w#', 'w*')
for c in string.ascii_letters:
for c2 in '#*':
f = c + c2
with self.subTest(format=f):
optional_format = "|" + f + "i"
if f in supported:
parse(empty_tuple, dict_b, optional_format, keywords)
else:
with self.assertRaisesRegex(SystemError,
'impossible<bad format char>'):
parse(empty_tuple, dict_b, optional_format, keywords)
for c in map(chr, range(32, 128)):
f = 'e' + c
optional_format = "|" + f + "i"
with self.subTest(format=f):
if c in 'st':
parse(empty_tuple, dict_b, optional_format, keywords)
else:
with self.assertRaisesRegex(SystemError,
'impossible<bad format char>'):
parse(empty_tuple, dict_b, optional_format, keywords)
class ParseTupleAndKeywords_Test(unittest.TestCase):
def test_parse_tuple_and_keywords(self):
# Test handling errors in the parse_tuple_and_keywords helper itself
self.assertRaises(TypeError, _testcapi.parse_tuple_and_keywords,
(), {}, 42, [])
self.assertRaises(ValueError, _testcapi.parse_tuple_and_keywords,
(), {}, '', 42)
self.assertRaises(ValueError, _testcapi.parse_tuple_and_keywords,
(), {}, '', [''] * 42)
self.assertRaises(ValueError, _testcapi.parse_tuple_and_keywords,
(), {}, '', [42])
def test_bad_use(self):
# Test handling invalid format and keywords in
# PyArg_ParseTupleAndKeywords()
self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
(1,), {}, '||O', ['a'])
self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
(1, 2), {}, '|O|O', ['a', 'b'])
self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
(), {'a': 1}, '$$O', ['a'])
self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
(), {'a': 1, 'b': 2}, '$O$O', ['a', 'b'])
self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
(), {'a': 1}, '$|O', ['a'])
self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
(), {'a': 1, 'b': 2}, '$O|O', ['a', 'b'])
self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
(1,), {}, '|O', ['a', 'b'])
self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
(1,), {}, '|OO', ['a'])
self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
(), {}, '|$O', [''])
self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
(), {}, '|OO', ['a', ''])
def test_positional_only(self):
parse = _testcapi.parse_tuple_and_keywords
parse((1, 2, 3), {}, 'OOO', ['', '', 'a'])
parse((1, 2), {'a': 3}, 'OOO', ['', '', 'a'])
with self.assertRaisesRegex(TypeError,
r'Function takes at least 2 positional arguments \(1 given\)'):
parse((1,), {'a': 3}, 'OOO', ['', '', 'a'])
parse((1,), {}, 'O|OO', ['', '', 'a'])
with self.assertRaisesRegex(TypeError,
r'Function takes at least 1 positional arguments \(0 given\)'):
parse((), {}, 'O|OO', ['', '', 'a'])
parse((1, 2), {'a': 3}, 'OO$O', ['', '', 'a'])
with self.assertRaisesRegex(TypeError,
r'Function takes exactly 2 positional arguments \(1 given\)'):
parse((1,), {'a': 3}, 'OO$O', ['', '', 'a'])
parse((1,), {}, 'O|O$O', ['', '', 'a'])
with self.assertRaisesRegex(TypeError,
r'Function takes at least 1 positional arguments \(0 given\)'):
parse((), {}, 'O|O$O', ['', '', 'a'])
with self.assertRaisesRegex(SystemError, r'Empty parameter name after \$'):
parse((1,), {}, 'O|$OO', ['', '', 'a'])
with self.assertRaisesRegex(SystemError, 'Empty keyword'):
parse((1,), {}, 'O|OO', ['', 'a', ''])
class Test_testcapi(unittest.TestCase):
locals().update((name, getattr(_testcapi, name))
for name in dir(_testcapi)
if name.startswith('test_') and name.endswith('_code'))
if __name__ == "__main__":
unittest.main()
| 46,503 | 1,137 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_generators.py | import copy
import gc
import pickle
import sys
import unittest
import warnings
import weakref
import inspect
import types
from test import support
try:
import _testcapi
except ImportError:
_testcapi = None
# This tests to make sure that if a SIGINT arrives just before we send into a
# yield from chain, the KeyboardInterrupt is raised in the innermost
# generator (see bpo-30039).
@unittest.skipUnless(_testcapi is not None and
hasattr(_testcapi, "raise_SIGINT_then_send_None"),
"needs _testcapi.raise_SIGINT_then_send_None")
class SignalAndYieldFromTest(unittest.TestCase):
def generator1(self):
return (yield from self.generator2())
def generator2(self):
try:
yield
except KeyboardInterrupt:
return "PASSED"
else:
return "FAILED"
def test_raise_and_yield_from(self):
gen = self.generator1()
gen.send(None)
try:
_testcapi.raise_SIGINT_then_send_None(gen)
except BaseException as _exc:
exc = _exc
self.assertIs(type(exc), StopIteration)
self.assertEqual(exc.value, "PASSED")
class FinalizationTest(unittest.TestCase):
def test_frame_resurrect(self):
# A generator frame can be resurrected by a generator's finalization.
def gen():
nonlocal frame
try:
yield
finally:
frame = sys._getframe()
g = gen()
wr = weakref.ref(g)
next(g)
del g
support.gc_collect()
self.assertIs(wr(), None)
self.assertTrue(frame)
del frame
support.gc_collect()
@unittest.skipIf(True, "TODO: find out why this fails")
def test_refcycle(self):
# A generator caught in a refcycle gets finalized anyway.
old_garbage = gc.garbage[:]
finalized = False
def gen():
nonlocal finalized
try:
g = yield
yield 1
finally:
finalized = True
g = gen()
next(g)
g.send(g)
self.assertGreater(sys.getrefcount(g), 2)
self.assertFalse(finalized)
del g
support.gc_collect()
self.assertTrue(finalized)
self.assertEqual(gc.garbage, old_garbage)
def test_lambda_generator(self):
# Issue #23192: Test that a lambda returning a generator behaves
# like the equivalent function
f = lambda: (yield 1)
def g(): return (yield 1)
# test 'yield from'
f2 = lambda: (yield from g())
def g2(): return (yield from g())
f3 = lambda: (yield from f())
def g3(): return (yield from f())
for gen_fun in (f, g, f2, g2, f3, g3):
gen = gen_fun()
self.assertEqual(next(gen), 1)
with self.assertRaises(StopIteration) as cm:
gen.send(2)
self.assertEqual(cm.exception.value, 2)
class GeneratorTest(unittest.TestCase):
def test_name(self):
def func():
yield 1
# check generator names
gen = func()
self.assertEqual(gen.__name__, "func")
self.assertEqual(gen.__qualname__,
"GeneratorTest.test_name.<locals>.func")
# modify generator names
gen.__name__ = "name"
gen.__qualname__ = "qualname"
self.assertEqual(gen.__name__, "name")
self.assertEqual(gen.__qualname__, "qualname")
# generator names must be a string and cannot be deleted
self.assertRaises(TypeError, setattr, gen, '__name__', 123)
self.assertRaises(TypeError, setattr, gen, '__qualname__', 123)
self.assertRaises(TypeError, delattr, gen, '__name__')
self.assertRaises(TypeError, delattr, gen, '__qualname__')
# modify names of the function creating the generator
func.__qualname__ = "func_qualname"
func.__name__ = "func_name"
gen = func()
self.assertEqual(gen.__name__, "func_name")
self.assertEqual(gen.__qualname__, "func_qualname")
# unnamed generator
gen = (x for x in range(10))
self.assertEqual(gen.__name__,
"<genexpr>")
self.assertEqual(gen.__qualname__,
"GeneratorTest.test_name.<locals>.<genexpr>")
def test_copy(self):
def f():
yield 1
g = f()
with self.assertRaises(TypeError):
copy.copy(g)
def test_pickle(self):
def f():
yield 1
g = f()
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
with self.assertRaises((TypeError, pickle.PicklingError)):
pickle.dumps(g, proto)
class ExceptionTest(unittest.TestCase):
# Tests for the issue #23353: check that the currently handled exception
# is correctly saved/restored in PyEval_EvalFrameEx().
def test_except_throw(self):
def store_raise_exc_generator():
try:
self.assertEqual(sys.exc_info()[0], None)
yield
except Exception as exc:
# exception raised by gen.throw(exc)
self.assertEqual(sys.exc_info()[0], ValueError)
self.assertIsNone(exc.__context__)
yield
# ensure that the exception is not lost
self.assertEqual(sys.exc_info()[0], ValueError)
yield
# we should be able to raise back the ValueError
raise
make = store_raise_exc_generator()
next(make)
try:
raise ValueError()
except Exception as exc:
try:
make.throw(exc)
except Exception:
pass
next(make)
with self.assertRaises(ValueError) as cm:
next(make)
self.assertIsNone(cm.exception.__context__)
self.assertEqual(sys.exc_info(), (None, None, None))
def test_except_next(self):
def gen():
self.assertEqual(sys.exc_info()[0], ValueError)
yield "done"
g = gen()
try:
raise ValueError
except Exception:
self.assertEqual(next(g), "done")
self.assertEqual(sys.exc_info(), (None, None, None))
def test_except_gen_except(self):
def gen():
try:
self.assertEqual(sys.exc_info()[0], None)
yield
# we are called from "except ValueError:", TypeError must
# inherit ValueError in its context
raise TypeError()
except TypeError as exc:
self.assertEqual(sys.exc_info()[0], TypeError)
self.assertEqual(type(exc.__context__), ValueError)
# here we are still called from the "except ValueError:"
self.assertEqual(sys.exc_info()[0], ValueError)
yield
self.assertIsNone(sys.exc_info()[0])
yield "done"
g = gen()
next(g)
try:
raise ValueError
except Exception:
next(g)
self.assertEqual(next(g), "done")
self.assertEqual(sys.exc_info(), (None, None, None))
def test_except_throw_exception_context(self):
def gen():
try:
try:
self.assertEqual(sys.exc_info()[0], None)
yield
except ValueError:
# we are called from "except ValueError:"
self.assertEqual(sys.exc_info()[0], ValueError)
raise TypeError()
except Exception as exc:
self.assertEqual(sys.exc_info()[0], TypeError)
self.assertEqual(type(exc.__context__), ValueError)
# we are still called from "except ValueError:"
self.assertEqual(sys.exc_info()[0], ValueError)
yield
self.assertIsNone(sys.exc_info()[0])
yield "done"
g = gen()
next(g)
try:
raise ValueError
except Exception as exc:
g.throw(exc)
self.assertEqual(next(g), "done")
self.assertEqual(sys.exc_info(), (None, None, None))
def test_stopiteration_warning(self):
# See also PEP 479.
def gen():
raise StopIteration
yield
with self.assertRaises(StopIteration), \
self.assertWarnsRegex(DeprecationWarning, "StopIteration"):
next(gen())
with self.assertRaisesRegex(DeprecationWarning,
"generator .* raised StopIteration"), \
warnings.catch_warnings():
warnings.simplefilter('error')
next(gen())
def test_tutorial_stopiteration(self):
# Raise StopIteration" stops the generator too:
def f():
yield 1
raise StopIteration
yield 2 # never reached
g = f()
self.assertEqual(next(g), 1)
with self.assertWarnsRegex(DeprecationWarning, "StopIteration"):
with self.assertRaises(StopIteration):
next(g)
with self.assertRaises(StopIteration):
# This time StopIteration isn't raised from the generator's body,
# hence no warning.
next(g)
def test_return_tuple(self):
def g():
return (yield 1)
gen = g()
self.assertEqual(next(gen), 1)
with self.assertRaises(StopIteration) as cm:
gen.send((2,))
self.assertEqual(cm.exception.value, (2,))
def test_return_stopiteration(self):
def g():
return (yield 1)
gen = g()
self.assertEqual(next(gen), 1)
with self.assertRaises(StopIteration) as cm:
gen.send(StopIteration(2))
self.assertIsInstance(cm.exception.value, StopIteration)
self.assertEqual(cm.exception.value.value, 2)
@unittest.skipIf(True, "TODO: find out why this fails")
class YieldFromTests(unittest.TestCase):
def test_generator_gi_yieldfrom(self):
def a():
self.assertEqual(inspect.getgeneratorstate(gen_b), inspect.GEN_RUNNING)
self.assertIsNone(gen_b.gi_yieldfrom)
yield
self.assertEqual(inspect.getgeneratorstate(gen_b), inspect.GEN_RUNNING)
self.assertIsNone(gen_b.gi_yieldfrom)
def b():
self.assertIsNone(gen_b.gi_yieldfrom)
yield from a()
self.assertIsNone(gen_b.gi_yieldfrom)
yield
self.assertIsNone(gen_b.gi_yieldfrom)
gen_b = b()
self.assertEqual(inspect.getgeneratorstate(gen_b), inspect.GEN_CREATED)
self.assertIsNone(gen_b.gi_yieldfrom)
gen_b.send(None)
self.assertEqual(inspect.getgeneratorstate(gen_b), inspect.GEN_SUSPENDED)
self.assertEqual(gen_b.gi_yieldfrom.gi_code.co_name, 'a')
gen_b.send(None)
self.assertEqual(inspect.getgeneratorstate(gen_b), inspect.GEN_SUSPENDED)
self.assertIsNone(gen_b.gi_yieldfrom)
[] = gen_b # Exhaust generator
self.assertEqual(inspect.getgeneratorstate(gen_b), inspect.GEN_CLOSED)
self.assertIsNone(gen_b.gi_yieldfrom)
tutorial_tests = """
Let's try a simple generator:
>>> def f():
... yield 1
... yield 2
>>> for i in f():
... print(i)
1
2
>>> g = f()
>>> next(g)
1
>>> next(g)
2
"Falling off the end" stops the generator:
>>> next(g)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "<stdin>", line 2, in g
StopIteration
"return" also stops the generator:
>>> def f():
... yield 1
... return
... yield 2 # never reached
...
>>> g = f()
>>> next(g)
1
>>> next(g)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "<stdin>", line 3, in f
StopIteration
>>> next(g) # once stopped, can't be resumed
Traceback (most recent call last):
File "<stdin>", line 1, in ?
StopIteration
However, "return" and StopIteration are not exactly equivalent:
>>> def g1():
... try:
... return
... except:
... yield 1
...
>>> list(g1())
[]
>>> def g2():
... try:
... raise StopIteration
... except:
... yield 42
>>> print(list(g2()))
[42]
This may be surprising at first:
>>> def g3():
... try:
... return
... finally:
... yield 1
...
>>> list(g3())
[1]
Let's create an alternate range() function implemented as a generator:
>>> def yrange(n):
... for i in range(n):
... yield i
...
>>> list(yrange(5))
[0, 1, 2, 3, 4]
Generators always return to the most recent caller:
>>> def creator():
... r = yrange(5)
... print("creator", next(r))
... return r
...
>>> def caller():
... r = creator()
... for i in r:
... print("caller", i)
...
>>> caller()
creator 0
caller 1
caller 2
caller 3
caller 4
Generators can call other generators:
>>> def zrange(n):
... for i in yrange(n):
... yield i
...
>>> list(zrange(5))
[0, 1, 2, 3, 4]
"""
# The examples from PEP 255.
pep_tests = """
Specification: Yield
Restriction: A generator cannot be resumed while it is actively
running:
>>> def g():
... i = next(me)
... yield i
>>> me = g()
>>> next(me)
Traceback (most recent call last):
...
File "<string>", line 2, in g
ValueError: generator already executing
Specification: Return
Note that return isn't always equivalent to raising StopIteration: the
difference lies in how enclosing try/except constructs are treated.
For example,
>>> def f1():
... try:
... return
... except:
... yield 1
>>> print(list(f1()))
[]
because, as in any function, return simply exits, but
>>> def f2():
... try:
... raise StopIteration
... except:
... yield 42
>>> print(list(f2()))
[42]
because StopIteration is captured by a bare "except", as is any
exception.
Specification: Generators and Exception Propagation
>>> def f():
... return 1//0
>>> def g():
... yield f() # the zero division exception propagates
... yield 42 # and we'll never get here
>>> k = g()
>>> next(k)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "<stdin>", line 2, in g
File "<stdin>", line 2, in f
ZeroDivisionError: integer division or modulo by zero
>>> next(k) # and the generator cannot be resumed
Traceback (most recent call last):
File "<stdin>", line 1, in ?
StopIteration
>>>
Specification: Try/Except/Finally
>>> def f():
... try:
... yield 1
... try:
... yield 2
... 1//0
... yield 3 # never get here
... except ZeroDivisionError:
... yield 4
... yield 5
... raise
... except:
... yield 6
... yield 7 # the "raise" above stops this
... except:
... yield 8
... yield 9
... try:
... x = 12
... finally:
... yield 10
... yield 11
>>> print(list(f()))
[1, 2, 4, 5, 8, 9, 10, 11]
>>>
Guido's binary tree example.
>>> # A binary tree class.
>>> class Tree:
...
... def __init__(self, label, left=None, right=None):
... self.label = label
... self.left = left
... self.right = right
...
... def __repr__(self, level=0, indent=" "):
... s = level*indent + repr(self.label)
... if self.left:
... s = s + "\\n" + self.left.__repr__(level+1, indent)
... if self.right:
... s = s + "\\n" + self.right.__repr__(level+1, indent)
... return s
...
... def __iter__(self):
... return inorder(self)
>>> # Create a Tree from a list.
>>> def tree(list):
... n = len(list)
... if n == 0:
... return []
... i = n // 2
... return Tree(list[i], tree(list[:i]), tree(list[i+1:]))
>>> # Show it off: create a tree.
>>> t = tree("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
>>> # A recursive generator that generates Tree labels in in-order.
>>> def inorder(t):
... if t:
... for x in inorder(t.left):
... yield x
... yield t.label
... for x in inorder(t.right):
... yield x
>>> # Show it off: create a tree.
>>> t = tree("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
>>> # Print the nodes of the tree in in-order.
>>> for x in t:
... print(' '+x, end='')
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
>>> # A non-recursive generator.
>>> def inorder(node):
... stack = []
... while node:
... while node.left:
... stack.append(node)
... node = node.left
... yield node.label
... while not node.right:
... try:
... node = stack.pop()
... except IndexError:
... return
... yield node.label
... node = node.right
>>> # Exercise the non-recursive generator.
>>> for x in t:
... print(' '+x, end='')
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
"""
# Examples from Iterator-List and Python-Dev and c.l.py.
email_tests = """
The difference between yielding None and returning it.
>>> def g():
... for i in range(3):
... yield None
... yield None
... return
>>> list(g())
[None, None, None, None]
Ensure that explicitly raising StopIteration acts like any other exception
in try/except, not like a return.
>>> def g():
... yield 1
... try:
... raise StopIteration
... except:
... yield 2
... yield 3
>>> list(g())
[1, 2, 3]
Next one was posted to c.l.py.
>>> def gcomb(x, k):
... "Generate all combinations of k elements from list x."
...
... if k > len(x):
... return
... if k == 0:
... yield []
... else:
... first, rest = x[0], x[1:]
... # A combination does or doesn't contain first.
... # If it does, the remainder is a k-1 comb of rest.
... for c in gcomb(rest, k-1):
... c.insert(0, first)
... yield c
... # If it doesn't contain first, it's a k comb of rest.
... for c in gcomb(rest, k):
... yield c
>>> seq = list(range(1, 5))
>>> for k in range(len(seq) + 2):
... print("%d-combs of %s:" % (k, seq))
... for c in gcomb(seq, k):
... print(" ", c)
0-combs of [1, 2, 3, 4]:
[]
1-combs of [1, 2, 3, 4]:
[1]
[2]
[3]
[4]
2-combs of [1, 2, 3, 4]:
[1, 2]
[1, 3]
[1, 4]
[2, 3]
[2, 4]
[3, 4]
3-combs of [1, 2, 3, 4]:
[1, 2, 3]
[1, 2, 4]
[1, 3, 4]
[2, 3, 4]
4-combs of [1, 2, 3, 4]:
[1, 2, 3, 4]
5-combs of [1, 2, 3, 4]:
From the Iterators list, about the types of these things.
>>> def g():
... yield 1
...
>>> type(g)
<class 'function'>
>>> i = g()
>>> type(i)
<class 'generator'>
>>> [s for s in dir(i) if not s.startswith('_')]
['close', 'gi_code', 'gi_frame', 'gi_running', 'gi_yieldfrom', 'send', 'throw']
>>> from test.support import HAVE_DOCSTRINGS
>>> print(i.__next__.__doc__ if HAVE_DOCSTRINGS else 'Implement next(self).')
Implement next(self).
>>> iter(i) is i
True
>>> import types
>>> isinstance(i, types.GeneratorType)
True
And more, added later.
>>> i.gi_running
0
>>> type(i.gi_frame)
<class 'frame'>
>>> i.gi_running = 42
Traceback (most recent call last):
...
AttributeError: readonly attribute
>>> def g():
... yield me.gi_running
>>> me = g()
>>> me.gi_running
0
>>> next(me)
1
>>> me.gi_running
0
A clever union-find implementation from c.l.py, due to David Eppstein.
Sent: Friday, June 29, 2001 12:16 PM
To: [email protected]
Subject: Re: PEP 255: Simple Generators
>>> class disjointSet:
... def __init__(self, name):
... self.name = name
... self.parent = None
... self.generator = self.generate()
...
... def generate(self):
... while not self.parent:
... yield self
... for x in self.parent.generator:
... yield x
...
... def find(self):
... return next(self.generator)
...
... def union(self, parent):
... if self.parent:
... raise ValueError("Sorry, I'm not a root!")
... self.parent = parent
...
... def __str__(self):
... return self.name
>>> names = "ABCDEFGHIJKLM"
>>> sets = [disjointSet(name) for name in names]
>>> roots = sets[:]
>>> import random
>>> gen = random.Random(42)
>>> while 1:
... for s in sets:
... print(" %s->%s" % (s, s.find()), end='')
... print()
... if len(roots) > 1:
... s1 = gen.choice(roots)
... roots.remove(s1)
... s2 = gen.choice(roots)
... s1.union(s2)
... print("merged", s1, "into", s2)
... else:
... break
A->A B->B C->C D->D E->E F->F G->G H->H I->I J->J K->K L->L M->M
merged K into B
A->A B->B C->C D->D E->E F->F G->G H->H I->I J->J K->B L->L M->M
merged A into F
A->F B->B C->C D->D E->E F->F G->G H->H I->I J->J K->B L->L M->M
merged E into F
A->F B->B C->C D->D E->F F->F G->G H->H I->I J->J K->B L->L M->M
merged D into C
A->F B->B C->C D->C E->F F->F G->G H->H I->I J->J K->B L->L M->M
merged M into C
A->F B->B C->C D->C E->F F->F G->G H->H I->I J->J K->B L->L M->C
merged J into B
A->F B->B C->C D->C E->F F->F G->G H->H I->I J->B K->B L->L M->C
merged B into C
A->F B->C C->C D->C E->F F->F G->G H->H I->I J->C K->C L->L M->C
merged F into G
A->G B->C C->C D->C E->G F->G G->G H->H I->I J->C K->C L->L M->C
merged L into C
A->G B->C C->C D->C E->G F->G G->G H->H I->I J->C K->C L->C M->C
merged G into I
A->I B->C C->C D->C E->I F->I G->I H->H I->I J->C K->C L->C M->C
merged I into H
A->H B->C C->C D->C E->H F->H G->H H->H I->H J->C K->C L->C M->C
merged C into H
A->H B->H C->H D->H E->H F->H G->H H->H I->H J->H K->H L->H M->H
"""
# Emacs turd '
# Fun tests (for sufficiently warped notions of "fun").
fun_tests = """
Build up to a recursive Sieve of Eratosthenes generator.
>>> def firstn(g, n):
... return [next(g) for i in range(n)]
>>> def intsfrom(i):
... while 1:
... yield i
... i += 1
>>> firstn(intsfrom(5), 7)
[5, 6, 7, 8, 9, 10, 11]
>>> def exclude_multiples(n, ints):
... for i in ints:
... if i % n:
... yield i
>>> firstn(exclude_multiples(3, intsfrom(1)), 6)
[1, 2, 4, 5, 7, 8]
>>> def sieve(ints):
... prime = next(ints)
... yield prime
... not_divisible_by_prime = exclude_multiples(prime, ints)
... for p in sieve(not_divisible_by_prime):
... yield p
>>> primes = sieve(intsfrom(2))
>>> firstn(primes, 20)
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71]
Another famous problem: generate all integers of the form
2**i * 3**j * 5**k
in increasing order, where i,j,k >= 0. Trickier than it may look at first!
Try writing it without generators, and correctly, and without generating
3 internal results for each result output.
>>> def times(n, g):
... for i in g:
... yield n * i
>>> firstn(times(10, intsfrom(1)), 10)
[10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
>>> def merge(g, h):
... ng = next(g)
... nh = next(h)
... while 1:
... if ng < nh:
... yield ng
... ng = next(g)
... elif ng > nh:
... yield nh
... nh = next(h)
... else:
... yield ng
... ng = next(g)
... nh = next(h)
The following works, but is doing a whale of a lot of redundant work --
it's not clear how to get the internal uses of m235 to share a single
generator. Note that me_times2 (etc) each need to see every element in the
result sequence. So this is an example where lazy lists are more natural
(you can look at the head of a lazy list any number of times).
>>> def m235():
... yield 1
... me_times2 = times(2, m235())
... me_times3 = times(3, m235())
... me_times5 = times(5, m235())
... for i in merge(merge(me_times2,
... me_times3),
... me_times5):
... yield i
Don't print "too many" of these -- the implementation above is extremely
inefficient: each call of m235() leads to 3 recursive calls, and in
turn each of those 3 more, and so on, and so on, until we've descended
enough levels to satisfy the print stmts. Very odd: when I printed 5
lines of results below, this managed to screw up Win98's malloc in "the
usual" way, i.e. the heap grew over 4Mb so Win98 started fragmenting
address space, and it *looked* like a very slow leak.
>>> result = m235()
>>> for i in range(3):
... print(firstn(result, 15))
[1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24]
[25, 27, 30, 32, 36, 40, 45, 48, 50, 54, 60, 64, 72, 75, 80]
[81, 90, 96, 100, 108, 120, 125, 128, 135, 144, 150, 160, 162, 180, 192]
Heh. Here's one way to get a shared list, complete with an excruciating
namespace renaming trick. The *pretty* part is that the times() and merge()
functions can be reused as-is, because they only assume their stream
arguments are iterable -- a LazyList is the same as a generator to times().
>>> class LazyList:
... def __init__(self, g):
... self.sofar = []
... self.fetch = g.__next__
...
... def __getitem__(self, i):
... sofar, fetch = self.sofar, self.fetch
... while i >= len(sofar):
... sofar.append(fetch())
... return sofar[i]
>>> def m235():
... yield 1
... # Gack: m235 below actually refers to a LazyList.
... me_times2 = times(2, m235)
... me_times3 = times(3, m235)
... me_times5 = times(5, m235)
... for i in merge(merge(me_times2,
... me_times3),
... me_times5):
... yield i
Print as many of these as you like -- *this* implementation is memory-
efficient.
>>> m235 = LazyList(m235())
>>> for i in range(5):
... print([m235[j] for j in range(15*i, 15*(i+1))])
[1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24]
[25, 27, 30, 32, 36, 40, 45, 48, 50, 54, 60, 64, 72, 75, 80]
[81, 90, 96, 100, 108, 120, 125, 128, 135, 144, 150, 160, 162, 180, 192]
[200, 216, 225, 240, 243, 250, 256, 270, 288, 300, 320, 324, 360, 375, 384]
[400, 405, 432, 450, 480, 486, 500, 512, 540, 576, 600, 625, 640, 648, 675]
Ye olde Fibonacci generator, LazyList style.
>>> def fibgen(a, b):
...
... def sum(g, h):
... while 1:
... yield next(g) + next(h)
...
... def tail(g):
... next(g) # throw first away
... for x in g:
... yield x
...
... yield a
... yield b
... for s in sum(iter(fib),
... tail(iter(fib))):
... yield s
>>> fib = LazyList(fibgen(1, 2))
>>> firstn(iter(fib), 17)
[1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584]
Running after your tail with itertools.tee (new in version 2.4)
The algorithms "m235" (Hamming) and Fibonacci presented above are both
examples of a whole family of FP (functional programming) algorithms
where a function produces and returns a list while the production algorithm
suppose the list as already produced by recursively calling itself.
For these algorithms to work, they must:
- produce at least a first element without presupposing the existence of
the rest of the list
- produce their elements in a lazy manner
To work efficiently, the beginning of the list must not be recomputed over
and over again. This is ensured in most FP languages as a built-in feature.
In python, we have to explicitly maintain a list of already computed results
and abandon genuine recursivity.
This is what had been attempted above with the LazyList class. One problem
with that class is that it keeps a list of all of the generated results and
therefore continually grows. This partially defeats the goal of the generator
concept, viz. produce the results only as needed instead of producing them
all and thereby wasting memory.
Thanks to itertools.tee, it is now clear "how to get the internal uses of
m235 to share a single generator".
>>> from itertools import tee
>>> def m235():
... def _m235():
... yield 1
... for n in merge(times(2, m2),
... merge(times(3, m3),
... times(5, m5))):
... yield n
... m1 = _m235()
... m2, m3, m5, mRes = tee(m1, 4)
... return mRes
>>> it = m235()
>>> for i in range(5):
... print(firstn(it, 15))
[1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24]
[25, 27, 30, 32, 36, 40, 45, 48, 50, 54, 60, 64, 72, 75, 80]
[81, 90, 96, 100, 108, 120, 125, 128, 135, 144, 150, 160, 162, 180, 192]
[200, 216, 225, 240, 243, 250, 256, 270, 288, 300, 320, 324, 360, 375, 384]
[400, 405, 432, 450, 480, 486, 500, 512, 540, 576, 600, 625, 640, 648, 675]
The "tee" function does just what we want. It internally keeps a generated
result for as long as it has not been "consumed" from all of the duplicated
iterators, whereupon it is deleted. You can therefore print the hamming
sequence during hours without increasing memory usage, or very little.
The beauty of it is that recursive running-after-their-tail FP algorithms
are quite straightforwardly expressed with this Python idiom.
Ye olde Fibonacci generator, tee style.
>>> def fib():
...
... def _isum(g, h):
... while 1:
... yield next(g) + next(h)
...
... def _fib():
... yield 1
... yield 2
... next(fibTail) # throw first away
... for res in _isum(fibHead, fibTail):
... yield res
...
... realfib = _fib()
... fibHead, fibTail, fibRes = tee(realfib, 3)
... return fibRes
>>> firstn(fib(), 17)
[1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584]
"""
# syntax_tests mostly provokes SyntaxErrors. Also fiddling with #if 0
# hackery.
syntax_tests = """
These are fine:
>>> def f():
... yield 1
... return
>>> def f():
... try:
... yield 1
... finally:
... pass
>>> def f():
... try:
... try:
... 1//0
... except ZeroDivisionError:
... yield 666
... except:
... pass
... finally:
... pass
>>> def f():
... try:
... try:
... yield 12
... 1//0
... except ZeroDivisionError:
... yield 666
... except:
... try:
... x = 12
... finally:
... yield 12
... except:
... return
>>> list(f())
[12, 666]
>>> def f():
... yield
>>> type(f())
<class 'generator'>
>>> def f():
... if 0:
... yield
>>> type(f())
<class 'generator'>
>>> def f():
... if 0:
... yield 1
>>> type(f())
<class 'generator'>
>>> def f():
... if "":
... yield None
>>> type(f())
<class 'generator'>
>>> def f():
... return
... try:
... if x==4:
... pass
... elif 0:
... try:
... 1//0
... except SyntaxError:
... pass
... else:
... if 0:
... while 12:
... x += 1
... yield 2 # don't blink
... f(a, b, c, d, e)
... else:
... pass
... except:
... x = 1
... return
>>> type(f())
<class 'generator'>
>>> def f():
... if 0:
... def g():
... yield 1
...
>>> type(f())
<class 'NoneType'>
>>> def f():
... if 0:
... class C:
... def __init__(self):
... yield 1
... def f(self):
... yield 2
>>> type(f())
<class 'NoneType'>
>>> def f():
... if 0:
... return
... if 0:
... yield 2
>>> type(f())
<class 'generator'>
This one caused a crash (see SF bug 567538):
>>> def f():
... for i in range(3):
... try:
... continue
... finally:
... yield i
...
>>> g = f()
>>> print(next(g))
0
>>> print(next(g))
1
>>> print(next(g))
2
>>> print(next(g))
Traceback (most recent call last):
StopIteration
Test the gi_code attribute
>>> def f():
... yield 5
...
>>> g = f()
>>> g.gi_code is f.__code__
True
>>> next(g)
5
>>> next(g)
Traceback (most recent call last):
StopIteration
>>> g.gi_code is f.__code__
True
Test the __name__ attribute and the repr()
>>> def f():
... yield 5
...
>>> g = f()
>>> g.__name__
'f'
>>> repr(g) # doctest: +ELLIPSIS
'<generator object f at ...>'
Lambdas shouldn't have their usual return behavior.
>>> x = lambda: (yield 1)
>>> list(x())
[1]
>>> x = lambda: ((yield 1), (yield 2))
>>> list(x())
[1, 2]
"""
# conjoin is a simple backtracking generator, named in honor of Icon's
# "conjunction" control structure. Pass a list of no-argument functions
# that return iterable objects. Easiest to explain by example: assume the
# function list [x, y, z] is passed. Then conjoin acts like:
#
# def g():
# values = [None] * 3
# for values[0] in x():
# for values[1] in y():
# for values[2] in z():
# yield values
#
# So some 3-lists of values *may* be generated, each time we successfully
# get into the innermost loop. If an iterator fails (is exhausted) before
# then, it "backtracks" to get the next value from the nearest enclosing
# iterator (the one "to the left"), and starts all over again at the next
# slot (pumps a fresh iterator). Of course this is most useful when the
# iterators have side-effects, so that which values *can* be generated at
# each slot depend on the values iterated at previous slots.
def simple_conjoin(gs):
values = [None] * len(gs)
def gen(i):
if i >= len(gs):
yield values
else:
for values[i] in gs[i]():
for x in gen(i+1):
yield x
for x in gen(0):
yield x
# That works fine, but recursing a level and checking i against len(gs) for
# each item produced is inefficient. By doing manual loop unrolling across
# generator boundaries, it's possible to eliminate most of that overhead.
# This isn't worth the bother *in general* for generators, but conjoin() is
# a core building block for some CPU-intensive generator applications.
def conjoin(gs):
n = len(gs)
values = [None] * n
# Do one loop nest at time recursively, until the # of loop nests
# remaining is divisible by 3.
def gen(i):
if i >= n:
yield values
elif (n-i) % 3:
ip1 = i+1
for values[i] in gs[i]():
for x in gen(ip1):
yield x
else:
for x in _gen3(i):
yield x
# Do three loop nests at a time, recursing only if at least three more
# remain. Don't call directly: this is an internal optimization for
# gen's use.
def _gen3(i):
assert i < n and (n-i) % 3 == 0
ip1, ip2, ip3 = i+1, i+2, i+3
g, g1, g2 = gs[i : ip3]
if ip3 >= n:
# These are the last three, so we can yield values directly.
for values[i] in g():
for values[ip1] in g1():
for values[ip2] in g2():
yield values
else:
# At least 6 loop nests remain; peel off 3 and recurse for the
# rest.
for values[i] in g():
for values[ip1] in g1():
for values[ip2] in g2():
for x in _gen3(ip3):
yield x
for x in gen(0):
yield x
# And one more approach: For backtracking apps like the Knight's Tour
# solver below, the number of backtracking levels can be enormous (one
# level per square, for the Knight's Tour, so that e.g. a 100x100 board
# needs 10,000 levels). In such cases Python is likely to run out of
# stack space due to recursion. So here's a recursion-free version of
# conjoin too.
# NOTE WELL: This allows large problems to be solved with only trivial
# demands on stack space. Without explicitly resumable generators, this is
# much harder to achieve. OTOH, this is much slower (up to a factor of 2)
# than the fancy unrolled recursive conjoin.
def flat_conjoin(gs): # rename to conjoin to run tests with this instead
n = len(gs)
values = [None] * n
iters = [None] * n
_StopIteration = StopIteration # make local because caught a *lot*
i = 0
while 1:
# Descend.
try:
while i < n:
it = iters[i] = gs[i]().__next__
values[i] = it()
i += 1
except _StopIteration:
pass
else:
assert i == n
yield values
# Backtrack until an older iterator can be resumed.
i -= 1
while i >= 0:
try:
values[i] = iters[i]()
# Success! Start fresh at next level.
i += 1
break
except _StopIteration:
# Continue backtracking.
i -= 1
else:
assert i < 0
break
# A conjoin-based N-Queens solver.
class Queens:
def __init__(self, n):
self.n = n
rangen = range(n)
# Assign a unique int to each column and diagonal.
# columns: n of those, range(n).
# NW-SE diagonals: 2n-1 of these, i-j unique and invariant along
# each, smallest i-j is 0-(n-1) = 1-n, so add n-1 to shift to 0-
# based.
# NE-SW diagonals: 2n-1 of these, i+j unique and invariant along
# each, smallest i+j is 0, largest is 2n-2.
# For each square, compute a bit vector of the columns and
# diagonals it covers, and for each row compute a function that
# generates the possibilities for the columns in that row.
self.rowgenerators = []
for i in rangen:
rowuses = [(1 << j) | # column ordinal
(1 << (n + i-j + n-1)) | # NW-SE ordinal
(1 << (n + 2*n-1 + i+j)) # NE-SW ordinal
for j in rangen]
def rowgen(rowuses=rowuses):
for j in rangen:
uses = rowuses[j]
if uses & self.used == 0:
self.used |= uses
yield j
self.used &= ~uses
self.rowgenerators.append(rowgen)
# Generate solutions.
def solve(self):
self.used = 0
for row2col in conjoin(self.rowgenerators):
yield row2col
def printsolution(self, row2col):
n = self.n
assert n == len(row2col)
sep = "+" + "-+" * n
print(sep)
for i in range(n):
squares = [" " for j in range(n)]
squares[row2col[i]] = "Q"
print("|" + "|".join(squares) + "|")
print(sep)
# A conjoin-based Knight's Tour solver. This is pretty sophisticated
# (e.g., when used with flat_conjoin above, and passing hard=1 to the
# constructor, a 200x200 Knight's Tour was found quickly -- note that we're
# creating 10s of thousands of generators then!), and is lengthy.
class Knights:
def __init__(self, m, n, hard=0):
self.m, self.n = m, n
# solve() will set up succs[i] to be a list of square #i's
# successors.
succs = self.succs = []
# Remove i0 from each of its successor's successor lists, i.e.
# successors can't go back to i0 again. Return 0 if we can
# detect this makes a solution impossible, else return 1.
def remove_from_successors(i0, len=len):
# If we remove all exits from a free square, we're dead:
# even if we move to it next, we can't leave it again.
# If we create a square with one exit, we must visit it next;
# else somebody else will have to visit it, and since there's
# only one adjacent, there won't be a way to leave it again.
# Finally, if we create more than one free square with a
# single exit, we can only move to one of them next, leaving
# the other one a dead end.
ne0 = ne1 = 0
for i in succs[i0]:
s = succs[i]
s.remove(i0)
e = len(s)
if e == 0:
ne0 += 1
elif e == 1:
ne1 += 1
return ne0 == 0 and ne1 < 2
# Put i0 back in each of its successor's successor lists.
def add_to_successors(i0):
for i in succs[i0]:
succs[i].append(i0)
# Generate the first move.
def first():
if m < 1 or n < 1:
return
# Since we're looking for a cycle, it doesn't matter where we
# start. Starting in a corner makes the 2nd move easy.
corner = self.coords2index(0, 0)
remove_from_successors(corner)
self.lastij = corner
yield corner
add_to_successors(corner)
# Generate the second moves.
def second():
corner = self.coords2index(0, 0)
assert self.lastij == corner # i.e., we started in the corner
if m < 3 or n < 3:
return
assert len(succs[corner]) == 2
assert self.coords2index(1, 2) in succs[corner]
assert self.coords2index(2, 1) in succs[corner]
# Only two choices. Whichever we pick, the other must be the
# square picked on move m*n, as it's the only way to get back
# to (0, 0). Save its index in self.final so that moves before
# the last know it must be kept free.
for i, j in (1, 2), (2, 1):
this = self.coords2index(i, j)
final = self.coords2index(3-i, 3-j)
self.final = final
remove_from_successors(this)
succs[final].append(corner)
self.lastij = this
yield this
succs[final].remove(corner)
add_to_successors(this)
# Generate moves 3 through m*n-1.
def advance(len=len):
# If some successor has only one exit, must take it.
# Else favor successors with fewer exits.
candidates = []
for i in succs[self.lastij]:
e = len(succs[i])
assert e > 0, "else remove_from_successors() pruning flawed"
if e == 1:
candidates = [(e, i)]
break
candidates.append((e, i))
else:
candidates.sort()
for e, i in candidates:
if i != self.final:
if remove_from_successors(i):
self.lastij = i
yield i
add_to_successors(i)
# Generate moves 3 through m*n-1. Alternative version using a
# stronger (but more expensive) heuristic to order successors.
# Since the # of backtracking levels is m*n, a poor move early on
# can take eons to undo. Smallest square board for which this
# matters a lot is 52x52.
def advance_hard(vmid=(m-1)/2.0, hmid=(n-1)/2.0, len=len):
# If some successor has only one exit, must take it.
# Else favor successors with fewer exits.
# Break ties via max distance from board centerpoint (favor
# corners and edges whenever possible).
candidates = []
for i in succs[self.lastij]:
e = len(succs[i])
assert e > 0, "else remove_from_successors() pruning flawed"
if e == 1:
candidates = [(e, 0, i)]
break
i1, j1 = self.index2coords(i)
d = (i1 - vmid)**2 + (j1 - hmid)**2
candidates.append((e, -d, i))
else:
candidates.sort()
for e, d, i in candidates:
if i != self.final:
if remove_from_successors(i):
self.lastij = i
yield i
add_to_successors(i)
# Generate the last move.
def last():
assert self.final in succs[self.lastij]
yield self.final
if m*n < 4:
self.squaregenerators = [first]
else:
self.squaregenerators = [first, second] + \
[hard and advance_hard or advance] * (m*n - 3) + \
[last]
def coords2index(self, i, j):
assert 0 <= i < self.m
assert 0 <= j < self.n
return i * self.n + j
def index2coords(self, index):
assert 0 <= index < self.m * self.n
return divmod(index, self.n)
def _init_board(self):
succs = self.succs
del succs[:]
m, n = self.m, self.n
c2i = self.coords2index
offsets = [( 1, 2), ( 2, 1), ( 2, -1), ( 1, -2),
(-1, -2), (-2, -1), (-2, 1), (-1, 2)]
rangen = range(n)
for i in range(m):
for j in rangen:
s = [c2i(i+io, j+jo) for io, jo in offsets
if 0 <= i+io < m and
0 <= j+jo < n]
succs.append(s)
# Generate solutions.
def solve(self):
self._init_board()
for x in conjoin(self.squaregenerators):
yield x
def printsolution(self, x):
m, n = self.m, self.n
assert len(x) == m*n
w = len(str(m*n))
format = "%" + str(w) + "d"
squares = [[None] * n for i in range(m)]
k = 1
for i in x:
i1, j1 = self.index2coords(i)
squares[i1][j1] = format % k
k += 1
sep = "+" + ("-" * w + "+") * n
print(sep)
for i in range(m):
row = squares[i]
print("|" + "|".join(row) + "|")
print(sep)
conjoin_tests = """
Generate the 3-bit binary numbers in order. This illustrates dumbest-
possible use of conjoin, just to generate the full cross-product.
>>> for c in conjoin([lambda: iter((0, 1))] * 3):
... print(c)
[0, 0, 0]
[0, 0, 1]
[0, 1, 0]
[0, 1, 1]
[1, 0, 0]
[1, 0, 1]
[1, 1, 0]
[1, 1, 1]
For efficiency in typical backtracking apps, conjoin() yields the same list
object each time. So if you want to save away a full account of its
generated sequence, you need to copy its results.
>>> def gencopy(iterator):
... for x in iterator:
... yield x[:]
>>> for n in range(10):
... all = list(gencopy(conjoin([lambda: iter((0, 1))] * n)))
... print(n, len(all), all[0] == [0] * n, all[-1] == [1] * n)
0 1 True True
1 2 True True
2 4 True True
3 8 True True
4 16 True True
5 32 True True
6 64 True True
7 128 True True
8 256 True True
9 512 True True
And run an 8-queens solver.
>>> q = Queens(8)
>>> LIMIT = 2
>>> count = 0
>>> for row2col in q.solve():
... count += 1
... if count <= LIMIT:
... print("Solution", count)
... q.printsolution(row2col)
Solution 1
+-+-+-+-+-+-+-+-+
|Q| | | | | | | |
+-+-+-+-+-+-+-+-+
| | | | |Q| | | |
+-+-+-+-+-+-+-+-+
| | | | | | | |Q|
+-+-+-+-+-+-+-+-+
| | | | | |Q| | |
+-+-+-+-+-+-+-+-+
| | |Q| | | | | |
+-+-+-+-+-+-+-+-+
| | | | | | |Q| |
+-+-+-+-+-+-+-+-+
| |Q| | | | | | |
+-+-+-+-+-+-+-+-+
| | | |Q| | | | |
+-+-+-+-+-+-+-+-+
Solution 2
+-+-+-+-+-+-+-+-+
|Q| | | | | | | |
+-+-+-+-+-+-+-+-+
| | | | | |Q| | |
+-+-+-+-+-+-+-+-+
| | | | | | | |Q|
+-+-+-+-+-+-+-+-+
| | |Q| | | | | |
+-+-+-+-+-+-+-+-+
| | | | | | |Q| |
+-+-+-+-+-+-+-+-+
| | | |Q| | | | |
+-+-+-+-+-+-+-+-+
| |Q| | | | | | |
+-+-+-+-+-+-+-+-+
| | | | |Q| | | |
+-+-+-+-+-+-+-+-+
>>> print(count, "solutions in all.")
92 solutions in all.
And run a Knight's Tour on a 10x10 board. Note that there are about
20,000 solutions even on a 6x6 board, so don't dare run this to exhaustion.
>>> k = Knights(10, 10)
>>> LIMIT = 2
>>> count = 0
>>> for x in k.solve():
... count += 1
... if count <= LIMIT:
... print("Solution", count)
... k.printsolution(x)
... else:
... break
Solution 1
+---+---+---+---+---+---+---+---+---+---+
| 1| 58| 27| 34| 3| 40| 29| 10| 5| 8|
+---+---+---+---+---+---+---+---+---+---+
| 26| 35| 2| 57| 28| 33| 4| 7| 30| 11|
+---+---+---+---+---+---+---+---+---+---+
| 59|100| 73| 36| 41| 56| 39| 32| 9| 6|
+---+---+---+---+---+---+---+---+---+---+
| 74| 25| 60| 55| 72| 37| 42| 49| 12| 31|
+---+---+---+---+---+---+---+---+---+---+
| 61| 86| 99| 76| 63| 52| 47| 38| 43| 50|
+---+---+---+---+---+---+---+---+---+---+
| 24| 75| 62| 85| 54| 71| 64| 51| 48| 13|
+---+---+---+---+---+---+---+---+---+---+
| 87| 98| 91| 80| 77| 84| 53| 46| 65| 44|
+---+---+---+---+---+---+---+---+---+---+
| 90| 23| 88| 95| 70| 79| 68| 83| 14| 17|
+---+---+---+---+---+---+---+---+---+---+
| 97| 92| 21| 78| 81| 94| 19| 16| 45| 66|
+---+---+---+---+---+---+---+---+---+---+
| 22| 89| 96| 93| 20| 69| 82| 67| 18| 15|
+---+---+---+---+---+---+---+---+---+---+
Solution 2
+---+---+---+---+---+---+---+---+---+---+
| 1| 58| 27| 34| 3| 40| 29| 10| 5| 8|
+---+---+---+---+---+---+---+---+---+---+
| 26| 35| 2| 57| 28| 33| 4| 7| 30| 11|
+---+---+---+---+---+---+---+---+---+---+
| 59|100| 73| 36| 41| 56| 39| 32| 9| 6|
+---+---+---+---+---+---+---+---+---+---+
| 74| 25| 60| 55| 72| 37| 42| 49| 12| 31|
+---+---+---+---+---+---+---+---+---+---+
| 61| 86| 99| 76| 63| 52| 47| 38| 43| 50|
+---+---+---+---+---+---+---+---+---+---+
| 24| 75| 62| 85| 54| 71| 64| 51| 48| 13|
+---+---+---+---+---+---+---+---+---+---+
| 87| 98| 89| 80| 77| 84| 53| 46| 65| 44|
+---+---+---+---+---+---+---+---+---+---+
| 90| 23| 92| 95| 70| 79| 68| 83| 14| 17|
+---+---+---+---+---+---+---+---+---+---+
| 97| 88| 21| 78| 81| 94| 19| 16| 45| 66|
+---+---+---+---+---+---+---+---+---+---+
| 22| 91| 96| 93| 20| 69| 82| 67| 18| 15|
+---+---+---+---+---+---+---+---+---+---+
"""
weakref_tests = """\
Generators are weakly referencable:
>>> import weakref
>>> def gen():
... yield 'foo!'
...
>>> wr = weakref.ref(gen)
>>> wr() is gen
True
>>> p = weakref.proxy(gen)
Generator-iterators are weakly referencable as well:
>>> gi = gen()
>>> wr = weakref.ref(gi)
>>> wr() is gi
True
>>> p = weakref.proxy(gi)
>>> list(p)
['foo!']
"""
coroutine_tests = """\
Sending a value into a started generator:
>>> def f():
... print((yield 1))
... yield 2
>>> g = f()
>>> next(g)
1
>>> g.send(42)
42
2
Sending a value into a new generator produces a TypeError:
>>> f().send("foo")
Traceback (most recent call last):
...
TypeError: can't send non-None value to a just-started generator
Yield by itself yields None:
>>> def f(): yield
>>> list(f())
[None]
An obscene abuse of a yield expression within a generator expression:
>>> list((yield 21) for i in range(4))
[21, None, 21, None, 21, None, 21, None]
And a more sane, but still weird usage:
>>> def f(): list(i for i in [(yield 26)])
>>> type(f())
<class 'generator'>
A yield expression with augmented assignment.
>>> def coroutine(seq):
... count = 0
... while count < 200:
... count += yield
... seq.append(count)
>>> seq = []
>>> c = coroutine(seq)
>>> next(c)
>>> print(seq)
[]
>>> c.send(10)
>>> print(seq)
[10]
>>> c.send(10)
>>> print(seq)
[10, 20]
>>> c.send(10)
>>> print(seq)
[10, 20, 30]
Check some syntax errors for yield expressions:
>>> f=lambda: (yield 1),(yield 2)
Traceback (most recent call last):
...
SyntaxError: 'yield' outside function
>>> def f(): x = yield = y
Traceback (most recent call last):
...
SyntaxError: assignment to yield expression not possible
>>> def f(): (yield bar) = y
Traceback (most recent call last):
...
SyntaxError: can't assign to yield expression
>>> def f(): (yield bar) += y
Traceback (most recent call last):
...
SyntaxError: can't assign to yield expression
Now check some throw() conditions:
>>> def f():
... while True:
... try:
... print((yield))
... except ValueError as v:
... print("caught ValueError (%s)" % (v))
>>> import sys
>>> g = f()
>>> next(g)
>>> g.throw(ValueError) # type only
caught ValueError ()
>>> g.throw(ValueError("xyz")) # value only
caught ValueError (xyz)
>>> g.throw(ValueError, ValueError(1)) # value+matching type
caught ValueError (1)
>>> g.throw(ValueError, TypeError(1)) # mismatched type, rewrapped
caught ValueError (1)
>>> g.throw(ValueError, ValueError(1), None) # explicit None traceback
caught ValueError (1)
>>> g.throw(ValueError(1), "foo") # bad args
Traceback (most recent call last):
...
TypeError: instance exception may not have a separate value
>>> g.throw(ValueError, "foo", 23) # bad args
Traceback (most recent call last):
...
TypeError: throw() third argument must be a traceback object
>>> g.throw("abc")
Traceback (most recent call last):
...
TypeError: exceptions must be classes or instances deriving from BaseException, not str
>>> g.throw(0)
Traceback (most recent call last):
...
TypeError: exceptions must be classes or instances deriving from BaseException, not int
>>> g.throw(list)
Traceback (most recent call last):
...
TypeError: exceptions must be classes or instances deriving from BaseException, not type
>>> def throw(g,exc):
... try:
... raise exc
... except:
... g.throw(*sys.exc_info())
>>> throw(g,ValueError) # do it with traceback included
caught ValueError ()
>>> g.send(1)
1
>>> throw(g,TypeError) # terminate the generator
Traceback (most recent call last):
...
TypeError
>>> print(g.gi_frame)
None
>>> g.send(2)
Traceback (most recent call last):
...
StopIteration
>>> g.throw(ValueError,6) # throw on closed generator
Traceback (most recent call last):
...
ValueError: 6
>>> f().throw(ValueError,7) # throw on just-opened generator
Traceback (most recent call last):
...
ValueError: 7
Plain "raise" inside a generator should preserve the traceback (#13188).
The traceback should have 3 levels:
- g.throw()
- f()
- 1/0
>>> def f():
... try:
... yield
... except:
... raise
>>> g = f()
>>> try:
... 1/0
... except ZeroDivisionError as v:
... try:
... g.throw(v)
... except Exception as w:
... tb = w.__traceback__
>>> levels = 0
>>> while tb:
... levels += 1
... tb = tb.tb_next
>>> levels
3
Now let's try closing a generator:
>>> def f():
... try: yield
... except GeneratorExit:
... print("exiting")
>>> g = f()
>>> next(g)
>>> g.close()
exiting
>>> g.close() # should be no-op now
>>> f().close() # close on just-opened generator should be fine
>>> def f(): yield # an even simpler generator
>>> f().close() # close before opening
>>> g = f()
>>> next(g)
>>> g.close() # close normally
And finalization:
>>> def f():
... try: yield
... finally:
... print("exiting")
>>> g = f()
>>> next(g)
>>> del g
exiting
GeneratorExit is not caught by except Exception:
>>> def f():
... try: yield
... except Exception:
... print('except')
... finally:
... print('finally')
>>> g = f()
>>> next(g)
>>> del g
finally
Now let's try some ill-behaved generators:
>>> def f():
... try: yield
... except GeneratorExit:
... yield "foo!"
>>> g = f()
>>> next(g)
>>> g.close()
Traceback (most recent call last):
...
RuntimeError: generator ignored GeneratorExit
>>> g.close()
Our ill-behaved code should be invoked during GC:
>>> import sys, io
>>> old, sys.stderr = sys.stderr, io.StringIO()
>>> g = f()
>>> next(g)
>>> del g
>>> "RuntimeError: generator ignored GeneratorExit" in sys.stderr.getvalue()
True
>>> sys.stderr = old
And errors thrown during closing should propagate:
>>> def f():
... try: yield
... except GeneratorExit:
... raise TypeError("fie!")
>>> g = f()
>>> next(g)
>>> g.close()
Traceback (most recent call last):
...
TypeError: fie!
Ensure that various yield expression constructs make their
enclosing function a generator:
>>> def f(): x += yield
>>> type(f())
<class 'generator'>
>>> def f(): x = yield
>>> type(f())
<class 'generator'>
>>> def f(): lambda x=(yield): 1
>>> type(f())
<class 'generator'>
>>> def f(): x=(i for i in (yield) if (yield))
>>> type(f())
<class 'generator'>
>>> def f(d): d[(yield "a")] = d[(yield "b")] = 27
>>> data = [1,2]
>>> g = f(data)
>>> type(g)
<class 'generator'>
>>> g.send(None)
'a'
>>> data
[1, 2]
>>> g.send(0)
'b'
>>> data
[27, 2]
>>> try: g.send(1)
... except StopIteration: pass
>>> data
[27, 27]
"""
refleaks_tests = """
Prior to adding cycle-GC support to itertools.tee, this code would leak
references. We add it to the standard suite so the routine refleak-tests
would trigger if it starts being uncleanable again.
>>> import itertools
>>> def leak():
... class gen:
... def __iter__(self):
... return self
... def __next__(self):
... return self.item
... g = gen()
... head, tail = itertools.tee(g)
... g.item = head
... return head
>>> it = leak()
Make sure to also test the involvement of the tee-internal teedataobject,
which stores returned items.
>>> item = next(it)
This test leaked at one point due to generator finalization/destruction.
It was copied from Lib/test/leakers/test_generator_cycle.py before the file
was removed.
>>> def leak():
... def gen():
... while True:
... yield g
... g = gen()
>>> leak()
This test isn't really generator related, but rather exception-in-cleanup
related. The coroutine tests (above) just happen to cause an exception in
the generator's __del__ (tp_del) method. We can also test for this
explicitly, without generators. We do have to redirect stderr to avoid
printing warnings and to doublecheck that we actually tested what we wanted
to test.
>>> import sys, io
>>> old = sys.stderr
>>> try:
... sys.stderr = io.StringIO()
... class Leaker:
... def __del__(self):
... def invoke(message):
... raise RuntimeError(message)
... invoke("test")
...
... l = Leaker()
... del l
... err = sys.stderr.getvalue().strip()
... "Exception ignored in" in err
... "RuntimeError: test" in err
... "Traceback" in err
... "in invoke" in err
... finally:
... sys.stderr = old
True
True
True
True
These refleak tests should perhaps be in a testfile of their own,
test_generators just happened to be the test that drew these out.
"""
__test__ = {"tut": tutorial_tests,
"pep": pep_tests,
"email": email_tests,
"fun": fun_tests,
"syntax": syntax_tests,
"conjoin": conjoin_tests,
"weakref": weakref_tests,
"coroutine": coroutine_tests,
"refleaks": refleaks_tests,
}
# Magic test name that regrtest.py invokes *after* importing this module.
# This worms around a bootstrap problem.
# Note that doctest and regrtest both look in sys.argv for a "-v" argument,
# so this works as expected in both ways of running regrtest.
def test_main(verbose=None):
from test import support, test_generators
support.run_unittest(__name__)
support.run_doctest(test_generators, verbose)
# This part isn't needed for regrtest, but for running the test directly.
if __name__ == "__main__":
test_main(1)
| 60,731 | 2,240 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/badsyntax_future10.py | from __future__ import absolute_import
"spam, bar, blah"
from __future__ import print_function
| 95 | 4 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_asyncgen.py | import inspect
import sys
import types
import unittest
from unittest import mock
from test.support import import_module
asyncio = import_module("asyncio")
class AwaitException(Exception):
pass
@types.coroutine
def awaitable(*, throw=False):
if throw:
yield ('throw',)
else:
yield ('result',)
def run_until_complete(coro):
exc = False
while True:
try:
if exc:
exc = False
fut = coro.throw(AwaitException)
else:
fut = coro.send(None)
except StopIteration as ex:
return ex.args[0]
if fut == ('throw',):
exc = True
def to_list(gen):
async def iterate():
res = []
async for i in gen:
res.append(i)
return res
return run_until_complete(iterate())
class AsyncGenSyntaxTest(unittest.TestCase):
def test_async_gen_syntax_01(self):
code = '''async def foo():
await abc
yield from 123
'''
with self.assertRaisesRegex(SyntaxError, 'yield from.*inside async'):
exec(code, {}, {})
def test_async_gen_syntax_02(self):
code = '''async def foo():
yield from 123
'''
with self.assertRaisesRegex(SyntaxError, 'yield from.*inside async'):
exec(code, {}, {})
def test_async_gen_syntax_03(self):
code = '''async def foo():
await abc
yield
return 123
'''
with self.assertRaisesRegex(SyntaxError, 'return.*value.*async gen'):
exec(code, {}, {})
def test_async_gen_syntax_04(self):
code = '''async def foo():
yield
return 123
'''
with self.assertRaisesRegex(SyntaxError, 'return.*value.*async gen'):
exec(code, {}, {})
def test_async_gen_syntax_05(self):
code = '''async def foo():
if 0:
yield
return 12
'''
with self.assertRaisesRegex(SyntaxError, 'return.*value.*async gen'):
exec(code, {}, {})
class AsyncGenTest(unittest.TestCase):
def compare_generators(self, sync_gen, async_gen):
def sync_iterate(g):
res = []
while True:
try:
res.append(g.__next__())
except StopIteration:
res.append('STOP')
break
except Exception as ex:
res.append(str(type(ex)))
return res
def async_iterate(g):
res = []
while True:
an = g.__anext__()
try:
while True:
try:
an.__next__()
except StopIteration as ex:
if ex.args:
res.append(ex.args[0])
break
else:
res.append('EMPTY StopIteration')
break
except StopAsyncIteration:
raise
except Exception as ex:
res.append(str(type(ex)))
break
except StopAsyncIteration:
res.append('STOP')
break
return res
def async_iterate(g):
res = []
while True:
try:
g.__anext__().__next__()
except StopAsyncIteration:
res.append('STOP')
break
except StopIteration as ex:
if ex.args:
res.append(ex.args[0])
else:
res.append('EMPTY StopIteration')
break
except Exception as ex:
res.append(str(type(ex)))
return res
sync_gen_result = sync_iterate(sync_gen)
async_gen_result = async_iterate(async_gen)
self.assertEqual(sync_gen_result, async_gen_result)
return async_gen_result
def test_async_gen_iteration_01(self):
async def gen():
await awaitable()
a = yield 123
self.assertIs(a, None)
await awaitable()
yield 456
await awaitable()
yield 789
self.assertEqual(to_list(gen()), [123, 456, 789])
def test_async_gen_iteration_02(self):
async def gen():
await awaitable()
yield 123
await awaitable()
g = gen()
ai = g.__aiter__()
self.assertEqual(ai.__anext__().__next__(), ('result',))
try:
ai.__anext__().__next__()
except StopIteration as ex:
self.assertEqual(ex.args[0], 123)
else:
self.fail('StopIteration was not raised')
self.assertEqual(ai.__anext__().__next__(), ('result',))
try:
ai.__anext__().__next__()
except StopAsyncIteration as ex:
self.assertFalse(ex.args)
else:
self.fail('StopAsyncIteration was not raised')
def test_async_gen_exception_03(self):
async def gen():
await awaitable()
yield 123
await awaitable(throw=True)
yield 456
with self.assertRaises(AwaitException):
to_list(gen())
def test_async_gen_exception_04(self):
async def gen():
await awaitable()
yield 123
1 / 0
g = gen()
ai = g.__aiter__()
self.assertEqual(ai.__anext__().__next__(), ('result',))
try:
ai.__anext__().__next__()
except StopIteration as ex:
self.assertEqual(ex.args[0], 123)
else:
self.fail('StopIteration was not raised')
with self.assertRaises(ZeroDivisionError):
ai.__anext__().__next__()
def test_async_gen_exception_05(self):
async def gen():
yield 123
raise StopAsyncIteration
with self.assertRaisesRegex(RuntimeError,
'async generator.*StopAsyncIteration'):
to_list(gen())
def test_async_gen_exception_06(self):
async def gen():
yield 123
raise StopIteration
with self.assertRaisesRegex(RuntimeError,
'async generator.*StopIteration'):
to_list(gen())
def test_async_gen_exception_07(self):
def sync_gen():
try:
yield 1
1 / 0
finally:
yield 2
yield 3
yield 100
async def async_gen():
try:
yield 1
1 / 0
finally:
yield 2
yield 3
yield 100
self.compare_generators(sync_gen(), async_gen())
def test_async_gen_exception_08(self):
def sync_gen():
try:
yield 1
finally:
yield 2
1 / 0
yield 3
yield 100
async def async_gen():
try:
yield 1
await awaitable()
finally:
await awaitable()
yield 2
1 / 0
yield 3
yield 100
self.compare_generators(sync_gen(), async_gen())
def test_async_gen_exception_09(self):
def sync_gen():
try:
yield 1
1 / 0
finally:
yield 2
yield 3
yield 100
async def async_gen():
try:
await awaitable()
yield 1
1 / 0
finally:
yield 2
await awaitable()
yield 3
yield 100
self.compare_generators(sync_gen(), async_gen())
def test_async_gen_exception_10(self):
async def gen():
yield 123
with self.assertRaisesRegex(TypeError,
"non-None value .* async generator"):
gen().__anext__().send(100)
def test_async_gen_exception_11(self):
def sync_gen():
yield 10
yield 20
def sync_gen_wrapper():
yield 1
sg = sync_gen()
sg.send(None)
try:
sg.throw(GeneratorExit())
except GeneratorExit:
yield 2
yield 3
async def async_gen():
yield 10
yield 20
async def async_gen_wrapper():
yield 1
asg = async_gen()
await asg.asend(None)
try:
await asg.athrow(GeneratorExit())
except GeneratorExit:
yield 2
yield 3
self.compare_generators(sync_gen_wrapper(), async_gen_wrapper())
def test_async_gen_api_01(self):
async def gen():
yield 123
g = gen()
self.assertEqual(g.__name__, 'gen')
g.__name__ = '123'
self.assertEqual(g.__name__, '123')
self.assertIn('.gen', g.__qualname__)
g.__qualname__ = '123'
self.assertEqual(g.__qualname__, '123')
self.assertIsNone(g.ag_await)
self.assertIsInstance(g.ag_frame, types.FrameType)
self.assertFalse(g.ag_running)
self.assertIsInstance(g.ag_code, types.CodeType)
self.assertTrue(inspect.isawaitable(g.aclose()))
class AsyncGenAsyncioTest(unittest.TestCase):
def setUp(self):
self.loop = asyncio.new_event_loop()
asyncio.set_event_loop(None)
def tearDown(self):
self.loop.close()
self.loop = None
async def to_list(self, gen):
res = []
async for i in gen:
res.append(i)
return res
def test_async_gen_asyncio_01(self):
async def gen():
yield 1
await asyncio.sleep(0.01, loop=self.loop)
yield 2
await asyncio.sleep(0.01, loop=self.loop)
return
yield 3
res = self.loop.run_until_complete(self.to_list(gen()))
self.assertEqual(res, [1, 2])
def test_async_gen_asyncio_02(self):
async def gen():
yield 1
await asyncio.sleep(0.01, loop=self.loop)
yield 2
1 / 0
yield 3
with self.assertRaises(ZeroDivisionError):
self.loop.run_until_complete(self.to_list(gen()))
def test_async_gen_asyncio_03(self):
loop = self.loop
class Gen:
async def __aiter__(self):
yield 1
await asyncio.sleep(0.01, loop=loop)
yield 2
res = loop.run_until_complete(self.to_list(Gen()))
self.assertEqual(res, [1, 2])
def test_async_gen_asyncio_anext_04(self):
async def foo():
yield 1
await asyncio.sleep(0.01, loop=self.loop)
try:
yield 2
yield 3
except ZeroDivisionError:
yield 1000
await asyncio.sleep(0.01, loop=self.loop)
yield 4
async def run1():
it = foo().__aiter__()
self.assertEqual(await it.__anext__(), 1)
self.assertEqual(await it.__anext__(), 2)
self.assertEqual(await it.__anext__(), 3)
self.assertEqual(await it.__anext__(), 4)
with self.assertRaises(StopAsyncIteration):
await it.__anext__()
with self.assertRaises(StopAsyncIteration):
await it.__anext__()
async def run2():
it = foo().__aiter__()
self.assertEqual(await it.__anext__(), 1)
self.assertEqual(await it.__anext__(), 2)
try:
it.__anext__().throw(ZeroDivisionError)
except StopIteration as ex:
self.assertEqual(ex.args[0], 1000)
else:
self.fail('StopIteration was not raised')
self.assertEqual(await it.__anext__(), 4)
with self.assertRaises(StopAsyncIteration):
await it.__anext__()
self.loop.run_until_complete(run1())
self.loop.run_until_complete(run2())
def test_async_gen_asyncio_anext_05(self):
async def foo():
v = yield 1
v = yield v
yield v * 100
async def run():
it = foo().__aiter__()
try:
it.__anext__().send(None)
except StopIteration as ex:
self.assertEqual(ex.args[0], 1)
else:
self.fail('StopIteration was not raised')
try:
it.__anext__().send(10)
except StopIteration as ex:
self.assertEqual(ex.args[0], 10)
else:
self.fail('StopIteration was not raised')
try:
it.__anext__().send(12)
except StopIteration as ex:
self.assertEqual(ex.args[0], 1200)
else:
self.fail('StopIteration was not raised')
with self.assertRaises(StopAsyncIteration):
await it.__anext__()
self.loop.run_until_complete(run())
def test_async_gen_asyncio_anext_06(self):
DONE = 0
# test synchronous generators
def foo():
try:
yield
except:
pass
g = foo()
g.send(None)
with self.assertRaises(StopIteration):
g.send(None)
# now with asynchronous generators
async def gen():
nonlocal DONE
try:
yield
except:
pass
DONE = 1
async def run():
nonlocal DONE
g = gen()
await g.asend(None)
with self.assertRaises(StopAsyncIteration):
await g.asend(None)
DONE += 10
self.loop.run_until_complete(run())
self.assertEqual(DONE, 11)
def test_async_gen_asyncio_anext_tuple(self):
async def foo():
try:
yield (1,)
except ZeroDivisionError:
yield (2,)
async def run():
it = foo().__aiter__()
self.assertEqual(await it.__anext__(), (1,))
with self.assertRaises(StopIteration) as cm:
it.__anext__().throw(ZeroDivisionError)
self.assertEqual(cm.exception.args[0], (2,))
with self.assertRaises(StopAsyncIteration):
await it.__anext__()
self.loop.run_until_complete(run())
def test_async_gen_asyncio_anext_stopiteration(self):
async def foo():
try:
yield StopIteration(1)
except ZeroDivisionError:
yield StopIteration(3)
async def run():
it = foo().__aiter__()
v = await it.__anext__()
self.assertIsInstance(v, StopIteration)
self.assertEqual(v.value, 1)
with self.assertRaises(StopIteration) as cm:
it.__anext__().throw(ZeroDivisionError)
v = cm.exception.args[0]
self.assertIsInstance(v, StopIteration)
self.assertEqual(v.value, 3)
with self.assertRaises(StopAsyncIteration):
await it.__anext__()
self.loop.run_until_complete(run())
def test_async_gen_asyncio_aclose_06(self):
async def foo():
try:
yield 1
1 / 0
finally:
await asyncio.sleep(0.01, loop=self.loop)
yield 12
async def run():
gen = foo()
it = gen.__aiter__()
await it.__anext__()
await gen.aclose()
with self.assertRaisesRegex(
RuntimeError,
"async generator ignored GeneratorExit"):
self.loop.run_until_complete(run())
def test_async_gen_asyncio_aclose_07(self):
DONE = 0
async def foo():
nonlocal DONE
try:
yield 1
1 / 0
finally:
await asyncio.sleep(0.01, loop=self.loop)
await asyncio.sleep(0.01, loop=self.loop)
DONE += 1
DONE += 1000
async def run():
gen = foo()
it = gen.__aiter__()
await it.__anext__()
await gen.aclose()
self.loop.run_until_complete(run())
self.assertEqual(DONE, 1)
def test_async_gen_asyncio_aclose_08(self):
DONE = 0
fut = asyncio.Future(loop=self.loop)
async def foo():
nonlocal DONE
try:
yield 1
await fut
DONE += 1000
yield 2
finally:
await asyncio.sleep(0.01, loop=self.loop)
await asyncio.sleep(0.01, loop=self.loop)
DONE += 1
DONE += 1000
async def run():
gen = foo()
it = gen.__aiter__()
self.assertEqual(await it.__anext__(), 1)
t = self.loop.create_task(it.__anext__())
await asyncio.sleep(0.01, loop=self.loop)
await gen.aclose()
return t
t = self.loop.run_until_complete(run())
self.assertEqual(DONE, 1)
# Silence ResourceWarnings
fut.cancel()
t.cancel()
self.loop.run_until_complete(asyncio.sleep(0.01, loop=self.loop))
def test_async_gen_asyncio_gc_aclose_09(self):
DONE = 0
async def gen():
nonlocal DONE
try:
while True:
yield 1
finally:
await asyncio.sleep(0.01, loop=self.loop)
await asyncio.sleep(0.01, loop=self.loop)
DONE = 1
async def run():
g = gen()
await g.__anext__()
await g.__anext__()
del g
await asyncio.sleep(0.1, loop=self.loop)
self.loop.run_until_complete(run())
self.assertEqual(DONE, 1)
def test_async_gen_asyncio_aclose_10(self):
DONE = 0
# test synchronous generators
def foo():
try:
yield
except:
pass
g = foo()
g.send(None)
g.close()
# now with asynchronous generators
async def gen():
nonlocal DONE
try:
yield
except:
pass
DONE = 1
async def run():
nonlocal DONE
g = gen()
await g.asend(None)
await g.aclose()
DONE += 10
self.loop.run_until_complete(run())
self.assertEqual(DONE, 11)
def test_async_gen_asyncio_aclose_11(self):
DONE = 0
# test synchronous generators
def foo():
try:
yield
except:
pass
yield
g = foo()
g.send(None)
with self.assertRaisesRegex(RuntimeError, 'ignored GeneratorExit'):
g.close()
# now with asynchronous generators
async def gen():
nonlocal DONE
try:
yield
except:
pass
yield
DONE += 1
async def run():
nonlocal DONE
g = gen()
await g.asend(None)
with self.assertRaisesRegex(RuntimeError, 'ignored GeneratorExit'):
await g.aclose()
DONE += 10
self.loop.run_until_complete(run())
self.assertEqual(DONE, 10)
def test_async_gen_asyncio_asend_01(self):
DONE = 0
# Sanity check:
def sgen():
v = yield 1
yield v * 2
sg = sgen()
v = sg.send(None)
self.assertEqual(v, 1)
v = sg.send(100)
self.assertEqual(v, 200)
async def gen():
nonlocal DONE
try:
await asyncio.sleep(0.01, loop=self.loop)
v = yield 1
await asyncio.sleep(0.01, loop=self.loop)
yield v * 2
await asyncio.sleep(0.01, loop=self.loop)
return
finally:
await asyncio.sleep(0.01, loop=self.loop)
await asyncio.sleep(0.01, loop=self.loop)
DONE = 1
async def run():
g = gen()
v = await g.asend(None)
self.assertEqual(v, 1)
v = await g.asend(100)
self.assertEqual(v, 200)
with self.assertRaises(StopAsyncIteration):
await g.asend(None)
self.loop.run_until_complete(run())
self.assertEqual(DONE, 1)
def test_async_gen_asyncio_asend_02(self):
DONE = 0
async def sleep_n_crash(delay):
await asyncio.sleep(delay, loop=self.loop)
1 / 0
async def gen():
nonlocal DONE
try:
await asyncio.sleep(0.01, loop=self.loop)
v = yield 1
await sleep_n_crash(0.01)
DONE += 1000
yield v * 2
finally:
await asyncio.sleep(0.01, loop=self.loop)
await asyncio.sleep(0.01, loop=self.loop)
DONE = 1
async def run():
g = gen()
v = await g.asend(None)
self.assertEqual(v, 1)
await g.asend(100)
with self.assertRaises(ZeroDivisionError):
self.loop.run_until_complete(run())
self.assertEqual(DONE, 1)
def test_async_gen_asyncio_asend_03(self):
DONE = 0
async def sleep_n_crash(delay):
fut = asyncio.ensure_future(asyncio.sleep(delay, loop=self.loop),
loop=self.loop)
self.loop.call_later(delay / 2, lambda: fut.cancel())
return await fut
async def gen():
nonlocal DONE
try:
await asyncio.sleep(0.01, loop=self.loop)
v = yield 1
await sleep_n_crash(0.01)
DONE += 1000
yield v * 2
finally:
await asyncio.sleep(0.01, loop=self.loop)
await asyncio.sleep(0.01, loop=self.loop)
DONE = 1
async def run():
g = gen()
v = await g.asend(None)
self.assertEqual(v, 1)
await g.asend(100)
with self.assertRaises(asyncio.CancelledError):
self.loop.run_until_complete(run())
self.assertEqual(DONE, 1)
def test_async_gen_asyncio_athrow_01(self):
DONE = 0
class FooEr(Exception):
pass
# Sanity check:
def sgen():
try:
v = yield 1
except FooEr:
v = 1000
yield v * 2
sg = sgen()
v = sg.send(None)
self.assertEqual(v, 1)
v = sg.throw(FooEr)
self.assertEqual(v, 2000)
with self.assertRaises(StopIteration):
sg.send(None)
async def gen():
nonlocal DONE
try:
await asyncio.sleep(0.01, loop=self.loop)
try:
v = yield 1
except FooEr:
v = 1000
await asyncio.sleep(0.01, loop=self.loop)
yield v * 2
await asyncio.sleep(0.01, loop=self.loop)
# return
finally:
await asyncio.sleep(0.01, loop=self.loop)
await asyncio.sleep(0.01, loop=self.loop)
DONE = 1
async def run():
g = gen()
v = await g.asend(None)
self.assertEqual(v, 1)
v = await g.athrow(FooEr)
self.assertEqual(v, 2000)
with self.assertRaises(StopAsyncIteration):
await g.asend(None)
self.loop.run_until_complete(run())
self.assertEqual(DONE, 1)
def test_async_gen_asyncio_athrow_02(self):
DONE = 0
class FooEr(Exception):
pass
async def sleep_n_crash(delay):
fut = asyncio.ensure_future(asyncio.sleep(delay, loop=self.loop),
loop=self.loop)
self.loop.call_later(delay / 2, lambda: fut.cancel())
return await fut
async def gen():
nonlocal DONE
try:
await asyncio.sleep(0.01, loop=self.loop)
try:
v = yield 1
except FooEr:
await sleep_n_crash(0.01)
yield v * 2
await asyncio.sleep(0.01, loop=self.loop)
# return
finally:
await asyncio.sleep(0.01, loop=self.loop)
await asyncio.sleep(0.01, loop=self.loop)
DONE = 1
async def run():
g = gen()
v = await g.asend(None)
self.assertEqual(v, 1)
try:
await g.athrow(FooEr)
except asyncio.CancelledError:
self.assertEqual(DONE, 1)
raise
else:
self.fail('CancelledError was not raised')
with self.assertRaises(asyncio.CancelledError):
self.loop.run_until_complete(run())
self.assertEqual(DONE, 1)
def test_async_gen_asyncio_athrow_03(self):
DONE = 0
# test synchronous generators
def foo():
try:
yield
except:
pass
g = foo()
g.send(None)
with self.assertRaises(StopIteration):
g.throw(ValueError)
# now with asynchronous generators
async def gen():
nonlocal DONE
try:
yield
except:
pass
DONE = 1
async def run():
nonlocal DONE
g = gen()
await g.asend(None)
with self.assertRaises(StopAsyncIteration):
await g.athrow(ValueError)
DONE += 10
self.loop.run_until_complete(run())
self.assertEqual(DONE, 11)
def test_async_gen_asyncio_athrow_tuple(self):
async def gen():
try:
yield 1
except ZeroDivisionError:
yield (2,)
async def run():
g = gen()
v = await g.asend(None)
self.assertEqual(v, 1)
v = await g.athrow(ZeroDivisionError)
self.assertEqual(v, (2,))
with self.assertRaises(StopAsyncIteration):
await g.asend(None)
self.loop.run_until_complete(run())
def test_async_gen_asyncio_athrow_stopiteration(self):
async def gen():
try:
yield 1
except ZeroDivisionError:
yield StopIteration(2)
async def run():
g = gen()
v = await g.asend(None)
self.assertEqual(v, 1)
v = await g.athrow(ZeroDivisionError)
self.assertIsInstance(v, StopIteration)
self.assertEqual(v.value, 2)
with self.assertRaises(StopAsyncIteration):
await g.asend(None)
self.loop.run_until_complete(run())
def test_async_gen_asyncio_shutdown_01(self):
finalized = 0
async def waiter(timeout):
nonlocal finalized
try:
await asyncio.sleep(timeout, loop=self.loop)
yield 1
finally:
await asyncio.sleep(0, loop=self.loop)
finalized += 1
async def wait():
async for _ in waiter(1):
pass
t1 = self.loop.create_task(wait())
t2 = self.loop.create_task(wait())
self.loop.run_until_complete(asyncio.sleep(0.1, loop=self.loop))
self.loop.run_until_complete(self.loop.shutdown_asyncgens())
self.assertEqual(finalized, 2)
# Silence warnings
t1.cancel()
t2.cancel()
self.loop.run_until_complete(asyncio.sleep(0.1, loop=self.loop))
def test_async_gen_asyncio_shutdown_02(self):
logged = 0
def logger(loop, context):
nonlocal logged
self.assertIn('asyncgen', context)
expected = 'an error occurred during closing of asynchronous'
if expected in context['message']:
logged += 1
async def waiter(timeout):
try:
await asyncio.sleep(timeout, loop=self.loop)
yield 1
finally:
1 / 0
async def wait():
async for _ in waiter(1):
pass
t = self.loop.create_task(wait())
self.loop.run_until_complete(asyncio.sleep(0.1, loop=self.loop))
self.loop.set_exception_handler(logger)
self.loop.run_until_complete(self.loop.shutdown_asyncgens())
self.assertEqual(logged, 1)
# Silence warnings
t.cancel()
self.loop.run_until_complete(asyncio.sleep(0.1, loop=self.loop))
if __name__ == "__main__":
unittest.main()
| 30,024 | 1,101 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_runpy.py | # Test the runpy module
import unittest
import os
import os.path
import sys
import cosmo
import re
import tempfile
import importlib, importlib.machinery, importlib.util
import py_compile
import warnings
from test.support import (
forget, make_legacy_pyc, unload, verbose, no_tracing,
create_empty_file, temp_dir)
from test.support.script_helper import (
make_pkg, make_script, make_zip_pkg, make_zip_script)
import runpy
from runpy import _run_code, _run_module_code, run_module, run_path
# Note: This module can't safely test _run_module_as_main as it
# runs its tests in the current process, which would mess with the
# real __main__ module (usually test.regrtest)
# See test_cmd_line_script for a test that executes that code path
# Set up the test code and expected results
example_source = """\
# Check basic code execution
result = ['Top level assignment']
def f():
result.append('Lower level reference')
f()
del f
# Check the sys module
import sys
run_argv0 = sys.argv[0]
run_name_in_sys_modules = __name__ in sys.modules
module_in_sys_modules = (run_name_in_sys_modules and
globals() is sys.modules[__name__].__dict__)
# Check nested operation
import runpy
nested = runpy._run_module_code('x=1\\n', mod_name='<run>')
"""
implicit_namespace = {
"__name__": None,
"__file__": None,
"__cached__": None,
"__package__": None,
"__doc__": None,
"__spec__": None
}
example_namespace = {
"sys": sys,
"runpy": runpy,
"result": ["Top level assignment", "Lower level reference"],
"run_argv0": sys.argv[0],
"run_name_in_sys_modules": False,
"module_in_sys_modules": False,
"nested": dict(implicit_namespace,
x=1, __name__="<run>", __loader__=None),
}
example_namespace.update(implicit_namespace)
class CodeExecutionMixin:
# Issue #15230 (run_path not handling run_name correctly) highlighted a
# problem with the way arguments were being passed from higher level APIs
# down to lower level code. This mixin makes it easier to ensure full
# testing occurs at those upper layers as well, not just at the utility
# layer
# Figuring out the loader details in advance is hard to do, so we skip
# checking the full details of loader and loader_state
CHECKED_SPEC_ATTRIBUTES = ["name", "parent", "origin", "cached",
"has_location", "submodule_search_locations"]
def assertNamespaceMatches(self, result_ns, expected_ns):
"""Check two namespaces match.
Ignores any unspecified interpreter created names
"""
# Avoid side effects
result_ns = result_ns.copy()
expected_ns = expected_ns.copy()
# Impls are permitted to add extra names, so filter them out
for k in list(result_ns):
if k.startswith("__") and k.endswith("__"):
if k not in expected_ns:
result_ns.pop(k)
if k not in expected_ns["nested"]:
result_ns["nested"].pop(k)
# Spec equality includes the loader, so we take the spec out of the
# result namespace and check that separately
result_spec = result_ns.pop("__spec__")
expected_spec = expected_ns.pop("__spec__")
if expected_spec is None:
self.assertIsNone(result_spec)
else:
# If an expected loader is set, we just check we got the right
# type, rather than checking for full equality
if expected_spec.loader is not None:
self.assertEqual(type(result_spec.loader),
type(expected_spec.loader))
for attr in self.CHECKED_SPEC_ATTRIBUTES:
k = "__spec__." + attr
actual = (k, getattr(result_spec, attr))
expected = (k, getattr(expected_spec, attr))
self.assertEqual(actual, expected)
# For the rest, we still don't use direct dict comparison on the
# namespace, as the diffs are too hard to debug if anything breaks
self.assertEqual(set(result_ns), set(expected_ns))
for k in result_ns:
actual = (k, result_ns[k])
expected = (k, expected_ns[k])
self.assertEqual(actual, expected)
def check_code_execution(self, create_namespace, expected_namespace):
"""Check that an interface runs the example code correctly
First argument is a callable accepting the initial globals and
using them to create the actual namespace
Second argument is the expected result
"""
sentinel = object()
expected_ns = expected_namespace.copy()
run_name = expected_ns["__name__"]
saved_argv0 = sys.argv[0]
saved_mod = sys.modules.get(run_name, sentinel)
# Check without initial globals
result_ns = create_namespace(None)
self.assertNamespaceMatches(result_ns, expected_ns)
self.assertIs(sys.argv[0], saved_argv0)
self.assertIs(sys.modules.get(run_name, sentinel), saved_mod)
# And then with initial globals
initial_ns = {"sentinel": sentinel}
expected_ns["sentinel"] = sentinel
result_ns = create_namespace(initial_ns)
self.assertIsNot(result_ns, initial_ns)
self.assertNamespaceMatches(result_ns, expected_ns)
self.assertIs(sys.argv[0], saved_argv0)
self.assertIs(sys.modules.get(run_name, sentinel), saved_mod)
class ExecutionLayerTestCase(unittest.TestCase, CodeExecutionMixin):
"""Unit tests for runpy._run_code and runpy._run_module_code"""
def test_run_code(self):
expected_ns = example_namespace.copy()
expected_ns.update({
"__loader__": None,
})
def create_ns(init_globals):
return _run_code(example_source, {}, init_globals)
self.check_code_execution(create_ns, expected_ns)
def test_run_module_code(self):
mod_name = "<Nonsense>"
mod_fname = "Some other nonsense"
mod_loader = "Now you're just being silly"
mod_package = '' # Treat as a top level module
mod_spec = importlib.machinery.ModuleSpec(mod_name,
origin=mod_fname,
loader=mod_loader)
expected_ns = example_namespace.copy()
expected_ns.update({
"__name__": mod_name,
"__file__": mod_fname,
"__loader__": mod_loader,
"__package__": mod_package,
"__spec__": mod_spec,
"run_argv0": mod_fname,
"run_name_in_sys_modules": True,
"module_in_sys_modules": True,
})
def create_ns(init_globals):
return _run_module_code(example_source,
init_globals,
mod_name,
mod_spec)
self.check_code_execution(create_ns, expected_ns)
# TODO: Use self.addCleanup to get rid of a lot of try-finally blocks
class RunModuleTestCase(unittest.TestCase, CodeExecutionMixin):
"""Unit tests for runpy.run_module"""
def expect_import_error(self, mod_name):
try:
run_module(mod_name)
except ImportError:
pass
else:
self.fail("Expected import error for " + mod_name)
def test_invalid_names(self):
# Builtin module
self.expect_import_error("sys")
# Non-existent modules
self.expect_import_error("sys.imp.eric")
self.expect_import_error("os.path.half")
self.expect_import_error("a.bee")
# Relative names not allowed
self.expect_import_error(".howard")
self.expect_import_error("..eaten")
self.expect_import_error(".test_runpy")
self.expect_import_error(".unittest")
# Package without __main__.py
self.expect_import_error("multiprocessing")
def test_library_module(self):
self.assertEqual(run_module("runpy")["__name__"], "runpy")
def _add_pkg_dir(self, pkg_dir, namespace=False):
os.mkdir(pkg_dir)
if namespace:
return None
pkg_fname = os.path.join(pkg_dir, "__init__.py")
create_empty_file(pkg_fname)
return pkg_fname
def _make_pkg(self, source, depth, mod_base="runpy_test",
*, namespace=False, parent_namespaces=False):
# Enforce a couple of internal sanity checks on test cases
if (namespace or parent_namespaces) and not depth:
raise RuntimeError("Can't mark top level module as a "
"namespace package")
pkg_name = "__runpy_pkg__"
test_fname = mod_base+os.extsep+"py"
pkg_dir = sub_dir = os.path.realpath(tempfile.mkdtemp())
if verbose > 1: print(" Package tree in:", sub_dir)
sys.path.insert(0, pkg_dir)
if verbose > 1: print(" Updated sys.path:", sys.path[0])
if depth:
namespace_flags = [parent_namespaces] * depth
namespace_flags[-1] = namespace
for namespace_flag in namespace_flags:
sub_dir = os.path.join(sub_dir, pkg_name)
pkg_fname = self._add_pkg_dir(sub_dir, namespace_flag)
if verbose > 1: print(" Next level in:", sub_dir)
if verbose > 1: print(" Created:", pkg_fname)
mod_fname = os.path.join(sub_dir, test_fname)
mod_file = open(mod_fname, "w")
mod_file.write(source)
mod_file.close()
if verbose > 1: print(" Created:", mod_fname)
mod_name = (pkg_name+".")*depth + mod_base
mod_spec = importlib.util.spec_from_file_location(mod_name,
mod_fname)
return pkg_dir, mod_fname, mod_name, mod_spec
def _del_pkg(self, top):
for entry in list(sys.modules):
if entry.startswith("__runpy_pkg__"):
del sys.modules[entry]
if verbose > 1: print(" Removed sys.modules entries")
del sys.path[0]
if verbose > 1: print(" Removed sys.path entry")
for root, dirs, files in os.walk(top, topdown=False):
for name in files:
try:
os.remove(os.path.join(root, name))
except OSError as ex:
if verbose > 1: print(ex) # Persist with cleaning up
for name in dirs:
fullname = os.path.join(root, name)
try:
os.rmdir(fullname)
except OSError as ex:
if verbose > 1: print(ex) # Persist with cleaning up
try:
os.rmdir(top)
if verbose > 1: print(" Removed package tree")
except OSError as ex:
if verbose > 1: print(ex) # Persist with cleaning up
def _fix_ns_for_legacy_pyc(self, ns, alter_sys):
char_to_add = "c"
ns["__file__"] += char_to_add
ns["__cached__"] = ns["__file__"]
spec = ns["__spec__"]
new_spec = importlib.util.spec_from_file_location(spec.name,
ns["__file__"])
ns["__spec__"] = new_spec
if alter_sys:
ns["run_argv0"] += char_to_add
def _check_module(self, depth, alter_sys=False,
*, namespace=False, parent_namespaces=False):
pkg_dir, mod_fname, mod_name, mod_spec = (
self._make_pkg(example_source, depth,
namespace=namespace,
parent_namespaces=parent_namespaces))
forget(mod_name)
expected_ns = example_namespace.copy()
expected_ns.update({
"__name__": mod_name,
"__file__": mod_fname,
"__cached__": mod_spec.cached,
"__package__": mod_name.rpartition(".")[0],
"__spec__": mod_spec,
})
if alter_sys:
expected_ns.update({
"run_argv0": mod_fname,
"run_name_in_sys_modules": True,
"module_in_sys_modules": True,
})
def create_ns(init_globals):
return run_module(mod_name, init_globals, alter_sys=alter_sys)
try:
if verbose > 1: print("Running from source:", mod_name)
self.check_code_execution(create_ns, expected_ns)
importlib.invalidate_caches()
__import__(mod_name)
os.remove(mod_fname)
if not sys.dont_write_bytecode:
make_legacy_pyc(mod_fname)
unload(mod_name) # In case loader caches paths
importlib.invalidate_caches()
if verbose > 1: print("Running from compiled:", mod_name)
self._fix_ns_for_legacy_pyc(expected_ns, alter_sys)
self.check_code_execution(create_ns, expected_ns)
finally:
self._del_pkg(pkg_dir)
if verbose > 1: print("Module executed successfully")
def _check_package(self, depth, alter_sys=False,
*, namespace=False, parent_namespaces=False):
pkg_dir, mod_fname, mod_name, mod_spec = (
self._make_pkg(example_source, depth, "__main__",
namespace=namespace,
parent_namespaces=parent_namespaces))
pkg_name = mod_name.rpartition(".")[0]
forget(mod_name)
expected_ns = example_namespace.copy()
expected_ns.update({
"__name__": mod_name,
"__file__": mod_fname,
"__cached__": importlib.util.cache_from_source(mod_fname),
"__package__": pkg_name,
"__spec__": mod_spec,
})
if alter_sys:
expected_ns.update({
"run_argv0": mod_fname,
"run_name_in_sys_modules": True,
"module_in_sys_modules": True,
})
def create_ns(init_globals):
return run_module(pkg_name, init_globals, alter_sys=alter_sys)
try:
if verbose > 1: print("Running from source:", pkg_name)
self.check_code_execution(create_ns, expected_ns)
importlib.invalidate_caches()
__import__(mod_name)
os.remove(mod_fname)
if not sys.dont_write_bytecode:
make_legacy_pyc(mod_fname)
unload(mod_name) # In case loader caches paths
if verbose > 1: print("Running from compiled:", pkg_name)
importlib.invalidate_caches()
self._fix_ns_for_legacy_pyc(expected_ns, alter_sys)
self.check_code_execution(create_ns, expected_ns)
finally:
self._del_pkg(pkg_dir)
if verbose > 1: print("Package executed successfully")
def _add_relative_modules(self, base_dir, source, depth):
if depth <= 1:
raise ValueError("Relative module test needs depth > 1")
pkg_name = "__runpy_pkg__"
module_dir = base_dir
for i in range(depth):
parent_dir = module_dir
module_dir = os.path.join(module_dir, pkg_name)
# Add sibling module
sibling_fname = os.path.join(module_dir, "sibling.py")
create_empty_file(sibling_fname)
if verbose > 1: print(" Added sibling module:", sibling_fname)
# Add nephew module
uncle_dir = os.path.join(parent_dir, "uncle")
self._add_pkg_dir(uncle_dir)
if verbose > 1: print(" Added uncle package:", uncle_dir)
cousin_dir = os.path.join(uncle_dir, "cousin")
self._add_pkg_dir(cousin_dir)
if verbose > 1: print(" Added cousin package:", cousin_dir)
nephew_fname = os.path.join(cousin_dir, "nephew.py")
create_empty_file(nephew_fname)
if verbose > 1: print(" Added nephew module:", nephew_fname)
def _check_relative_imports(self, depth, run_name=None):
contents = r"""\
from __future__ import absolute_import
from . import sibling
from ..uncle.cousin import nephew
"""
pkg_dir, mod_fname, mod_name, mod_spec = (
self._make_pkg(contents, depth))
if run_name is None:
expected_name = mod_name
else:
expected_name = run_name
try:
self._add_relative_modules(pkg_dir, contents, depth)
pkg_name = mod_name.rpartition('.')[0]
if verbose > 1: print("Running from source:", mod_name)
d1 = run_module(mod_name, run_name=run_name) # Read from source
self.assertEqual(d1["__name__"], expected_name)
self.assertEqual(d1["__package__"], pkg_name)
self.assertIn("sibling", d1)
self.assertIn("nephew", d1)
del d1 # Ensure __loader__ entry doesn't keep file open
importlib.invalidate_caches()
__import__(mod_name)
os.remove(mod_fname)
if not sys.dont_write_bytecode:
make_legacy_pyc(mod_fname)
unload(mod_name) # In case the loader caches paths
if verbose > 1: print("Running from compiled:", mod_name)
importlib.invalidate_caches()
d2 = run_module(mod_name, run_name=run_name) # Read from bytecode
self.assertEqual(d2["__name__"], expected_name)
self.assertEqual(d2["__package__"], pkg_name)
self.assertIn("sibling", d2)
self.assertIn("nephew", d2)
del d2 # Ensure __loader__ entry doesn't keep file open
finally:
self._del_pkg(pkg_dir)
if verbose > 1: print("Module executed successfully")
def test_run_module(self):
for depth in range(4):
if verbose > 1: print("Testing package depth:", depth)
self._check_module(depth)
def test_run_module_in_namespace_package(self):
for depth in range(1, 4):
if verbose > 1: print("Testing package depth:", depth)
self._check_module(depth, namespace=True, parent_namespaces=True)
def test_run_package(self):
for depth in range(1, 4):
if verbose > 1: print("Testing package depth:", depth)
self._check_package(depth)
def test_run_package_init_exceptions(self):
# These were previously wrapped in an ImportError; see Issue 14285
result = self._make_pkg("", 1, "__main__")
pkg_dir, _, mod_name, _ = result
mod_name = mod_name.replace(".__main__", "")
self.addCleanup(self._del_pkg, pkg_dir)
init = os.path.join(pkg_dir, "__runpy_pkg__", "__init__.py")
exceptions = (ImportError, AttributeError, TypeError, ValueError)
for exception in exceptions:
name = exception.__name__
with self.subTest(name):
source = "raise {0}('{0} in __init__.py.')".format(name)
with open(init, "wt", encoding="ascii") as mod_file:
mod_file.write(source)
try:
run_module(mod_name)
except exception as err:
self.assertNotIn("finding spec", format(err))
else:
self.fail("Nothing raised; expected {}".format(name))
try:
run_module(mod_name + ".submodule")
except exception as err:
self.assertNotIn("finding spec", format(err))
else:
self.fail("Nothing raised; expected {}".format(name))
def test_submodule_imported_warning(self):
pkg_dir, _, mod_name, _ = self._make_pkg("", 1)
try:
__import__(mod_name)
with self.assertWarnsRegex(RuntimeWarning,
r"found in sys\.modules"):
run_module(mod_name)
finally:
self._del_pkg(pkg_dir)
def test_package_imported_no_warning(self):
pkg_dir, _, mod_name, _ = self._make_pkg("", 1, "__main__")
self.addCleanup(self._del_pkg, pkg_dir)
package = mod_name.replace(".__main__", "")
# No warning should occur if we only imported the parent package
__import__(package)
self.assertIn(package, sys.modules)
with warnings.catch_warnings():
warnings.simplefilter("error", RuntimeWarning)
run_module(package)
# But the warning should occur if we imported the __main__ submodule
__import__(mod_name)
with self.assertWarnsRegex(RuntimeWarning, r"found in sys\.modules"):
run_module(package)
def test_run_package_in_namespace_package(self):
for depth in range(1, 4):
if verbose > 1: print("Testing package depth:", depth)
self._check_package(depth, parent_namespaces=True)
def test_run_namespace_package(self):
for depth in range(1, 4):
if verbose > 1: print("Testing package depth:", depth)
self._check_package(depth, namespace=True)
def test_run_namespace_package_in_namespace_package(self):
for depth in range(1, 4):
if verbose > 1: print("Testing package depth:", depth)
self._check_package(depth, namespace=True, parent_namespaces=True)
def test_run_module_alter_sys(self):
for depth in range(4):
if verbose > 1: print("Testing package depth:", depth)
self._check_module(depth, alter_sys=True)
def test_run_package_alter_sys(self):
for depth in range(1, 4):
if verbose > 1: print("Testing package depth:", depth)
self._check_package(depth, alter_sys=True)
def test_explicit_relative_import(self):
for depth in range(2, 5):
if verbose > 1: print("Testing relative imports at depth:", depth)
self._check_relative_imports(depth)
def test_main_relative_import(self):
for depth in range(2, 5):
if verbose > 1: print("Testing main relative imports at depth:", depth)
self._check_relative_imports(depth, "__main__")
def test_run_name(self):
depth = 1
run_name = "And now for something completely different"
pkg_dir, mod_fname, mod_name, mod_spec = (
self._make_pkg(example_source, depth))
forget(mod_name)
expected_ns = example_namespace.copy()
expected_ns.update({
"__name__": run_name,
"__file__": mod_fname,
"__cached__": importlib.util.cache_from_source(mod_fname),
"__package__": mod_name.rpartition(".")[0],
"__spec__": mod_spec,
})
def create_ns(init_globals):
return run_module(mod_name, init_globals, run_name)
try:
self.check_code_execution(create_ns, expected_ns)
finally:
self._del_pkg(pkg_dir)
def test_pkgutil_walk_packages(self):
# This is a dodgy hack to use the test_runpy infrastructure to test
# issue #15343. Issue #15348 declares this is indeed a dodgy hack ;)
import pkgutil
max_depth = 4
base_name = "__runpy_pkg__"
package_suffixes = ["uncle", "uncle.cousin"]
module_suffixes = ["uncle.cousin.nephew", base_name + ".sibling"]
expected_packages = set()
expected_modules = set()
for depth in range(1, max_depth):
pkg_name = ".".join([base_name] * depth)
expected_packages.add(pkg_name)
for name in package_suffixes:
expected_packages.add(pkg_name + "." + name)
for name in module_suffixes:
expected_modules.add(pkg_name + "." + name)
pkg_name = ".".join([base_name] * max_depth)
expected_packages.add(pkg_name)
expected_modules.add(pkg_name + ".runpy_test")
pkg_dir, mod_fname, mod_name, mod_spec = (
self._make_pkg("", max_depth))
self.addCleanup(self._del_pkg, pkg_dir)
for depth in range(2, max_depth+1):
self._add_relative_modules(pkg_dir, "", depth)
for moduleinfo in pkgutil.walk_packages([pkg_dir]):
self.assertIsInstance(moduleinfo, pkgutil.ModuleInfo)
self.assertIsInstance(moduleinfo.module_finder,
importlib.machinery.FileFinder)
if moduleinfo.ispkg:
expected_packages.remove(moduleinfo.name)
else:
expected_modules.remove(moduleinfo.name)
self.assertEqual(len(expected_packages), 0, expected_packages)
self.assertEqual(len(expected_modules), 0, expected_modules)
class RunPathTestCase(unittest.TestCase, CodeExecutionMixin):
"""Unit tests for runpy.run_path"""
def _make_test_script(self, script_dir, script_basename,
source=None, omit_suffix=False):
if source is None:
source = example_source
return make_script(script_dir, script_basename,
source, omit_suffix)
def _check_script(self, script_name, expected_name, expected_file,
expected_argv0, mod_name=None,
expect_spec=True, check_loader=True):
# First check is without run_name
def create_ns(init_globals):
return run_path(script_name, init_globals)
expected_ns = example_namespace.copy()
if mod_name is None:
spec_name = expected_name
else:
spec_name = mod_name
if expect_spec:
mod_spec = importlib.util.spec_from_file_location(spec_name,
expected_file)
mod_cached = mod_spec.cached
if not check_loader:
mod_spec.loader = None
else:
mod_spec = mod_cached = None
expected_ns.update({
"__name__": expected_name,
"__file__": expected_file,
"__cached__": mod_cached,
"__package__": "",
"__spec__": mod_spec,
"run_argv0": expected_argv0,
"run_name_in_sys_modules": True,
"module_in_sys_modules": True,
})
self.check_code_execution(create_ns, expected_ns)
# Second check makes sure run_name works in all cases
run_name = "prove.issue15230.is.fixed"
def create_ns(init_globals):
return run_path(script_name, init_globals, run_name)
if expect_spec and mod_name is None:
mod_spec = importlib.util.spec_from_file_location(run_name,
expected_file)
if not check_loader:
mod_spec.loader = None
expected_ns["__spec__"] = mod_spec
expected_ns["__name__"] = run_name
expected_ns["__package__"] = run_name.rpartition(".")[0]
self.check_code_execution(create_ns, expected_ns)
def _check_import_error(self, script_name, msg):
msg = re.escape(msg)
self.assertRaisesRegex(ImportError, msg, run_path, script_name)
def test_basic_script(self):
with temp_dir() as script_dir:
mod_name = 'script'
script_name = self._make_test_script(script_dir, mod_name)
self._check_script(script_name, "<run_path>", script_name,
script_name, expect_spec=False)
def test_basic_script_no_suffix(self):
with temp_dir() as script_dir:
mod_name = 'script'
script_name = self._make_test_script(script_dir, mod_name,
omit_suffix=True)
self._check_script(script_name, "<run_path>", script_name,
script_name, expect_spec=False)
def test_script_compiled(self):
with temp_dir() as script_dir:
mod_name = 'script'
script_name = self._make_test_script(script_dir, mod_name)
compiled_name = py_compile.compile(script_name, doraise=True)
os.remove(script_name)
self._check_script(compiled_name, "<run_path>", compiled_name,
compiled_name, expect_spec=False)
def test_directory(self):
with temp_dir() as script_dir:
mod_name = '__main__'
script_name = self._make_test_script(script_dir, mod_name)
self._check_script(script_dir, "<run_path>", script_name,
script_dir, mod_name=mod_name)
def test_directory_compiled(self):
with temp_dir() as script_dir:
mod_name = '__main__'
script_name = self._make_test_script(script_dir, mod_name)
compiled_name = py_compile.compile(script_name, doraise=True)
os.remove(script_name)
if not sys.dont_write_bytecode:
legacy_pyc = make_legacy_pyc(script_name)
self._check_script(script_dir, "<run_path>", legacy_pyc,
script_dir, mod_name=mod_name)
def test_directory_error(self):
with temp_dir() as script_dir:
mod_name = 'not_main'
script_name = self._make_test_script(script_dir, mod_name)
msg = "can't find '__main__' module in %r" % script_dir
self._check_import_error(script_dir, msg)
def test_zipfile(self):
with temp_dir() as script_dir:
mod_name = '__main__'
script_name = self._make_test_script(script_dir, mod_name)
zip_name, fname = make_zip_script(script_dir, 'test_zip', script_name)
self._check_script(zip_name, "<run_path>", fname, zip_name,
mod_name=mod_name, check_loader=False)
def test_zipfile_compiled(self):
with temp_dir() as script_dir:
mod_name = '__main__'
script_name = self._make_test_script(script_dir, mod_name)
compiled_name = py_compile.compile(script_name, doraise=True)
zip_name, fname = make_zip_script(script_dir, 'test_zip',
compiled_name)
self._check_script(zip_name, "<run_path>", fname, zip_name,
mod_name=mod_name, check_loader=False)
def test_zipfile_error(self):
with temp_dir() as script_dir:
mod_name = 'not_main'
script_name = self._make_test_script(script_dir, mod_name)
zip_name, fname = make_zip_script(script_dir, 'test_zip', script_name)
msg = "can't find '__main__' module in %r" % zip_name
self._check_import_error(zip_name, msg)
@no_tracing
def test_main_recursion_error(self):
with temp_dir() as script_dir, temp_dir() as dummy_dir:
mod_name = '__main__'
source = ("import runpy\n"
"runpy.run_path(%r)\n") % dummy_dir
script_name = self._make_test_script(script_dir, mod_name, source)
zip_name, fname = make_zip_script(script_dir, 'test_zip', script_name)
msg = "recursion depth exceeded"
self.assertRaisesRegex(RecursionError, msg, run_path, zip_name)
def test_encoding(self):
with temp_dir() as script_dir:
filename = os.path.join(script_dir, 'script.py')
with open(filename, 'w', encoding='latin1') as f:
f.write("""
#coding:latin1
s = "non-ASCII: h\xe9"
""")
result = run_path(filename)
self.assertEqual(result['s'], "non-ASCII: h\xe9")
if __name__ == "__main__":
unittest.main()
| 31,805 | 751 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_xdrlib.py | import unittest
import xdrlib
class XDRTest(unittest.TestCase):
def test_xdr(self):
p = xdrlib.Packer()
s = b'hello world'
a = [b'what', b'is', b'hapnin', b'doctor']
p.pack_int(42)
p.pack_int(-17)
p.pack_uint(9)
p.pack_bool(True)
p.pack_bool(False)
p.pack_uhyper(45)
p.pack_float(1.9)
p.pack_double(1.9)
p.pack_string(s)
p.pack_list(range(5), p.pack_uint)
p.pack_array(a, p.pack_string)
# now verify
data = p.get_buffer()
up = xdrlib.Unpacker(data)
self.assertEqual(up.get_position(), 0)
self.assertEqual(up.unpack_int(), 42)
self.assertEqual(up.unpack_int(), -17)
self.assertEqual(up.unpack_uint(), 9)
self.assertTrue(up.unpack_bool() is True)
# remember position
pos = up.get_position()
self.assertTrue(up.unpack_bool() is False)
# rewind and unpack again
up.set_position(pos)
self.assertTrue(up.unpack_bool() is False)
self.assertEqual(up.unpack_uhyper(), 45)
self.assertAlmostEqual(up.unpack_float(), 1.9)
self.assertAlmostEqual(up.unpack_double(), 1.9)
self.assertEqual(up.unpack_string(), s)
self.assertEqual(up.unpack_list(up.unpack_uint), list(range(5)))
self.assertEqual(up.unpack_array(up.unpack_string), a)
up.done()
self.assertRaises(EOFError, up.unpack_uint)
class ConversionErrorTest(unittest.TestCase):
def setUp(self):
self.packer = xdrlib.Packer()
def assertRaisesConversion(self, *args):
self.assertRaises(xdrlib.ConversionError, *args)
def test_pack_int(self):
self.assertRaisesConversion(self.packer.pack_int, 'string')
def test_pack_uint(self):
self.assertRaisesConversion(self.packer.pack_uint, 'string')
def test_float(self):
self.assertRaisesConversion(self.packer.pack_float, 'string')
def test_double(self):
self.assertRaisesConversion(self.packer.pack_double, 'string')
def test_uhyper(self):
self.assertRaisesConversion(self.packer.pack_uhyper, 'string')
if __name__ == "__main__":
unittest.main()
| 2,226 | 78 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/sample_doctest_no_doctests.py | """This is a sample module used for testing doctest.
This module is for testing how doctest handles a module with docstrings
but no doctest examples.
"""
class Foo(object):
"""A docstring with no doctest examples.
"""
def __init__(self):
pass
| 269 | 16 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_doctest.txt | This is a sample doctest in a text file.
In this example, we'll rely on a global variable being set for us
already:
>>> favorite_color
'blue'
We can make this fail by disabling the blank-line feature.
>>> if 1:
... print('a')
... print()
... print('b')
a
<BLANKLINE>
b
| 300 | 18 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_tarfile.py | import sys
import os
import io
from hashlib import md5
from contextlib import contextmanager
from random import Random
import pathlib
import unittest
import unittest.mock
import tarfile
from test import support
from test.support import script_helper
# Check for our compression modules.
try:
import gzip
except ImportError:
gzip = None
try:
import bz2
except ImportError:
bz2 = None
try:
import lzma
except ImportError:
lzma = None
if __name__ == 'PYOBJ.COM':
import gzip
import bz2
def md5sum(data):
return md5(data).hexdigest()
TEMPDIR = os.path.abspath(support.TESTFN) + "-tardir"
tarextdir = TEMPDIR + '-extract-test'
tarname = support.findfile("testtar.tar")
gzipname = os.path.join(TEMPDIR, "testtar.tar.gz")
bz2name = os.path.join(TEMPDIR, "testtar.tar.bz2")
xzname = os.path.join(TEMPDIR, "testtar.tar.xz")
tmpname = os.path.join(TEMPDIR, "tmp.tar")
dotlessname = os.path.join(TEMPDIR, "testtar")
md5_regtype = "65f477c818ad9e15f7feab0c6d37742f"
md5_sparse = "a54fbc4ca4f4399a90e1b27164012fc6"
class TarTest:
tarname = tarname
suffix = ''
open = io.FileIO
taropen = tarfile.TarFile.taropen
@property
def mode(self):
return self.prefix + self.suffix
@support.requires_gzip
class GzipTest:
tarname = gzipname
suffix = 'gz'
open = gzip.GzipFile if gzip else None
taropen = tarfile.TarFile.gzopen
@support.requires_bz2
class Bz2Test:
tarname = bz2name
suffix = 'bz2'
open = bz2.BZ2File if bz2 else None
taropen = tarfile.TarFile.bz2open
@support.requires_lzma
class LzmaTest:
tarname = xzname
suffix = 'xz'
open = lzma.LZMAFile if lzma else None
taropen = tarfile.TarFile.xzopen
class ReadTest(TarTest):
prefix = "r:"
def setUp(self):
self.tar = tarfile.open(self.tarname, mode=self.mode,
encoding="iso8859-1")
def tearDown(self):
self.tar.close()
class UstarReadTest(ReadTest, unittest.TestCase):
def test_fileobj_regular_file(self):
tarinfo = self.tar.getmember("ustar/regtype")
with self.tar.extractfile(tarinfo) as fobj:
data = fobj.read()
self.assertEqual(len(data), tarinfo.size,
"regular file extraction failed")
self.assertEqual(md5sum(data), md5_regtype,
"regular file extraction failed")
def test_fileobj_readlines(self):
self.tar.extract("ustar/regtype", TEMPDIR)
tarinfo = self.tar.getmember("ustar/regtype")
with open(os.path.join(TEMPDIR, "ustar/regtype"), "r") as fobj1:
lines1 = fobj1.readlines()
with self.tar.extractfile(tarinfo) as fobj:
fobj2 = io.TextIOWrapper(fobj)
lines2 = fobj2.readlines()
self.assertEqual(lines1, lines2,
"fileobj.readlines() failed")
self.assertEqual(len(lines2), 114,
"fileobj.readlines() failed")
self.assertEqual(lines2[83],
"I will gladly admit that Python is not the fastest "
"running scripting language.\n",
"fileobj.readlines() failed")
def test_fileobj_iter(self):
self.tar.extract("ustar/regtype", TEMPDIR)
tarinfo = self.tar.getmember("ustar/regtype")
with open(os.path.join(TEMPDIR, "ustar/regtype"), "r") as fobj1:
lines1 = fobj1.readlines()
with self.tar.extractfile(tarinfo) as fobj2:
lines2 = list(io.TextIOWrapper(fobj2))
self.assertEqual(lines1, lines2,
"fileobj.__iter__() failed")
def test_fileobj_seek(self):
self.tar.extract("ustar/regtype", TEMPDIR)
with open(os.path.join(TEMPDIR, "ustar/regtype"), "rb") as fobj:
data = fobj.read()
tarinfo = self.tar.getmember("ustar/regtype")
fobj = self.tar.extractfile(tarinfo)
text = fobj.read()
fobj.seek(0)
self.assertEqual(0, fobj.tell(),
"seek() to file's start failed")
fobj.seek(2048, 0)
self.assertEqual(2048, fobj.tell(),
"seek() to absolute position failed")
fobj.seek(-1024, 1)
self.assertEqual(1024, fobj.tell(),
"seek() to negative relative position failed")
fobj.seek(1024, 1)
self.assertEqual(2048, fobj.tell(),
"seek() to positive relative position failed")
s = fobj.read(10)
self.assertEqual(s, data[2048:2058],
"read() after seek failed")
fobj.seek(0, 2)
self.assertEqual(tarinfo.size, fobj.tell(),
"seek() to file's end failed")
self.assertEqual(fobj.read(), b"",
"read() at file's end did not return empty string")
fobj.seek(-tarinfo.size, 2)
self.assertEqual(0, fobj.tell(),
"relative seek() to file's end failed")
fobj.seek(512)
s1 = fobj.readlines()
fobj.seek(512)
s2 = fobj.readlines()
self.assertEqual(s1, s2,
"readlines() after seek failed")
fobj.seek(0)
self.assertEqual(len(fobj.readline()), fobj.tell(),
"tell() after readline() failed")
fobj.seek(512)
self.assertEqual(len(fobj.readline()) + 512, fobj.tell(),
"tell() after seek() and readline() failed")
fobj.seek(0)
line = fobj.readline()
self.assertEqual(fobj.read(), data[len(line):],
"read() after readline() failed")
fobj.close()
def test_fileobj_text(self):
with self.tar.extractfile("ustar/regtype") as fobj:
fobj = io.TextIOWrapper(fobj)
data = fobj.read().encode("iso8859-1")
self.assertEqual(md5sum(data), md5_regtype)
try:
fobj.seek(100)
except AttributeError:
# Issue #13815: seek() complained about a missing
# flush() method.
self.fail("seeking failed in text mode")
# Test if symbolic and hard links are resolved by extractfile(). The
# test link members each point to a regular member whose data is
# supposed to be exported.
def _test_fileobj_link(self, lnktype, regtype):
with self.tar.extractfile(lnktype) as a, \
self.tar.extractfile(regtype) as b:
self.assertEqual(a.name, b.name)
def test_fileobj_link1(self):
self._test_fileobj_link("ustar/lnktype", "ustar/regtype")
def test_fileobj_link2(self):
self._test_fileobj_link("./ustar/linktest2/lnktype",
"ustar/linktest1/regtype")
def test_fileobj_symlink1(self):
self._test_fileobj_link("ustar/symtype", "ustar/regtype")
def test_fileobj_symlink2(self):
self._test_fileobj_link("./ustar/linktest2/symtype",
"ustar/linktest1/regtype")
def test_issue14160(self):
self._test_fileobj_link("symtype2", "ustar/regtype")
class GzipUstarReadTest(GzipTest, UstarReadTest):
pass
class Bz2UstarReadTest(Bz2Test, UstarReadTest):
pass
class LzmaUstarReadTest(LzmaTest, UstarReadTest):
pass
class ListTest(ReadTest, unittest.TestCase):
# Override setUp to use default encoding (UTF-8)
def setUp(self):
self.tar = tarfile.open(self.tarname, mode=self.mode)
def test_list(self):
tio = io.TextIOWrapper(io.BytesIO(), 'utf-8', newline='\n')
with support.swap_attr(sys, 'stdout', tio):
self.tar.list(verbose=False)
out = tio.detach().getvalue()
self.assertIn(b'ustar/conttype', out)
self.assertIn(b'ustar/regtype', out)
self.assertIn(b'ustar/lnktype', out)
self.assertIn(b'ustar' + (b'/12345' * 40) + b'67/longname', out)
self.assertIn(b'./ustar/linktest2/symtype', out)
self.assertIn(b'./ustar/linktest2/lnktype', out)
# Make sure it puts trailing slash for directory
self.assertIn(b'ustar/dirtype/', out)
self.assertIn(b'ustar/dirtype-with-size/', out)
# Make sure it is able to print unencodable characters
def conv(b):
s = b.decode(self.tar.encoding, 'surrogateescape')
return s.encode('ascii', 'backslashreplace')
self.assertIn(conv(b'ustar/umlauts-\xc4\xd6\xdc\xe4\xf6\xfc\xdf'), out)
self.assertIn(conv(b'misc/regtype-hpux-signed-chksum-'
b'\xc4\xd6\xdc\xe4\xf6\xfc\xdf'), out)
self.assertIn(conv(b'misc/regtype-old-v7-signed-chksum-'
b'\xc4\xd6\xdc\xe4\xf6\xfc\xdf'), out)
self.assertIn(conv(b'pax/bad-pax-\xe4\xf6\xfc'), out)
self.assertIn(conv(b'pax/hdrcharset-\xe4\xf6\xfc'), out)
# Make sure it prints files separated by one newline without any
# 'ls -l'-like accessories if verbose flag is not being used
# ...
# ustar/conttype
# ustar/regtype
# ...
self.assertRegex(out, br'ustar/conttype ?\r?\n'
br'ustar/regtype ?\r?\n')
# Make sure it does not print the source of link without verbose flag
self.assertNotIn(b'link to', out)
self.assertNotIn(b'->', out)
def test_list_verbose(self):
tio = io.TextIOWrapper(io.BytesIO(), 'utf-8', newline='\n')
with support.swap_attr(sys, 'stdout', tio):
self.tar.list(verbose=True)
out = tio.detach().getvalue()
# Make sure it prints files separated by one newline with 'ls -l'-like
# accessories if verbose flag is being used
# ...
# ?rw-r--r-- tarfile/tarfile 7011 2003-01-06 07:19:43 ustar/conttype
# ?rw-r--r-- tarfile/tarfile 7011 2003-01-06 07:19:43 ustar/regtype
# ...
self.assertRegex(out, (br'\?rw-r--r-- tarfile/tarfile\s+7011 '
br'\d{4}-\d\d-\d\d\s+\d\d:\d\d:\d\d '
br'ustar/\w+type ?\r?\n') * 2)
# Make sure it prints the source of link with verbose flag
self.assertIn(b'ustar/symtype -> regtype', out)
self.assertIn(b'./ustar/linktest2/symtype -> ../linktest1/regtype', out)
self.assertIn(b'./ustar/linktest2/lnktype link to '
b'./ustar/linktest1/regtype', out)
self.assertIn(b'gnu' + (b'/123' * 125) + b'/longlink link to gnu' +
(b'/123' * 125) + b'/longname', out)
self.assertIn(b'pax' + (b'/123' * 125) + b'/longlink link to pax' +
(b'/123' * 125) + b'/longname', out)
def test_list_members(self):
tio = io.TextIOWrapper(io.BytesIO(), 'utf-8', newline='\n')
def members(tar):
for tarinfo in tar.getmembers():
if 'reg' in tarinfo.name:
yield tarinfo
with support.swap_attr(sys, 'stdout', tio):
self.tar.list(verbose=False, members=members(self.tar))
out = tio.detach().getvalue()
self.assertIn(b'ustar/regtype', out)
self.assertNotIn(b'ustar/conttype', out)
class GzipListTest(GzipTest, ListTest):
pass
class Bz2ListTest(Bz2Test, ListTest):
pass
class LzmaListTest(LzmaTest, ListTest):
pass
class CommonReadTest(ReadTest):
def test_empty_tarfile(self):
# Test for issue6123: Allow opening empty archives.
# This test checks if tarfile.open() is able to open an empty tar
# archive successfully. Note that an empty tar archive is not the
# same as an empty file!
with tarfile.open(tmpname, self.mode.replace("r", "w")):
pass
try:
tar = tarfile.open(tmpname, self.mode)
tar.getnames()
except tarfile.ReadError:
self.fail("tarfile.open() failed on empty archive")
else:
self.assertListEqual(tar.getmembers(), [])
finally:
tar.close()
def test_non_existent_tarfile(self):
# Test for issue11513: prevent non-existent gzipped tarfiles raising
# multiple exceptions.
with self.assertRaisesRegex(FileNotFoundError, "xxx"):
tarfile.open("xxx", self.mode)
def test_null_tarfile(self):
# Test for issue6123: Allow opening empty archives.
# This test guarantees that tarfile.open() does not treat an empty
# file as an empty tar archive.
with open(tmpname, "wb"):
pass
self.assertRaises(tarfile.ReadError, tarfile.open, tmpname, self.mode)
self.assertRaises(tarfile.ReadError, tarfile.open, tmpname)
def test_ignore_zeros(self):
# Test TarFile's ignore_zeros option.
# generate 512 pseudorandom bytes
data = Random(0).getrandbits(512*8).to_bytes(512, 'big')
for char in (b'\0', b'a'):
# Test if EOFHeaderError ('\0') and InvalidHeaderError ('a')
# are ignored correctly.
with self.open(tmpname, "w") as fobj:
fobj.write(char * 1024)
tarinfo = tarfile.TarInfo("foo")
tarinfo.size = len(data)
fobj.write(tarinfo.tobuf())
fobj.write(data)
tar = tarfile.open(tmpname, mode="r", ignore_zeros=True)
try:
self.assertListEqual(tar.getnames(), ["foo"],
"ignore_zeros=True should have skipped the %r-blocks" %
char)
finally:
tar.close()
def test_premature_end_of_archive(self):
for size in (512, 600, 1024, 1200):
with tarfile.open(tmpname, "w:") as tar:
t = tarfile.TarInfo("foo")
t.size = 1024
tar.addfile(t, io.BytesIO(b"a" * 1024))
with open(tmpname, "r+b") as fobj:
fobj.truncate(size)
with tarfile.open(tmpname) as tar:
with self.assertRaisesRegex(tarfile.ReadError, "unexpected end of data"):
for t in tar:
pass
with tarfile.open(tmpname) as tar:
t = tar.next()
with self.assertRaisesRegex(tarfile.ReadError, "unexpected end of data"):
tar.extract(t, TEMPDIR)
with self.assertRaisesRegex(tarfile.ReadError, "unexpected end of data"):
tar.extractfile(t).read()
def test_length_zero_header(self):
# bpo-39017 (CVE-2019-20907): reading a zero-length header should fail
# with an exception
with self.assertRaisesRegex(tarfile.ReadError, "file could not be opened successfully"):
with tarfile.open(support.findfile('recursion.tar')) as tar:
pass
class MiscReadTestBase(CommonReadTest):
def requires_name_attribute(self):
pass
def test_no_name_argument(self):
self.requires_name_attribute()
with open(self.tarname, "rb") as fobj:
self.assertIsInstance(fobj.name, str)
with tarfile.open(fileobj=fobj, mode=self.mode) as tar:
self.assertIsInstance(tar.name, str)
self.assertEqual(tar.name, os.path.abspath(fobj.name))
def test_no_name_attribute(self):
with open(self.tarname, "rb") as fobj:
data = fobj.read()
fobj = io.BytesIO(data)
self.assertRaises(AttributeError, getattr, fobj, "name")
tar = tarfile.open(fileobj=fobj, mode=self.mode)
self.assertIsNone(tar.name)
def test_empty_name_attribute(self):
with open(self.tarname, "rb") as fobj:
data = fobj.read()
fobj = io.BytesIO(data)
fobj.name = ""
with tarfile.open(fileobj=fobj, mode=self.mode) as tar:
self.assertIsNone(tar.name)
def test_int_name_attribute(self):
# Issue 21044: tarfile.open() should handle fileobj with an integer
# 'name' attribute.
fd = os.open(self.tarname, os.O_RDONLY)
with open(fd, 'rb') as fobj:
self.assertIsInstance(fobj.name, int)
with tarfile.open(fileobj=fobj, mode=self.mode) as tar:
self.assertIsNone(tar.name)
def test_bytes_name_attribute(self):
self.requires_name_attribute()
tarname = os.fsencode(self.tarname)
with open(tarname, 'rb') as fobj:
self.assertIsInstance(fobj.name, bytes)
with tarfile.open(fileobj=fobj, mode=self.mode) as tar:
self.assertIsInstance(tar.name, bytes)
self.assertEqual(tar.name, os.path.abspath(fobj.name))
def test_pathlike_name(self):
tarname = pathlib.Path(self.tarname)
with tarfile.open(tarname, mode=self.mode) as tar:
self.assertIsInstance(tar.name, str)
self.assertEqual(tar.name, os.path.abspath(os.fspath(tarname)))
with self.taropen(tarname) as tar:
self.assertIsInstance(tar.name, str)
self.assertEqual(tar.name, os.path.abspath(os.fspath(tarname)))
with tarfile.TarFile.open(tarname, mode=self.mode) as tar:
self.assertIsInstance(tar.name, str)
self.assertEqual(tar.name, os.path.abspath(os.fspath(tarname)))
if self.suffix == '':
with tarfile.TarFile(tarname, mode='r') as tar:
self.assertIsInstance(tar.name, str)
self.assertEqual(tar.name, os.path.abspath(os.fspath(tarname)))
def test_illegal_mode_arg(self):
with open(tmpname, 'wb'):
pass
with self.assertRaisesRegex(ValueError, 'mode must be '):
tar = self.taropen(tmpname, 'q')
with self.assertRaisesRegex(ValueError, 'mode must be '):
tar = self.taropen(tmpname, 'rw')
with self.assertRaisesRegex(ValueError, 'mode must be '):
tar = self.taropen(tmpname, '')
def test_fileobj_with_offset(self):
# Skip the first member and store values from the second member
# of the testtar.
tar = tarfile.open(self.tarname, mode=self.mode)
try:
tar.next()
t = tar.next()
name = t.name
offset = t.offset
with tar.extractfile(t) as f:
data = f.read()
finally:
tar.close()
# Open the testtar and seek to the offset of the second member.
with self.open(self.tarname) as fobj:
fobj.seek(offset)
# Test if the tarfile starts with the second member.
tar = tar.open(self.tarname, mode="r:", fileobj=fobj)
t = tar.next()
self.assertEqual(t.name, name)
# Read to the end of fileobj and test if seeking back to the
# beginning works.
tar.getmembers()
self.assertEqual(tar.extractfile(t).read(), data,
"seek back did not work")
tar.close()
def test_fail_comp(self):
# For Gzip and Bz2 Tests: fail with a ReadError on an uncompressed file.
self.assertRaises(tarfile.ReadError, tarfile.open, tarname, self.mode)
with open(tarname, "rb") as fobj:
self.assertRaises(tarfile.ReadError, tarfile.open,
fileobj=fobj, mode=self.mode)
def test_v7_dirtype(self):
# Test old style dirtype member (bug #1336623):
# Old V7 tars create directory members using an AREGTYPE
# header with a "/" appended to the filename field.
tarinfo = self.tar.getmember("misc/dirtype-old-v7")
self.assertEqual(tarinfo.type, tarfile.DIRTYPE,
"v7 dirtype failed")
def test_xstar_type(self):
# The xstar format stores extra atime and ctime fields inside the
# space reserved for the prefix field. The prefix field must be
# ignored in this case, otherwise it will mess up the name.
try:
self.tar.getmember("misc/regtype-xstar")
except KeyError:
self.fail("failed to find misc/regtype-xstar (mangled prefix?)")
def test_check_members(self):
for tarinfo in self.tar:
self.assertEqual(int(tarinfo.mtime), 0o7606136617,
"wrong mtime for %s" % tarinfo.name)
if not tarinfo.name.startswith("ustar/"):
continue
self.assertEqual(tarinfo.uname, "tarfile",
"wrong uname for %s" % tarinfo.name)
def test_find_members(self):
self.assertEqual(self.tar.getmembers()[-1].name, "misc/eof",
"could not find all members")
@unittest.skipUnless(hasattr(os, "link"),
"Missing hardlink implementation")
@support.skip_unless_symlink
def test_extract_hardlink(self):
# Test hardlink extraction (e.g. bug #857297).
with tarfile.open(tarname, errorlevel=1, encoding="iso8859-1") as tar:
tar.extract("ustar/regtype", TEMPDIR)
self.addCleanup(support.unlink, os.path.join(TEMPDIR, "ustar/regtype"))
tar.extract("ustar/lnktype", TEMPDIR)
self.addCleanup(support.unlink, os.path.join(TEMPDIR, "ustar/lnktype"))
with open(os.path.join(TEMPDIR, "ustar/lnktype"), "rb") as f:
data = f.read()
self.assertEqual(md5sum(data), md5_regtype)
tar.extract("ustar/symtype", TEMPDIR)
self.addCleanup(support.unlink, os.path.join(TEMPDIR, "ustar/symtype"))
with open(os.path.join(TEMPDIR, "ustar/symtype"), "rb") as f:
data = f.read()
self.assertEqual(md5sum(data), md5_regtype)
def test_extractall(self):
# Test if extractall() correctly restores directory permissions
# and times (see issue1735).
tar = tarfile.open(tarname, encoding="iso8859-1")
DIR = os.path.join(TEMPDIR, "extractall")
os.mkdir(DIR)
try:
directories = [t for t in tar if t.isdir()]
tar.extractall(DIR, directories)
for tarinfo in directories:
path = os.path.join(DIR, tarinfo.name)
if sys.platform != "win32":
# Win32 has no support for fine grained permissions.
self.assertEqual(tarinfo.mode & 0o777,
os.stat(path).st_mode & 0o777)
def format_mtime(mtime):
if isinstance(mtime, float):
return "{} ({})".format(mtime, mtime.hex())
else:
return "{!r} (int)".format(mtime)
file_mtime = os.path.getmtime(path)
errmsg = "tar mtime {0} != file time {1} of path {2!a}".format(
format_mtime(tarinfo.mtime),
format_mtime(file_mtime),
path)
self.assertEqual(tarinfo.mtime, file_mtime, errmsg)
finally:
tar.close()
support.rmtree(DIR)
def test_extract_directory(self):
dirtype = "ustar/dirtype"
DIR = os.path.join(TEMPDIR, "extractdir")
os.mkdir(DIR)
try:
with tarfile.open(tarname, encoding="iso8859-1") as tar:
tarinfo = tar.getmember(dirtype)
tar.extract(tarinfo, path=DIR)
extracted = os.path.join(DIR, dirtype)
self.assertEqual(os.path.getmtime(extracted), tarinfo.mtime)
if sys.platform != "win32":
self.assertEqual(os.stat(extracted).st_mode & 0o777, 0o755)
finally:
support.rmtree(DIR)
def test_extractall_pathlike_name(self):
DIR = pathlib.Path(TEMPDIR) / "extractall"
with support.temp_dir(DIR), \
tarfile.open(tarname, encoding="iso8859-1") as tar:
directories = [t for t in tar if t.isdir()]
tar.extractall(DIR, directories)
for tarinfo in directories:
path = DIR / tarinfo.name
self.assertEqual(os.path.getmtime(path), tarinfo.mtime)
def test_extract_pathlike_name(self):
dirtype = "ustar/dirtype"
DIR = pathlib.Path(TEMPDIR) / "extractall"
with support.temp_dir(DIR), \
tarfile.open(tarname, encoding="iso8859-1") as tar:
tarinfo = tar.getmember(dirtype)
tar.extract(tarinfo, path=DIR)
extracted = DIR / dirtype
self.assertEqual(os.path.getmtime(extracted), tarinfo.mtime)
def test_init_close_fobj(self):
# Issue #7341: Close the internal file object in the TarFile
# constructor in case of an error. For the test we rely on
# the fact that opening an empty file raises a ReadError.
empty = os.path.join(TEMPDIR, "empty")
with open(empty, "wb") as fobj:
fobj.write(b"")
try:
tar = object.__new__(tarfile.TarFile)
try:
tar.__init__(empty)
except tarfile.ReadError:
self.assertTrue(tar.fileobj.closed)
else:
self.fail("ReadError not raised")
finally:
support.unlink(empty)
def test_parallel_iteration(self):
# Issue #16601: Restarting iteration over tarfile continued
# from where it left off.
with tarfile.open(self.tarname) as tar:
for m1, m2 in zip(tar, tar):
self.assertEqual(m1.offset, m2.offset)
self.assertEqual(m1.get_info(), m2.get_info())
class MiscReadTest(MiscReadTestBase, unittest.TestCase):
test_fail_comp = None
class GzipMiscReadTest(GzipTest, MiscReadTestBase, unittest.TestCase):
pass
class Bz2MiscReadTest(Bz2Test, MiscReadTestBase, unittest.TestCase):
def requires_name_attribute(self):
self.skipTest("BZ2File have no name attribute")
class LzmaMiscReadTest(LzmaTest, MiscReadTestBase, unittest.TestCase):
def requires_name_attribute(self):
self.skipTest("LZMAFile have no name attribute")
class StreamReadTest(CommonReadTest, unittest.TestCase):
prefix="r|"
def test_read_through(self):
# Issue #11224: A poorly designed _FileInFile.read() method
# caused seeking errors with stream tar files.
for tarinfo in self.tar:
if not tarinfo.isreg():
continue
with self.tar.extractfile(tarinfo) as fobj:
while True:
try:
buf = fobj.read(512)
except tarfile.StreamError:
self.fail("simple read-through using "
"TarFile.extractfile() failed")
if not buf:
break
def test_fileobj_regular_file(self):
tarinfo = self.tar.next() # get "regtype" (can't use getmember)
with self.tar.extractfile(tarinfo) as fobj:
data = fobj.read()
self.assertEqual(len(data), tarinfo.size,
"regular file extraction failed")
self.assertEqual(md5sum(data), md5_regtype,
"regular file extraction failed")
def test_provoke_stream_error(self):
tarinfos = self.tar.getmembers()
with self.tar.extractfile(tarinfos[0]) as f: # read the first member
self.assertRaises(tarfile.StreamError, f.read)
def test_compare_members(self):
tar1 = tarfile.open(tarname, encoding="iso8859-1")
try:
tar2 = self.tar
while True:
t1 = tar1.next()
t2 = tar2.next()
if t1 is None:
break
self.assertIsNotNone(t2, "stream.next() failed.")
if t2.islnk() or t2.issym():
with self.assertRaises(tarfile.StreamError):
tar2.extractfile(t2)
continue
v1 = tar1.extractfile(t1)
v2 = tar2.extractfile(t2)
if v1 is None:
continue
self.assertIsNotNone(v2, "stream.extractfile() failed")
self.assertEqual(v1.read(), v2.read(),
"stream extraction failed")
finally:
tar1.close()
class GzipStreamReadTest(GzipTest, StreamReadTest):
pass
class Bz2StreamReadTest(Bz2Test, StreamReadTest):
pass
class LzmaStreamReadTest(LzmaTest, StreamReadTest):
pass
class DetectReadTest(TarTest, unittest.TestCase):
def _testfunc_file(self, name, mode):
try:
tar = tarfile.open(name, mode)
except tarfile.ReadError as e:
self.fail()
else:
tar.close()
def _testfunc_fileobj(self, name, mode):
try:
with open(name, "rb") as f:
tar = tarfile.open(name, mode, fileobj=f)
except tarfile.ReadError as e:
self.fail()
else:
tar.close()
def _test_modes(self, testfunc):
if self.suffix:
with self.assertRaises(tarfile.ReadError):
tarfile.open(tarname, mode="r:" + self.suffix)
with self.assertRaises(tarfile.ReadError):
tarfile.open(tarname, mode="r|" + self.suffix)
with self.assertRaises(tarfile.ReadError):
tarfile.open(self.tarname, mode="r:")
with self.assertRaises(tarfile.ReadError):
tarfile.open(self.tarname, mode="r|")
testfunc(self.tarname, "r")
testfunc(self.tarname, "r:" + self.suffix)
testfunc(self.tarname, "r:*")
testfunc(self.tarname, "r|" + self.suffix)
testfunc(self.tarname, "r|*")
def test_detect_file(self):
self._test_modes(self._testfunc_file)
def test_detect_fileobj(self):
self._test_modes(self._testfunc_fileobj)
class GzipDetectReadTest(GzipTest, DetectReadTest):
pass
class Bz2DetectReadTest(Bz2Test, DetectReadTest):
def test_detect_stream_bz2(self):
# Originally, tarfile's stream detection looked for the string
# "BZh91" at the start of the file. This is incorrect because
# the '9' represents the blocksize (900kB). If the file was
# compressed using another blocksize autodetection fails.
with open(tarname, "rb") as fobj:
data = fobj.read()
# Compress with blocksize 100kB, the file starts with "BZh11".
with bz2.BZ2File(tmpname, "wb", compresslevel=1) as fobj:
fobj.write(data)
self._testfunc_file(tmpname, "r|*")
class LzmaDetectReadTest(LzmaTest, DetectReadTest):
pass
class MemberReadTest(ReadTest, unittest.TestCase):
def _test_member(self, tarinfo, chksum=None, **kwargs):
if chksum is not None:
with self.tar.extractfile(tarinfo) as f:
self.assertEqual(md5sum(f.read()), chksum,
"wrong md5sum for %s" % tarinfo.name)
kwargs["mtime"] = 0o7606136617
kwargs["uid"] = 1000
kwargs["gid"] = 100
if "old-v7" not in tarinfo.name:
# V7 tar can't handle alphabetic owners.
kwargs["uname"] = "tarfile"
kwargs["gname"] = "tarfile"
for k, v in kwargs.items():
self.assertEqual(getattr(tarinfo, k), v,
"wrong value in %s field of %s" % (k, tarinfo.name))
def test_find_regtype(self):
tarinfo = self.tar.getmember("ustar/regtype")
self._test_member(tarinfo, size=7011, chksum=md5_regtype)
def test_find_conttype(self):
tarinfo = self.tar.getmember("ustar/conttype")
self._test_member(tarinfo, size=7011, chksum=md5_regtype)
def test_find_dirtype(self):
tarinfo = self.tar.getmember("ustar/dirtype")
self._test_member(tarinfo, size=0)
def test_find_dirtype_with_size(self):
tarinfo = self.tar.getmember("ustar/dirtype-with-size")
self._test_member(tarinfo, size=255)
def test_find_lnktype(self):
tarinfo = self.tar.getmember("ustar/lnktype")
self._test_member(tarinfo, size=0, linkname="ustar/regtype")
def test_find_symtype(self):
tarinfo = self.tar.getmember("ustar/symtype")
self._test_member(tarinfo, size=0, linkname="regtype")
def test_find_blktype(self):
tarinfo = self.tar.getmember("ustar/blktype")
self._test_member(tarinfo, size=0, devmajor=3, devminor=0)
def test_find_chrtype(self):
tarinfo = self.tar.getmember("ustar/chrtype")
self._test_member(tarinfo, size=0, devmajor=1, devminor=3)
def test_find_fifotype(self):
tarinfo = self.tar.getmember("ustar/fifotype")
self._test_member(tarinfo, size=0)
def test_find_sparse(self):
tarinfo = self.tar.getmember("ustar/sparse")
self._test_member(tarinfo, size=86016, chksum=md5_sparse)
def test_find_gnusparse(self):
tarinfo = self.tar.getmember("gnu/sparse")
self._test_member(tarinfo, size=86016, chksum=md5_sparse)
def test_find_gnusparse_00(self):
tarinfo = self.tar.getmember("gnu/sparse-0.0")
self._test_member(tarinfo, size=86016, chksum=md5_sparse)
def test_find_gnusparse_01(self):
tarinfo = self.tar.getmember("gnu/sparse-0.1")
self._test_member(tarinfo, size=86016, chksum=md5_sparse)
def test_find_gnusparse_10(self):
tarinfo = self.tar.getmember("gnu/sparse-1.0")
self._test_member(tarinfo, size=86016, chksum=md5_sparse)
def test_find_umlauts(self):
tarinfo = self.tar.getmember("ustar/umlauts-"
"\xc4\xd6\xdc\xe4\xf6\xfc\xdf")
self._test_member(tarinfo, size=7011, chksum=md5_regtype)
def test_find_ustar_longname(self):
name = "ustar/" + "12345/" * 39 + "1234567/longname"
self.assertIn(name, self.tar.getnames())
def test_find_regtype_oldv7(self):
tarinfo = self.tar.getmember("misc/regtype-old-v7")
self._test_member(tarinfo, size=7011, chksum=md5_regtype)
def test_find_pax_umlauts(self):
self.tar.close()
self.tar = tarfile.open(self.tarname, mode=self.mode,
encoding="iso8859-1")
tarinfo = self.tar.getmember("pax/umlauts-"
"\xc4\xd6\xdc\xe4\xf6\xfc\xdf")
self._test_member(tarinfo, size=7011, chksum=md5_regtype)
class LongnameTest:
def test_read_longname(self):
# Test reading of longname (bug #1471427).
longname = self.subdir + "/" + "123/" * 125 + "longname"
try:
tarinfo = self.tar.getmember(longname)
except KeyError:
self.fail("longname not found")
self.assertNotEqual(tarinfo.type, tarfile.DIRTYPE,
"read longname as dirtype")
def test_read_longlink(self):
longname = self.subdir + "/" + "123/" * 125 + "longname"
longlink = self.subdir + "/" + "123/" * 125 + "longlink"
try:
tarinfo = self.tar.getmember(longlink)
except KeyError:
self.fail("longlink not found")
self.assertEqual(tarinfo.linkname, longname, "linkname wrong")
def test_truncated_longname(self):
longname = self.subdir + "/" + "123/" * 125 + "longname"
tarinfo = self.tar.getmember(longname)
offset = tarinfo.offset
self.tar.fileobj.seek(offset)
fobj = io.BytesIO(self.tar.fileobj.read(3 * 512))
with self.assertRaises(tarfile.ReadError):
tarfile.open(name="foo.tar", fileobj=fobj)
def test_header_offset(self):
# Test if the start offset of the TarInfo object includes
# the preceding extended header.
longname = self.subdir + "/" + "123/" * 125 + "longname"
offset = self.tar.getmember(longname).offset
with open(tarname, "rb") as fobj:
fobj.seek(offset)
tarinfo = tarfile.TarInfo.frombuf(fobj.read(512),
"iso8859-1", "strict")
self.assertEqual(tarinfo.type, self.longnametype)
class GNUReadTest(LongnameTest, ReadTest, unittest.TestCase):
subdir = "gnu"
longnametype = tarfile.GNUTYPE_LONGNAME
# Since 3.2 tarfile is supposed to accurately restore sparse members and
# produce files with holes. This is what we actually want to test here.
# Unfortunately, not all platforms/filesystems support sparse files, and
# even on platforms that do it is non-trivial to make reliable assertions
# about holes in files. Therefore, we first do one basic test which works
# an all platforms, and after that a test that will work only on
# platforms/filesystems that prove to support sparse files.
def _test_sparse_file(self, name):
self.tar.extract(name, TEMPDIR)
filename = os.path.join(TEMPDIR, name)
with open(filename, "rb") as fobj:
data = fobj.read()
self.assertEqual(md5sum(data), md5_sparse,
"wrong md5sum for %s" % name)
if self._fs_supports_holes():
s = os.stat(filename)
self.assertLess(s.st_blocks * 512, s.st_size)
def test_sparse_file_old(self):
self._test_sparse_file("gnu/sparse")
def test_sparse_file_00(self):
self._test_sparse_file("gnu/sparse-0.0")
def test_sparse_file_01(self):
self._test_sparse_file("gnu/sparse-0.1")
def test_sparse_file_10(self):
self._test_sparse_file("gnu/sparse-1.0")
@staticmethod
def _fs_supports_holes():
# Return True if the platform knows the st_blocks stat attribute and
# uses st_blocks units of 512 bytes, and if the filesystem is able to
# store holes in files.
if sys.platform.startswith("linux"):
# Linux evidentially has 512 byte st_blocks units.
name = os.path.join(TEMPDIR, "sparse-test")
with open(name, "wb") as fobj:
fobj.seek(4096)
fobj.truncate()
s = os.stat(name)
support.unlink(name)
return s.st_blocks == 0
else:
return False
class PaxReadTest(LongnameTest, ReadTest, unittest.TestCase):
subdir = "pax"
longnametype = tarfile.XHDTYPE
def test_pax_global_headers(self):
tar = tarfile.open(tarname, encoding="iso8859-1")
try:
tarinfo = tar.getmember("pax/regtype1")
self.assertEqual(tarinfo.uname, "foo")
self.assertEqual(tarinfo.gname, "bar")
self.assertEqual(tarinfo.pax_headers.get("VENDOR.umlauts"),
"\xc4\xd6\xdc\xe4\xf6\xfc\xdf")
tarinfo = tar.getmember("pax/regtype2")
self.assertEqual(tarinfo.uname, "")
self.assertEqual(tarinfo.gname, "bar")
self.assertEqual(tarinfo.pax_headers.get("VENDOR.umlauts"),
"\xc4\xd6\xdc\xe4\xf6\xfc\xdf")
tarinfo = tar.getmember("pax/regtype3")
self.assertEqual(tarinfo.uname, "tarfile")
self.assertEqual(tarinfo.gname, "tarfile")
self.assertEqual(tarinfo.pax_headers.get("VENDOR.umlauts"),
"\xc4\xd6\xdc\xe4\xf6\xfc\xdf")
finally:
tar.close()
def test_pax_number_fields(self):
# All following number fields are read from the pax header.
tar = tarfile.open(tarname, encoding="iso8859-1")
try:
tarinfo = tar.getmember("pax/regtype4")
self.assertEqual(tarinfo.size, 7011)
self.assertEqual(tarinfo.uid, 123)
self.assertEqual(tarinfo.gid, 123)
self.assertEqual(tarinfo.mtime, 1041808783.0)
self.assertEqual(type(tarinfo.mtime), float)
self.assertEqual(float(tarinfo.pax_headers["atime"]), 1041808783.0)
self.assertEqual(float(tarinfo.pax_headers["ctime"]), 1041808783.0)
finally:
tar.close()
class WriteTestBase(TarTest):
# Put all write tests in here that are supposed to be tested
# in all possible mode combinations.
def test_fileobj_no_close(self):
fobj = io.BytesIO()
tar = tarfile.open(fileobj=fobj, mode=self.mode)
tar.addfile(tarfile.TarInfo("foo"))
tar.close()
self.assertFalse(fobj.closed, "external fileobjs must never closed")
# Issue #20238: Incomplete gzip output with mode="w:gz"
data = fobj.getvalue()
del tar
support.gc_collect()
self.assertFalse(fobj.closed)
self.assertEqual(data, fobj.getvalue())
def test_eof_marker(self):
# Make sure an end of archive marker is written (two zero blocks).
# tarfile insists on aligning archives to a 20 * 512 byte recordsize.
# So, we create an archive that has exactly 10240 bytes without the
# marker, and has 20480 bytes once the marker is written.
with tarfile.open(tmpname, self.mode) as tar:
t = tarfile.TarInfo("foo")
t.size = tarfile.RECORDSIZE - tarfile.BLOCKSIZE
tar.addfile(t, io.BytesIO(b"a" * t.size))
with self.open(tmpname, "rb") as fobj:
self.assertEqual(len(fobj.read()), tarfile.RECORDSIZE * 2)
class WriteTest(WriteTestBase, unittest.TestCase):
prefix = "w:"
def test_100_char_name(self):
# The name field in a tar header stores strings of at most 100 chars.
# If a string is shorter than 100 chars it has to be padded with '\0',
# which implies that a string of exactly 100 chars is stored without
# a trailing '\0'.
name = "0123456789" * 10
tar = tarfile.open(tmpname, self.mode)
try:
t = tarfile.TarInfo(name)
tar.addfile(t)
finally:
tar.close()
tar = tarfile.open(tmpname)
try:
self.assertEqual(tar.getnames()[0], name,
"failed to store 100 char filename")
finally:
tar.close()
def test_tar_size(self):
# Test for bug #1013882.
tar = tarfile.open(tmpname, self.mode)
try:
path = os.path.join(TEMPDIR, "file")
with open(path, "wb") as fobj:
fobj.write(b"aaa")
tar.add(path)
finally:
tar.close()
self.assertGreater(os.path.getsize(tmpname), 0,
"tarfile is empty")
# The test_*_size tests test for bug #1167128.
def test_file_size(self):
tar = tarfile.open(tmpname, self.mode)
try:
path = os.path.join(TEMPDIR, "file")
with open(path, "wb"):
pass
tarinfo = tar.gettarinfo(path)
self.assertEqual(tarinfo.size, 0)
with open(path, "wb") as fobj:
fobj.write(b"aaa")
tarinfo = tar.gettarinfo(path)
self.assertEqual(tarinfo.size, 3)
finally:
tar.close()
def test_directory_size(self):
path = os.path.join(TEMPDIR, "directory")
os.mkdir(path)
try:
tar = tarfile.open(tmpname, self.mode)
try:
tarinfo = tar.gettarinfo(path)
self.assertEqual(tarinfo.size, 0)
finally:
tar.close()
finally:
support.rmdir(path)
def test_gettarinfo_pathlike_name(self):
with tarfile.open(tmpname, self.mode) as tar:
path = pathlib.Path(TEMPDIR) / "file"
with open(path, "wb") as fobj:
fobj.write(b"aaa")
tarinfo = tar.gettarinfo(path)
tarinfo2 = tar.gettarinfo(os.fspath(path))
self.assertIsInstance(tarinfo.name, str)
self.assertEqual(tarinfo.name, tarinfo2.name)
self.assertEqual(tarinfo.size, 3)
@unittest.skipUnless(hasattr(os, "link"),
"Missing hardlink implementation")
def test_link_size(self):
link = os.path.join(TEMPDIR, "link")
target = os.path.join(TEMPDIR, "link_target")
with open(target, "wb") as fobj:
fobj.write(b"aaa")
os.link(target, link)
try:
tar = tarfile.open(tmpname, self.mode)
try:
# Record the link target in the inodes list.
tar.gettarinfo(target)
tarinfo = tar.gettarinfo(link)
self.assertEqual(tarinfo.size, 0)
finally:
tar.close()
finally:
support.unlink(target)
support.unlink(link)
@support.skip_unless_symlink
def test_symlink_size(self):
path = os.path.join(TEMPDIR, "symlink")
os.symlink("link_target", path)
try:
tar = tarfile.open(tmpname, self.mode)
try:
tarinfo = tar.gettarinfo(path)
self.assertEqual(tarinfo.size, 0)
finally:
tar.close()
finally:
support.unlink(path)
def test_add_self(self):
# Test for #1257255.
dstname = os.path.abspath(tmpname)
tar = tarfile.open(tmpname, self.mode)
try:
self.assertEqual(tar.name, dstname,
"archive name must be absolute")
tar.add(dstname)
self.assertEqual(tar.getnames(), [],
"added the archive to itself")
with support.change_cwd(TEMPDIR):
tar.add(dstname)
self.assertEqual(tar.getnames(), [],
"added the archive to itself")
finally:
tar.close()
def test_exclude(self):
tempdir = os.path.join(TEMPDIR, "exclude")
os.mkdir(tempdir)
try:
for name in ("foo", "bar", "baz"):
name = os.path.join(tempdir, name)
support.create_empty_file(name)
exclude = os.path.isfile
tar = tarfile.open(tmpname, self.mode, encoding="iso8859-1")
try:
with support.check_warnings(("use the filter argument",
DeprecationWarning)):
tar.add(tempdir, arcname="empty_dir", exclude=exclude)
finally:
tar.close()
tar = tarfile.open(tmpname, "r")
try:
self.assertEqual(len(tar.getmembers()), 1)
self.assertEqual(tar.getnames()[0], "empty_dir")
finally:
tar.close()
finally:
support.rmtree(tempdir)
def test_filter(self):
tempdir = os.path.join(TEMPDIR, "filter")
os.mkdir(tempdir)
try:
for name in ("foo", "bar", "baz"):
name = os.path.join(tempdir, name)
support.create_empty_file(name)
def filter(tarinfo):
if os.path.basename(tarinfo.name) == "bar":
return
tarinfo.uid = 123
tarinfo.uname = "foo"
return tarinfo
tar = tarfile.open(tmpname, self.mode, encoding="iso8859-1")
try:
tar.add(tempdir, arcname="empty_dir", filter=filter)
finally:
tar.close()
# Verify that filter is a keyword-only argument
with self.assertRaises(TypeError):
tar.add(tempdir, "empty_dir", True, None, filter)
tar = tarfile.open(tmpname, "r")
try:
for tarinfo in tar:
self.assertEqual(tarinfo.uid, 123)
self.assertEqual(tarinfo.uname, "foo")
self.assertEqual(len(tar.getmembers()), 3)
finally:
tar.close()
finally:
support.rmtree(tempdir)
# Guarantee that stored pathnames are not modified. Don't
# remove ./ or ../ or double slashes. Still make absolute
# pathnames relative.
# For details see bug #6054.
def _test_pathname(self, path, cmp_path=None, dir=False):
# Create a tarfile with an empty member named path
# and compare the stored name with the original.
foo = os.path.join(TEMPDIR, "foo")
if not dir:
support.create_empty_file(foo)
else:
os.mkdir(foo)
tar = tarfile.open(tmpname, self.mode)
try:
tar.add(foo, arcname=path)
finally:
tar.close()
tar = tarfile.open(tmpname, "r")
try:
t = tar.next()
finally:
tar.close()
if not dir:
support.unlink(foo)
else:
support.rmdir(foo)
self.assertEqual(t.name, cmp_path or path.replace(os.sep, "/"))
@support.skip_unless_symlink
def test_extractall_symlinks(self):
# Test if extractall works properly when tarfile contains symlinks
tempdir = os.path.join(TEMPDIR, "testsymlinks")
temparchive = os.path.join(TEMPDIR, "testsymlinks.tar")
os.mkdir(tempdir)
try:
source_file = os.path.join(tempdir,'source')
target_file = os.path.join(tempdir,'symlink')
with open(source_file,'w') as f:
f.write('something\n')
os.symlink(source_file, target_file)
tar = tarfile.open(temparchive,'w')
tar.add(source_file)
tar.add(target_file)
tar.close()
# Let's extract it to the location which contains the symlink
tar = tarfile.open(temparchive,'r')
# this should not raise OSError: [Errno 17] File exists
try:
tar.extractall(path=tempdir)
except OSError:
self.fail("extractall failed with symlinked files")
finally:
tar.close()
finally:
support.unlink(temparchive)
support.rmtree(tempdir)
def test_pathnames(self):
self._test_pathname("foo")
self._test_pathname(os.path.join("foo", ".", "bar"))
self._test_pathname(os.path.join("foo", "..", "bar"))
self._test_pathname(os.path.join(".", "foo"))
self._test_pathname(os.path.join(".", "foo", "."))
self._test_pathname(os.path.join(".", "foo", ".", "bar"))
self._test_pathname(os.path.join(".", "foo", "..", "bar"))
self._test_pathname(os.path.join(".", "foo", "..", "bar"))
self._test_pathname(os.path.join("..", "foo"))
self._test_pathname(os.path.join("..", "foo", ".."))
self._test_pathname(os.path.join("..", "foo", ".", "bar"))
self._test_pathname(os.path.join("..", "foo", "..", "bar"))
self._test_pathname("foo" + os.sep + os.sep + "bar")
self._test_pathname("foo" + os.sep + os.sep, "foo", dir=True)
def test_abs_pathnames(self):
if sys.platform == "win32":
self._test_pathname("C:\\foo", "foo")
else:
self._test_pathname("/foo", "foo")
self._test_pathname("///foo", "foo")
def test_cwd(self):
# Test adding the current working directory.
with support.change_cwd(TEMPDIR):
tar = tarfile.open(tmpname, self.mode)
try:
tar.add(".")
finally:
tar.close()
tar = tarfile.open(tmpname, "r")
try:
for t in tar:
if t.name != ".":
self.assertTrue(t.name.startswith("./"), t.name)
finally:
tar.close()
def test_open_nonwritable_fileobj(self):
for exctype in OSError, EOFError, RuntimeError:
class BadFile(io.BytesIO):
first = True
def write(self, data):
if self.first:
self.first = False
raise exctype
f = BadFile()
with self.assertRaises(exctype):
tar = tarfile.open(tmpname, self.mode, fileobj=f,
format=tarfile.PAX_FORMAT,
pax_headers={'non': 'empty'})
self.assertFalse(f.closed)
class GzipWriteTest(GzipTest, WriteTest):
pass
class Bz2WriteTest(Bz2Test, WriteTest):
pass
class LzmaWriteTest(LzmaTest, WriteTest):
pass
class StreamWriteTest(WriteTestBase, unittest.TestCase):
prefix = "w|"
decompressor = None
def test_stream_padding(self):
# Test for bug #1543303.
tar = tarfile.open(tmpname, self.mode)
tar.close()
if self.decompressor:
dec = self.decompressor()
with open(tmpname, "rb") as fobj:
data = fobj.read()
data = dec.decompress(data)
self.assertFalse(dec.unused_data, "found trailing data")
else:
with self.open(tmpname) as fobj:
data = fobj.read()
self.assertEqual(data.count(b"\0"), tarfile.RECORDSIZE,
"incorrect zero padding")
@unittest.skipUnless(sys.platform != "win32" and hasattr(os, "umask"),
"Missing umask implementation")
def test_file_mode(self):
# Test for issue #8464: Create files with correct
# permissions.
if os.path.exists(tmpname):
support.unlink(tmpname)
original_umask = os.umask(0o022)
try:
tar = tarfile.open(tmpname, self.mode)
tar.close()
mode = os.stat(tmpname).st_mode & 0o777
self.assertEqual(mode, 0o644, "wrong file permissions")
finally:
os.umask(original_umask)
class GzipStreamWriteTest(GzipTest, StreamWriteTest):
pass
class Bz2StreamWriteTest(Bz2Test, StreamWriteTest):
decompressor = bz2.BZ2Decompressor if bz2 else None
class LzmaStreamWriteTest(LzmaTest, StreamWriteTest):
decompressor = lzma.LZMADecompressor if lzma else None
class GNUWriteTest(unittest.TestCase):
# This testcase checks for correct creation of GNU Longname
# and Longlink extended headers (cp. bug #812325).
def _length(self, s):
blocks = len(s) // 512 + 1
return blocks * 512
def _calc_size(self, name, link=None):
# Initial tar header
count = 512
if len(name) > tarfile.LENGTH_NAME:
# GNU longname extended header + longname
count += 512
count += self._length(name)
if link is not None and len(link) > tarfile.LENGTH_LINK:
# GNU longlink extended header + longlink
count += 512
count += self._length(link)
return count
def _test(self, name, link=None):
tarinfo = tarfile.TarInfo(name)
if link:
tarinfo.linkname = link
tarinfo.type = tarfile.LNKTYPE
tar = tarfile.open(tmpname, "w")
try:
tar.format = tarfile.GNU_FORMAT
tar.addfile(tarinfo)
v1 = self._calc_size(name, link)
v2 = tar.offset
self.assertEqual(v1, v2, "GNU longname/longlink creation failed")
finally:
tar.close()
tar = tarfile.open(tmpname)
try:
member = tar.next()
self.assertIsNotNone(member,
"unable to read longname member")
self.assertEqual(tarinfo.name, member.name,
"unable to read longname member")
self.assertEqual(tarinfo.linkname, member.linkname,
"unable to read longname member")
finally:
tar.close()
def test_longname_1023(self):
self._test(("longnam/" * 127) + "longnam")
def test_longname_1024(self):
self._test(("longnam/" * 127) + "longname")
def test_longname_1025(self):
self._test(("longnam/" * 127) + "longname_")
def test_longlink_1023(self):
self._test("name", ("longlnk/" * 127) + "longlnk")
def test_longlink_1024(self):
self._test("name", ("longlnk/" * 127) + "longlink")
def test_longlink_1025(self):
self._test("name", ("longlnk/" * 127) + "longlink_")
def test_longnamelink_1023(self):
self._test(("longnam/" * 127) + "longnam",
("longlnk/" * 127) + "longlnk")
def test_longnamelink_1024(self):
self._test(("longnam/" * 127) + "longname",
("longlnk/" * 127) + "longlink")
def test_longnamelink_1025(self):
self._test(("longnam/" * 127) + "longname_",
("longlnk/" * 127) + "longlink_")
class CreateTest(WriteTestBase, unittest.TestCase):
prefix = "x:"
file_path = os.path.join(TEMPDIR, "spameggs42")
def setUp(self):
support.unlink(tmpname)
@classmethod
def setUpClass(cls):
with open(cls.file_path, "wb") as fobj:
fobj.write(b"aaa")
@classmethod
def tearDownClass(cls):
support.unlink(cls.file_path)
def test_create(self):
with tarfile.open(tmpname, self.mode) as tobj:
tobj.add(self.file_path)
with self.taropen(tmpname) as tobj:
names = tobj.getnames()
self.assertEqual(len(names), 1)
self.assertIn('spameggs42', names[0])
def test_create_existing(self):
with tarfile.open(tmpname, self.mode) as tobj:
tobj.add(self.file_path)
with self.assertRaises(FileExistsError):
tobj = tarfile.open(tmpname, self.mode)
with self.taropen(tmpname) as tobj:
names = tobj.getnames()
self.assertEqual(len(names), 1)
self.assertIn('spameggs42', names[0])
def test_create_taropen(self):
with self.taropen(tmpname, "x") as tobj:
tobj.add(self.file_path)
with self.taropen(tmpname) as tobj:
names = tobj.getnames()
self.assertEqual(len(names), 1)
self.assertIn('spameggs42', names[0])
def test_create_existing_taropen(self):
with self.taropen(tmpname, "x") as tobj:
tobj.add(self.file_path)
with self.assertRaises(FileExistsError):
with self.taropen(tmpname, "x"):
pass
with self.taropen(tmpname) as tobj:
names = tobj.getnames()
self.assertEqual(len(names), 1)
self.assertIn("spameggs42", names[0])
def test_create_pathlike_name(self):
with tarfile.open(pathlib.Path(tmpname), self.mode) as tobj:
self.assertIsInstance(tobj.name, str)
self.assertEqual(tobj.name, os.path.abspath(tmpname))
tobj.add(pathlib.Path(self.file_path))
names = tobj.getnames()
self.assertEqual(len(names), 1)
self.assertIn('spameggs42', names[0])
with self.taropen(tmpname) as tobj:
names = tobj.getnames()
self.assertEqual(len(names), 1)
self.assertIn('spameggs42', names[0])
def test_create_taropen_pathlike_name(self):
with self.taropen(pathlib.Path(tmpname), "x") as tobj:
self.assertIsInstance(tobj.name, str)
self.assertEqual(tobj.name, os.path.abspath(tmpname))
tobj.add(pathlib.Path(self.file_path))
names = tobj.getnames()
self.assertEqual(len(names), 1)
self.assertIn('spameggs42', names[0])
with self.taropen(tmpname) as tobj:
names = tobj.getnames()
self.assertEqual(len(names), 1)
self.assertIn('spameggs42', names[0])
class GzipCreateTest(GzipTest, CreateTest):
pass
class Bz2CreateTest(Bz2Test, CreateTest):
pass
class LzmaCreateTest(LzmaTest, CreateTest):
pass
class CreateWithXModeTest(CreateTest):
prefix = "x"
test_create_taropen = None
test_create_existing_taropen = None
@unittest.skipUnless(hasattr(os, "link"), "Missing hardlink implementation")
class HardlinkTest(unittest.TestCase):
# Test the creation of LNKTYPE (hardlink) members in an archive.
def setUp(self):
self.foo = os.path.join(TEMPDIR, "foo")
self.bar = os.path.join(TEMPDIR, "bar")
with open(self.foo, "wb") as fobj:
fobj.write(b"foo")
os.link(self.foo, self.bar)
self.tar = tarfile.open(tmpname, "w")
self.tar.add(self.foo)
def tearDown(self):
self.tar.close()
support.unlink(self.foo)
support.unlink(self.bar)
def test_add_twice(self):
# The same name will be added as a REGTYPE every
# time regardless of st_nlink.
tarinfo = self.tar.gettarinfo(self.foo)
self.assertEqual(tarinfo.type, tarfile.REGTYPE,
"add file as regular failed")
def test_add_hardlink(self):
tarinfo = self.tar.gettarinfo(self.bar)
self.assertEqual(tarinfo.type, tarfile.LNKTYPE,
"add file as hardlink failed")
def test_dereference_hardlink(self):
self.tar.dereference = True
tarinfo = self.tar.gettarinfo(self.bar)
self.assertEqual(tarinfo.type, tarfile.REGTYPE,
"dereferencing hardlink failed")
class PaxWriteTest(GNUWriteTest):
def _test(self, name, link=None):
# See GNUWriteTest.
tarinfo = tarfile.TarInfo(name)
if link:
tarinfo.linkname = link
tarinfo.type = tarfile.LNKTYPE
tar = tarfile.open(tmpname, "w", format=tarfile.PAX_FORMAT)
try:
tar.addfile(tarinfo)
finally:
tar.close()
tar = tarfile.open(tmpname)
try:
if link:
l = tar.getmembers()[0].linkname
self.assertEqual(link, l, "PAX longlink creation failed")
else:
n = tar.getmembers()[0].name
self.assertEqual(name, n, "PAX longname creation failed")
finally:
tar.close()
def test_pax_global_header(self):
pax_headers = {
"foo": "bar",
"uid": "0",
"mtime": "1.23",
"test": "\xe4\xf6\xfc",
"\xe4\xf6\xfc": "test"}
tar = tarfile.open(tmpname, "w", format=tarfile.PAX_FORMAT,
pax_headers=pax_headers)
try:
tar.addfile(tarfile.TarInfo("test"))
finally:
tar.close()
# Test if the global header was written correctly.
tar = tarfile.open(tmpname, encoding="iso8859-1")
try:
self.assertEqual(tar.pax_headers, pax_headers)
self.assertEqual(tar.getmembers()[0].pax_headers, pax_headers)
# Test if all the fields are strings.
for key, val in tar.pax_headers.items():
self.assertIsNot(type(key), bytes)
self.assertIsNot(type(val), bytes)
if key in tarfile.PAX_NUMBER_FIELDS:
try:
tarfile.PAX_NUMBER_FIELDS[key](val)
except (TypeError, ValueError):
self.fail("unable to convert pax header field")
finally:
tar.close()
def test_pax_extended_header(self):
# The fields from the pax header have priority over the
# TarInfo.
pax_headers = {"path": "foo", "uid": "123"}
tar = tarfile.open(tmpname, "w", format=tarfile.PAX_FORMAT,
encoding="iso8859-1")
try:
t = tarfile.TarInfo()
t.name = "\xe4\xf6\xfc" # non-ASCII
t.uid = 8**8 # too large
t.pax_headers = pax_headers
tar.addfile(t)
finally:
tar.close()
tar = tarfile.open(tmpname, encoding="iso8859-1")
try:
t = tar.getmembers()[0]
self.assertEqual(t.pax_headers, pax_headers)
self.assertEqual(t.name, "foo")
self.assertEqual(t.uid, 123)
finally:
tar.close()
class UnicodeTest:
def test_iso8859_1_filename(self):
self._test_unicode_filename("iso8859-1")
def test_utf7_filename(self):
return
self._test_unicode_filename("utf7")
def test_utf8_filename(self):
self._test_unicode_filename("utf-8")
def _test_unicode_filename(self, encoding):
tar = tarfile.open(tmpname, "w", format=self.format,
encoding=encoding, errors="strict")
try:
name = "\xe4\xf6\xfc"
tar.addfile(tarfile.TarInfo(name))
finally:
tar.close()
tar = tarfile.open(tmpname, encoding=encoding)
try:
self.assertEqual(tar.getmembers()[0].name, name)
finally:
tar.close()
def test_unicode_filename_error(self):
tar = tarfile.open(tmpname, "w", format=self.format,
encoding="ascii", errors="strict")
try:
tarinfo = tarfile.TarInfo()
tarinfo.name = "\xe4\xf6\xfc"
self.assertRaises(UnicodeError, tar.addfile, tarinfo)
tarinfo.name = "foo"
tarinfo.uname = "\xe4\xf6\xfc"
self.assertRaises(UnicodeError, tar.addfile, tarinfo)
finally:
tar.close()
def test_unicode_argument(self):
tar = tarfile.open(tarname, "r",
encoding="iso8859-1", errors="strict")
try:
for t in tar:
self.assertIs(type(t.name), str)
self.assertIs(type(t.linkname), str)
self.assertIs(type(t.uname), str)
self.assertIs(type(t.gname), str)
finally:
tar.close()
def test_uname_unicode(self):
t = tarfile.TarInfo("foo")
t.uname = "\xe4\xf6\xfc"
t.gname = "\xe4\xf6\xfc"
tar = tarfile.open(tmpname, mode="w", format=self.format,
encoding="iso8859-1")
try:
tar.addfile(t)
finally:
tar.close()
tar = tarfile.open(tmpname, encoding="iso8859-1")
try:
t = tar.getmember("foo")
self.assertEqual(t.uname, "\xe4\xf6\xfc")
self.assertEqual(t.gname, "\xe4\xf6\xfc")
if self.format != tarfile.PAX_FORMAT:
tar.close()
tar = tarfile.open(tmpname, encoding="ascii")
t = tar.getmember("foo")
self.assertEqual(t.uname, "\udce4\udcf6\udcfc")
self.assertEqual(t.gname, "\udce4\udcf6\udcfc")
finally:
tar.close()
class UstarUnicodeTest(UnicodeTest, unittest.TestCase):
format = tarfile.USTAR_FORMAT
# Test whether the utf-8 encoded version of a filename exceeds the 100
# bytes name field limit (every occurrence of '\xff' will be expanded to 2
# bytes).
def test_unicode_name1(self):
self._test_ustar_name("0123456789" * 10)
self._test_ustar_name("0123456789" * 10 + "0", ValueError)
self._test_ustar_name("0123456789" * 9 + "01234567\xff")
self._test_ustar_name("0123456789" * 9 + "012345678\xff", ValueError)
def test_unicode_name2(self):
self._test_ustar_name("0123456789" * 9 + "012345\xff\xff")
self._test_ustar_name("0123456789" * 9 + "0123456\xff\xff", ValueError)
# Test whether the utf-8 encoded version of a filename exceeds the 155
# bytes prefix + '/' + 100 bytes name limit.
def test_unicode_longname1(self):
self._test_ustar_name("0123456789" * 15 + "01234/" + "0123456789" * 10)
self._test_ustar_name("0123456789" * 15 + "0123/4" + "0123456789" * 10, ValueError)
self._test_ustar_name("0123456789" * 15 + "012\xff/" + "0123456789" * 10)
self._test_ustar_name("0123456789" * 15 + "0123\xff/" + "0123456789" * 10, ValueError)
def test_unicode_longname2(self):
self._test_ustar_name("0123456789" * 15 + "01\xff/2" + "0123456789" * 10, ValueError)
self._test_ustar_name("0123456789" * 15 + "01\xff\xff/" + "0123456789" * 10, ValueError)
def test_unicode_longname3(self):
self._test_ustar_name("0123456789" * 15 + "01\xff\xff/2" + "0123456789" * 10, ValueError)
self._test_ustar_name("0123456789" * 15 + "01234/" + "0123456789" * 9 + "01234567\xff")
self._test_ustar_name("0123456789" * 15 + "01234/" + "0123456789" * 9 + "012345678\xff", ValueError)
def test_unicode_longname4(self):
self._test_ustar_name("0123456789" * 15 + "01234/" + "0123456789" * 9 + "012345\xff\xff")
self._test_ustar_name("0123456789" * 15 + "01234/" + "0123456789" * 9 + "0123456\xff\xff", ValueError)
def _test_ustar_name(self, name, exc=None):
with tarfile.open(tmpname, "w", format=self.format, encoding="utf-8") as tar:
t = tarfile.TarInfo(name)
if exc is None:
tar.addfile(t)
else:
self.assertRaises(exc, tar.addfile, t)
if exc is None:
with tarfile.open(tmpname, "r", encoding="utf-8") as tar:
for t in tar:
self.assertEqual(name, t.name)
break
# Test the same as above for the 100 bytes link field.
def test_unicode_link1(self):
self._test_ustar_link("0123456789" * 10)
self._test_ustar_link("0123456789" * 10 + "0", ValueError)
self._test_ustar_link("0123456789" * 9 + "01234567\xff")
self._test_ustar_link("0123456789" * 9 + "012345678\xff", ValueError)
def test_unicode_link2(self):
self._test_ustar_link("0123456789" * 9 + "012345\xff\xff")
self._test_ustar_link("0123456789" * 9 + "0123456\xff\xff", ValueError)
def _test_ustar_link(self, name, exc=None):
with tarfile.open(tmpname, "w", format=self.format, encoding="utf-8") as tar:
t = tarfile.TarInfo("foo")
t.linkname = name
if exc is None:
tar.addfile(t)
else:
self.assertRaises(exc, tar.addfile, t)
if exc is None:
with tarfile.open(tmpname, "r", encoding="utf-8") as tar:
for t in tar:
self.assertEqual(name, t.linkname)
break
class GNUUnicodeTest(UnicodeTest, unittest.TestCase):
format = tarfile.GNU_FORMAT
def test_bad_pax_header(self):
# Test for issue #8633. GNU tar <= 1.23 creates raw binary fields
# without a hdrcharset=BINARY header.
for encoding, name in (
("utf-8", "pax/bad-pax-\udce4\udcf6\udcfc"),
("iso8859-1", "pax/bad-pax-\xe4\xf6\xfc"),):
with tarfile.open(tarname, encoding=encoding,
errors="surrogateescape") as tar:
try:
t = tar.getmember(name)
except KeyError:
self.fail("unable to read bad GNU tar pax header")
class PAXUnicodeTest(UnicodeTest, unittest.TestCase):
format = tarfile.PAX_FORMAT
# PAX_FORMAT ignores encoding in write mode.
test_unicode_filename_error = None
def test_binary_header(self):
# Test a POSIX.1-2008 compatible header with a hdrcharset=BINARY field.
for encoding, name in (
("utf-8", "pax/hdrcharset-\udce4\udcf6\udcfc"),
("iso8859-1", "pax/hdrcharset-\xe4\xf6\xfc"),):
with tarfile.open(tarname, encoding=encoding,
errors="surrogateescape") as tar:
try:
t = tar.getmember(name)
except KeyError:
self.fail("unable to read POSIX.1-2008 binary header")
class AppendTestBase:
# Test append mode (cp. patch #1652681).
def setUp(self):
self.tarname = tmpname
if os.path.exists(self.tarname):
support.unlink(self.tarname)
def _create_testtar(self, mode="w:"):
with tarfile.open(tarname, encoding="iso8859-1") as src:
t = src.getmember("ustar/regtype")
t.name = "foo"
with src.extractfile(t) as f:
with tarfile.open(self.tarname, mode) as tar:
tar.addfile(t, f)
def test_append_compressed(self):
self._create_testtar("w:" + self.suffix)
self.assertRaises(tarfile.ReadError, tarfile.open, tmpname, "a")
class AppendTest(AppendTestBase, unittest.TestCase):
test_append_compressed = None
def _add_testfile(self, fileobj=None):
with tarfile.open(self.tarname, "a", fileobj=fileobj) as tar:
tar.addfile(tarfile.TarInfo("bar"))
def _test(self, names=["bar"], fileobj=None):
with tarfile.open(self.tarname, fileobj=fileobj) as tar:
self.assertEqual(tar.getnames(), names)
def test_non_existing(self):
self._add_testfile()
self._test()
def test_empty(self):
tarfile.open(self.tarname, "w:").close()
self._add_testfile()
self._test()
def test_empty_fileobj(self):
fobj = io.BytesIO(b"\0" * 1024)
self._add_testfile(fobj)
fobj.seek(0)
self._test(fileobj=fobj)
def test_fileobj(self):
self._create_testtar()
with open(self.tarname, "rb") as fobj:
data = fobj.read()
fobj = io.BytesIO(data)
self._add_testfile(fobj)
fobj.seek(0)
self._test(names=["foo", "bar"], fileobj=fobj)
def test_existing(self):
self._create_testtar()
self._add_testfile()
self._test(names=["foo", "bar"])
# Append mode is supposed to fail if the tarfile to append to
# does not end with a zero block.
def _test_error(self, data):
with open(self.tarname, "wb") as fobj:
fobj.write(data)
self.assertRaises(tarfile.ReadError, self._add_testfile)
def test_null(self):
self._test_error(b"")
def test_incomplete(self):
self._test_error(b"\0" * 13)
def test_premature_eof(self):
data = tarfile.TarInfo("foo").tobuf()
self._test_error(data)
def test_trailing_garbage(self):
data = tarfile.TarInfo("foo").tobuf()
self._test_error(data + b"\0" * 13)
def test_invalid(self):
self._test_error(b"a" * 512)
class GzipAppendTest(GzipTest, AppendTestBase, unittest.TestCase):
pass
class Bz2AppendTest(Bz2Test, AppendTestBase, unittest.TestCase):
pass
class LzmaAppendTest(LzmaTest, AppendTestBase, unittest.TestCase):
pass
class LimitsTest(unittest.TestCase):
def test_ustar_limits(self):
# 100 char name
tarinfo = tarfile.TarInfo("0123456789" * 10)
tarinfo.tobuf(tarfile.USTAR_FORMAT)
# 101 char name that cannot be stored
tarinfo = tarfile.TarInfo("0123456789" * 10 + "0")
self.assertRaises(ValueError, tarinfo.tobuf, tarfile.USTAR_FORMAT)
# 256 char name with a slash at pos 156
tarinfo = tarfile.TarInfo("123/" * 62 + "longname")
tarinfo.tobuf(tarfile.USTAR_FORMAT)
# 256 char name that cannot be stored
tarinfo = tarfile.TarInfo("1234567/" * 31 + "longname")
self.assertRaises(ValueError, tarinfo.tobuf, tarfile.USTAR_FORMAT)
# 512 char name
tarinfo = tarfile.TarInfo("123/" * 126 + "longname")
self.assertRaises(ValueError, tarinfo.tobuf, tarfile.USTAR_FORMAT)
# 512 char linkname
tarinfo = tarfile.TarInfo("longlink")
tarinfo.linkname = "123/" * 126 + "longname"
self.assertRaises(ValueError, tarinfo.tobuf, tarfile.USTAR_FORMAT)
# uid > 8 digits
tarinfo = tarfile.TarInfo("name")
tarinfo.uid = 0o10000000
self.assertRaises(ValueError, tarinfo.tobuf, tarfile.USTAR_FORMAT)
def test_gnu_limits(self):
tarinfo = tarfile.TarInfo("123/" * 126 + "longname")
tarinfo.tobuf(tarfile.GNU_FORMAT)
tarinfo = tarfile.TarInfo("longlink")
tarinfo.linkname = "123/" * 126 + "longname"
tarinfo.tobuf(tarfile.GNU_FORMAT)
# uid >= 256 ** 7
tarinfo = tarfile.TarInfo("name")
tarinfo.uid = 0o4000000000000000000
self.assertRaises(ValueError, tarinfo.tobuf, tarfile.GNU_FORMAT)
def test_pax_limits(self):
tarinfo = tarfile.TarInfo("123/" * 126 + "longname")
tarinfo.tobuf(tarfile.PAX_FORMAT)
tarinfo = tarfile.TarInfo("longlink")
tarinfo.linkname = "123/" * 126 + "longname"
tarinfo.tobuf(tarfile.PAX_FORMAT)
tarinfo = tarfile.TarInfo("name")
tarinfo.uid = 0o4000000000000000000
tarinfo.tobuf(tarfile.PAX_FORMAT)
class MiscTest(unittest.TestCase):
def test_char_fields(self):
self.assertEqual(tarfile.stn("foo", 8, "ascii", "strict"),
b"foo\0\0\0\0\0")
self.assertEqual(tarfile.stn("foobar", 3, "ascii", "strict"),
b"foo")
self.assertEqual(tarfile.nts(b"foo\0\0\0\0\0", "ascii", "strict"),
"foo")
self.assertEqual(tarfile.nts(b"foo\0bar\0", "ascii", "strict"),
"foo")
def test_read_number_fields(self):
# Issue 13158: Test if GNU tar specific base-256 number fields
# are decoded correctly.
self.assertEqual(tarfile.nti(b"0000001\x00"), 1)
self.assertEqual(tarfile.nti(b"7777777\x00"), 0o7777777)
self.assertEqual(tarfile.nti(b"\x80\x00\x00\x00\x00\x20\x00\x00"),
0o10000000)
self.assertEqual(tarfile.nti(b"\x80\x00\x00\x00\xff\xff\xff\xff"),
0xffffffff)
self.assertEqual(tarfile.nti(b"\xff\xff\xff\xff\xff\xff\xff\xff"),
-1)
self.assertEqual(tarfile.nti(b"\xff\xff\xff\xff\xff\xff\xff\x9c"),
-100)
self.assertEqual(tarfile.nti(b"\xff\x00\x00\x00\x00\x00\x00\x00"),
-0x100000000000000)
# Issue 24514: Test if empty number fields are converted to zero.
self.assertEqual(tarfile.nti(b"\0"), 0)
self.assertEqual(tarfile.nti(b" \0"), 0)
def test_write_number_fields(self):
self.assertEqual(tarfile.itn(1), b"0000001\x00")
self.assertEqual(tarfile.itn(0o7777777), b"7777777\x00")
self.assertEqual(tarfile.itn(0o10000000),
b"\x80\x00\x00\x00\x00\x20\x00\x00")
self.assertEqual(tarfile.itn(0xffffffff),
b"\x80\x00\x00\x00\xff\xff\xff\xff")
self.assertEqual(tarfile.itn(-1),
b"\xff\xff\xff\xff\xff\xff\xff\xff")
self.assertEqual(tarfile.itn(-100),
b"\xff\xff\xff\xff\xff\xff\xff\x9c")
self.assertEqual(tarfile.itn(-0x100000000000000),
b"\xff\x00\x00\x00\x00\x00\x00\x00")
# Issue 32713: Test if itn() supports float values outside the
# non-GNU format range
self.assertEqual(tarfile.itn(-100.0, format=tarfile.GNU_FORMAT),
b"\xff\xff\xff\xff\xff\xff\xff\x9c")
self.assertEqual(tarfile.itn(8 ** 12 + 0.0, format=tarfile.GNU_FORMAT),
b"\x80\x00\x00\x10\x00\x00\x00\x00")
self.assertEqual(tarfile.nti(tarfile.itn(-0.1, format=tarfile.GNU_FORMAT)), 0)
def test_number_field_limits(self):
with self.assertRaises(ValueError):
tarfile.itn(-1, 8, tarfile.USTAR_FORMAT)
with self.assertRaises(ValueError):
tarfile.itn(0o10000000, 8, tarfile.USTAR_FORMAT)
with self.assertRaises(ValueError):
tarfile.itn(-0x10000000001, 6, tarfile.GNU_FORMAT)
with self.assertRaises(ValueError):
tarfile.itn(0x10000000000, 6, tarfile.GNU_FORMAT)
def test__all__(self):
blacklist = {'version', 'grp', 'pwd', 'symlink_exception',
'NUL', 'BLOCKSIZE', 'RECORDSIZE', 'GNU_MAGIC',
'POSIX_MAGIC', 'LENGTH_NAME', 'LENGTH_LINK',
'LENGTH_PREFIX', 'REGTYPE', 'AREGTYPE', 'LNKTYPE',
'SYMTYPE', 'CHRTYPE', 'BLKTYPE', 'DIRTYPE', 'FIFOTYPE',
'CONTTYPE', 'GNUTYPE_LONGNAME', 'GNUTYPE_LONGLINK',
'GNUTYPE_SPARSE', 'XHDTYPE', 'XGLTYPE', 'SOLARIS_XHDTYPE',
'SUPPORTED_TYPES', 'REGULAR_TYPES', 'GNU_TYPES',
'PAX_FIELDS', 'PAX_NAME_FIELDS', 'PAX_NUMBER_FIELDS',
'stn', 'nts', 'nti', 'itn', 'calc_chksums', 'copyfileobj',
'filemode',
'EmptyHeaderError', 'TruncatedHeaderError',
'EOFHeaderError', 'InvalidHeaderError',
'SubsequentHeaderError', 'ExFileObject',
'main'}
support.check__all__(self, tarfile, blacklist=blacklist)
class CommandLineTest(unittest.TestCase):
def tarfilecmd(self, *args, **kwargs):
rc, out, err = script_helper.assert_python_ok('-m', 'tarfile', *args,
**kwargs)
return out.replace(os.linesep.encode(), b'\n')
def tarfilecmd_failure(self, *args):
return script_helper.assert_python_failure('-m', 'tarfile', *args)
def make_simple_tarfile(self, tar_name):
files = [support.findfile('tokenize_tests.txt'),
support.findfile('tokenize_tests-no-coding-cookie-'
'and-utf8-bom-sig-only.txt')]
self.addCleanup(support.unlink, tar_name)
with tarfile.open(tar_name, 'w') as tf:
for tardata in files:
tf.add(tardata, arcname=os.path.basename(tardata))
def test_test_command(self):
for tar_name in testtarnames:
for opt in '-t', '--test':
out = self.tarfilecmd(opt, tar_name)
self.assertEqual(out, b'')
def test_test_command_verbose(self):
for tar_name in testtarnames:
for opt in '-v', '--verbose':
out = self.tarfilecmd(opt, '-t', tar_name)
self.assertIn(b'is a tar archive.\n', out)
def test_test_command_invalid_file(self):
zipname = support.findfile('zipdir.zip')
rc, out, err = self.tarfilecmd_failure('-t', zipname)
self.assertIn(b' is not a tar archive.', err)
self.assertEqual(out, b'')
self.assertEqual(rc, 1)
for tar_name in testtarnames:
with self.subTest(tar_name=tar_name):
with open(tar_name, 'rb') as f:
data = f.read()
try:
with open(tmpname, 'wb') as f:
f.write(data[:511])
rc, out, err = self.tarfilecmd_failure('-t', tmpname)
self.assertEqual(out, b'')
self.assertEqual(rc, 1)
finally:
support.unlink(tmpname)
def test_list_command(self):
for tar_name in testtarnames:
with support.captured_stdout() as t:
with tarfile.open(tar_name, 'r') as tf:
tf.list(verbose=False)
expected = t.getvalue().encode('ascii', 'backslashreplace')
for opt in '-l', '--list':
out = self.tarfilecmd(opt, tar_name,
PYTHONIOENCODING='ascii')
self.assertEqual(out, expected)
def test_list_command_verbose(self):
for tar_name in testtarnames:
with support.captured_stdout() as t:
with tarfile.open(tar_name, 'r') as tf:
tf.list(verbose=True)
expected = t.getvalue().encode('ascii', 'backslashreplace')
for opt in '-v', '--verbose':
out = self.tarfilecmd(opt, '-l', tar_name,
PYTHONIOENCODING='ascii')
self.assertEqual(out, expected)
def test_list_command_invalid_file(self):
zipname = support.findfile('zipdir.zip')
rc, out, err = self.tarfilecmd_failure('-l', zipname)
self.assertIn(b' is not a tar archive.', err)
self.assertEqual(out, b'')
self.assertEqual(rc, 1)
def test_create_command(self):
files = [support.findfile('tokenize_tests.txt'),
support.findfile('tokenize_tests-no-coding-cookie-'
'and-utf8-bom-sig-only.txt')]
for opt in '-c', '--create':
try:
out = self.tarfilecmd(opt, tmpname, *files)
self.assertEqual(out, b'')
with tarfile.open(tmpname) as tar:
tar.getmembers()
finally:
support.unlink(tmpname)
def test_create_command_verbose(self):
files = [support.findfile('tokenize_tests.txt'),
support.findfile('tokenize_tests-no-coding-cookie-'
'and-utf8-bom-sig-only.txt')]
for opt in '-v', '--verbose':
try:
out = self.tarfilecmd(opt, '-c', tmpname, *files)
self.assertIn(b' file created.', out)
with tarfile.open(tmpname) as tar:
tar.getmembers()
finally:
support.unlink(tmpname)
def test_create_command_dotless_filename(self):
files = [support.findfile('tokenize_tests.txt')]
try:
out = self.tarfilecmd('-c', dotlessname, *files)
self.assertEqual(out, b'')
with tarfile.open(dotlessname) as tar:
tar.getmembers()
finally:
support.unlink(dotlessname)
def test_create_command_dot_started_filename(self):
tar_name = os.path.join(TEMPDIR, ".testtar")
files = [support.findfile('tokenize_tests.txt')]
try:
out = self.tarfilecmd('-c', tar_name, *files)
self.assertEqual(out, b'')
with tarfile.open(tar_name) as tar:
tar.getmembers()
finally:
support.unlink(tar_name)
def test_create_command_compressed(self):
files = [support.findfile('tokenize_tests.txt'),
support.findfile('tokenize_tests-no-coding-cookie-'
'and-utf8-bom-sig-only.txt')]
for filetype in (GzipTest, Bz2Test, LzmaTest):
if not filetype.open:
continue
try:
tar_name = tmpname + '.' + filetype.suffix
out = self.tarfilecmd('-c', tar_name, *files)
with filetype.taropen(tar_name) as tar:
tar.getmembers()
finally:
support.unlink(tar_name)
def test_extract_command(self):
self.make_simple_tarfile(tmpname)
for opt in '-e', '--extract':
try:
with support.temp_cwd(tarextdir):
out = self.tarfilecmd(opt, tmpname)
self.assertEqual(out, b'')
finally:
support.rmtree(tarextdir)
def test_extract_command_verbose(self):
self.make_simple_tarfile(tmpname)
for opt in '-v', '--verbose':
try:
with support.temp_cwd(tarextdir):
out = self.tarfilecmd(opt, '-e', tmpname)
self.assertIn(b' file is extracted.', out)
finally:
support.rmtree(tarextdir)
def test_extract_command_different_directory(self):
self.make_simple_tarfile(tmpname)
try:
with support.temp_cwd(tarextdir):
out = self.tarfilecmd('-e', tmpname, 'spamdir')
self.assertEqual(out, b'')
finally:
support.rmtree(tarextdir)
def test_extract_command_invalid_file(self):
zipname = support.findfile('zipdir.zip')
with support.temp_cwd(tarextdir):
rc, out, err = self.tarfilecmd_failure('-e', zipname)
self.assertIn(b' is not a tar archive.', err)
self.assertEqual(out, b'')
self.assertEqual(rc, 1)
class ContextManagerTest(unittest.TestCase):
def test_basic(self):
with tarfile.open(tarname) as tar:
self.assertFalse(tar.closed, "closed inside runtime context")
self.assertTrue(tar.closed, "context manager failed")
def test_closed(self):
# The __enter__() method is supposed to raise OSError
# if the TarFile object is already closed.
tar = tarfile.open(tarname)
tar.close()
with self.assertRaises(OSError):
with tar:
pass
def test_exception(self):
# Test if the OSError exception is passed through properly.
with self.assertRaises(Exception) as exc:
with tarfile.open(tarname) as tar:
raise OSError
self.assertIsInstance(exc.exception, OSError,
"wrong exception raised in context manager")
self.assertTrue(tar.closed, "context manager failed")
def test_no_eof(self):
# __exit__() must not write end-of-archive blocks if an
# exception was raised.
try:
with tarfile.open(tmpname, "w") as tar:
raise Exception
except:
pass
self.assertEqual(os.path.getsize(tmpname), 0,
"context manager wrote an end-of-archive block")
self.assertTrue(tar.closed, "context manager failed")
def test_eof(self):
# __exit__() must write end-of-archive blocks, i.e. call
# TarFile.close() if there was no error.
with tarfile.open(tmpname, "w"):
pass
self.assertNotEqual(os.path.getsize(tmpname), 0,
"context manager wrote no end-of-archive block")
def test_fileobj(self):
# Test that __exit__() did not close the external file
# object.
with open(tmpname, "wb") as fobj:
try:
with tarfile.open(fileobj=fobj, mode="w") as tar:
raise Exception
except:
pass
self.assertFalse(fobj.closed, "external file object was closed")
self.assertTrue(tar.closed, "context manager failed")
@unittest.skipIf(hasattr(os, "link"), "requires os.link to be missing")
class LinkEmulationTest(ReadTest, unittest.TestCase):
# Test for issue #8741 regression. On platforms that do not support
# symbolic or hard links tarfile tries to extract these types of members
# as the regular files they point to.
def _test_link_extraction(self, name):
self.tar.extract(name, TEMPDIR)
with open(os.path.join(TEMPDIR, name), "rb") as f:
data = f.read()
self.assertEqual(md5sum(data), md5_regtype)
# See issues #1578269, #8879, and #17689 for some history on these skips
@unittest.skipIf(hasattr(os.path, "islink"),
"Skip emulation - has os.path.islink but not os.link")
def test_hardlink_extraction1(self):
self._test_link_extraction("ustar/lnktype")
@unittest.skipIf(hasattr(os.path, "islink"),
"Skip emulation - has os.path.islink but not os.link")
def test_hardlink_extraction2(self):
self._test_link_extraction("./ustar/linktest2/lnktype")
@unittest.skipIf(hasattr(os, "symlink"),
"Skip emulation if symlink exists")
def test_symlink_extraction1(self):
self._test_link_extraction("ustar/symtype")
@unittest.skipIf(hasattr(os, "symlink"),
"Skip emulation if symlink exists")
def test_symlink_extraction2(self):
self._test_link_extraction("./ustar/linktest2/symtype")
class Bz2PartialReadTest(Bz2Test, unittest.TestCase):
# Issue5068: The _BZ2Proxy.read() method loops forever
# on an empty or partial bzipped file.
def _test_partial_input(self, mode):
class MyBytesIO(io.BytesIO):
hit_eof = False
def read(self, n):
if self.hit_eof:
raise AssertionError("infinite loop detected in "
"tarfile.open()")
self.hit_eof = self.tell() == len(self.getvalue())
return super(MyBytesIO, self).read(n)
def seek(self, *args):
self.hit_eof = False
return super(MyBytesIO, self).seek(*args)
data = bz2.compress(tarfile.TarInfo("foo").tobuf())
for x in range(len(data) + 1):
try:
tarfile.open(fileobj=MyBytesIO(data[:x]), mode=mode)
except tarfile.ReadError:
pass # we have no interest in ReadErrors
def test_partial_input(self):
self._test_partial_input("r")
def test_partial_input_bz2(self):
self._test_partial_input("r:bz2")
def root_is_uid_gid_0():
try:
import pwd, grp
except ImportError:
return False
if pwd.getpwuid(0)[0] != 'root':
return False
if grp.getgrgid(0)[0] != 'root':
return False
return True
@unittest.skipUnless(hasattr(os, 'chown'), "missing os.chown")
@unittest.skipUnless(hasattr(os, 'geteuid'), "missing os.geteuid")
class NumericOwnerTest(unittest.TestCase):
# mock the following:
# os.chown: so we can test what's being called
# os.chmod: so the modes are not actually changed. if they are, we can't
# delete the files/directories
# os.geteuid: so we can lie and say we're root (uid = 0)
@staticmethod
def _make_test_archive(filename_1, dirname_1, filename_2):
# the file contents to write
fobj = io.BytesIO(b"content")
# create a tar file with a file, a directory, and a file within that
# directory. Assign various .uid/.gid values to them
items = [(filename_1, 99, 98, tarfile.REGTYPE, fobj),
(dirname_1, 77, 76, tarfile.DIRTYPE, None),
(filename_2, 88, 87, tarfile.REGTYPE, fobj),
]
with tarfile.open(tmpname, 'w') as tarfl:
for name, uid, gid, typ, contents in items:
t = tarfile.TarInfo(name)
t.uid = uid
t.gid = gid
t.uname = 'root'
t.gname = 'root'
t.type = typ
tarfl.addfile(t, contents)
# return the full pathname to the tar file
return tmpname
@staticmethod
@contextmanager
def _setup_test(mock_geteuid):
mock_geteuid.return_value = 0 # lie and say we're root
fname = 'numeric-owner-testfile'
dirname = 'dir'
# the names we want stored in the tarfile
filename_1 = fname
dirname_1 = dirname
filename_2 = os.path.join(dirname, fname)
# create the tarfile with the contents we're after
tar_filename = NumericOwnerTest._make_test_archive(filename_1,
dirname_1,
filename_2)
# open the tarfile for reading. yield it and the names of the items
# we stored into the file
with tarfile.open(tar_filename) as tarfl:
yield tarfl, filename_1, dirname_1, filename_2
@unittest.mock.patch('os.chown')
@unittest.mock.patch('os.chmod')
@unittest.mock.patch('os.geteuid')
def test_extract_with_numeric_owner(self, mock_geteuid, mock_chmod,
mock_chown):
with self._setup_test(mock_geteuid) as (tarfl, filename_1, _,
filename_2):
tarfl.extract(filename_1, TEMPDIR, numeric_owner=True)
tarfl.extract(filename_2 , TEMPDIR, numeric_owner=True)
# convert to filesystem paths
f_filename_1 = os.path.join(TEMPDIR, filename_1)
f_filename_2 = os.path.join(TEMPDIR, filename_2)
mock_chown.assert_has_calls([unittest.mock.call(f_filename_1, 99, 98),
unittest.mock.call(f_filename_2, 88, 87),
],
any_order=True)
@unittest.mock.patch('os.chown')
@unittest.mock.patch('os.chmod')
@unittest.mock.patch('os.geteuid')
def test_extractall_with_numeric_owner(self, mock_geteuid, mock_chmod,
mock_chown):
with self._setup_test(mock_geteuid) as (tarfl, filename_1, dirname_1,
filename_2):
tarfl.extractall(TEMPDIR, numeric_owner=True)
# convert to filesystem paths
f_filename_1 = os.path.join(TEMPDIR, filename_1)
f_dirname_1 = os.path.join(TEMPDIR, dirname_1)
f_filename_2 = os.path.join(TEMPDIR, filename_2)
mock_chown.assert_has_calls([unittest.mock.call(f_filename_1, 99, 98),
unittest.mock.call(f_dirname_1, 77, 76),
unittest.mock.call(f_filename_2, 88, 87),
],
any_order=True)
# TODO(ahgamut): This probably regressed due to 1a839ba41
# # this test requires that uid=0 and gid=0 really be named 'root'. that's
# # because the uname and gname in the test file are 'root', and extract()
# # will look them up using pwd and grp to find their uid and gid, which we
# # test here to be 0.
# # [jart] tests shouldn't read /etc/passwd lool
# # @unittest.skipUnless(root_is_uid_gid_0(),
# # 'uid=0,gid=0 must be named "root"')
# @unittest.mock.patch('os.chown')
# @unittest.mock.patch('os.chmod')
# @unittest.mock.patch('os.geteuid')
# def test_extract_without_numeric_owner(self, mock_geteuid, mock_chmod,
# mock_chown):
# with self._setup_test(mock_geteuid) as (tarfl, filename_1, _, _):
# tarfl.extract(filename_1, TEMPDIR, numeric_owner=False)
# # convert to filesystem paths
# f_filename_1 = os.path.join(TEMPDIR, filename_1)
# mock_chown.assert_called_with(f_filename_1, 0, 0)
@unittest.mock.patch('os.geteuid')
def test_keyword_only(self, mock_geteuid):
with self._setup_test(mock_geteuid) as (tarfl, filename_1, _, _):
self.assertRaises(TypeError,
tarfl.extract, filename_1, TEMPDIR, False, True)
def setUpModule():
support.unlink(TEMPDIR)
os.makedirs(TEMPDIR)
global testtarnames
testtarnames = [tarname]
with open(tarname, "rb") as fobj:
data = fobj.read()
# Create compressed tarfiles.
for c in GzipTest, Bz2Test, LzmaTest:
if c.open:
support.unlink(c.tarname)
testtarnames.append(c.tarname)
with c.open(c.tarname, "wb") as tar:
tar.write(data)
def tearDownModule():
if os.path.exists(TEMPDIR):
support.rmtree(TEMPDIR)
if __name__ == "__main__":
unittest.main()
| 99,168 | 2,655 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_turtle.py | import pickle
import unittest
from test import support
turtle = support.import_module('turtle')
Vec2D = turtle.Vec2D
test_config = """\
width = 0.75
height = 0.8
canvwidth = 500
canvheight = 200
leftright = 100
topbottom = 100
mode = world
colormode = 255
delay = 100
undobuffersize = 10000
shape = circle
pencolor = red
fillcolor = blue
resizemode = auto
visible = None
language = english
exampleturtle = turtle
examplescreen = screen
title = Python Turtle Graphics
using_IDLE = ''
"""
test_config_two = """\
# Comments!
# Testing comments!
pencolor = red
fillcolor = blue
visible = False
language = english
# Some more
# comments
using_IDLE = False
"""
invalid_test_config = """
pencolor = red
fillcolor: blue
visible = False
"""
class TurtleConfigTest(unittest.TestCase):
def get_cfg_file(self, cfg_str):
self.addCleanup(support.unlink, support.TESTFN)
with open(support.TESTFN, 'w') as f:
f.write(cfg_str)
return support.TESTFN
def test_config_dict(self):
cfg_name = self.get_cfg_file(test_config)
parsed_cfg = turtle.config_dict(cfg_name)
expected = {
'width' : 0.75,
'height' : 0.8,
'canvwidth' : 500,
'canvheight': 200,
'leftright': 100,
'topbottom': 100,
'mode': 'world',
'colormode': 255,
'delay': 100,
'undobuffersize': 10000,
'shape': 'circle',
'pencolor' : 'red',
'fillcolor' : 'blue',
'resizemode' : 'auto',
'visible' : None,
'language': 'english',
'exampleturtle': 'turtle',
'examplescreen': 'screen',
'title': 'Python Turtle Graphics',
'using_IDLE': '',
}
self.assertEqual(parsed_cfg, expected)
def test_partial_config_dict_with_commments(self):
cfg_name = self.get_cfg_file(test_config_two)
parsed_cfg = turtle.config_dict(cfg_name)
expected = {
'pencolor': 'red',
'fillcolor': 'blue',
'visible': False,
'language': 'english',
'using_IDLE': False,
}
self.assertEqual(parsed_cfg, expected)
def test_config_dict_invalid(self):
cfg_name = self.get_cfg_file(invalid_test_config)
with support.captured_stdout() as stdout:
parsed_cfg = turtle.config_dict(cfg_name)
err_msg = stdout.getvalue()
self.assertIn('Bad line in config-file ', err_msg)
self.assertIn('fillcolor: blue', err_msg)
self.assertEqual(parsed_cfg, {
'pencolor': 'red',
'visible': False,
})
class VectorComparisonMixin:
def assertVectorsAlmostEqual(self, vec1, vec2):
if len(vec1) != len(vec2):
self.fail("Tuples are not of equal size")
for idx, (i, j) in enumerate(zip(vec1, vec2)):
self.assertAlmostEqual(
i, j, msg='values at index {} do not match'.format(idx))
class TestVec2D(VectorComparisonMixin, unittest.TestCase):
def test_constructor(self):
vec = Vec2D(0.5, 2)
self.assertEqual(vec[0], 0.5)
self.assertEqual(vec[1], 2)
self.assertIsInstance(vec, Vec2D)
self.assertRaises(TypeError, Vec2D)
self.assertRaises(TypeError, Vec2D, 0)
self.assertRaises(TypeError, Vec2D, (0, 1))
self.assertRaises(TypeError, Vec2D, vec)
self.assertRaises(TypeError, Vec2D, 0, 1, 2)
def test_repr(self):
vec = Vec2D(0.567, 1.234)
self.assertEqual(repr(vec), '(0.57,1.23)')
def test_equality(self):
vec1 = Vec2D(0, 1)
vec2 = Vec2D(0.0, 1)
vec3 = Vec2D(42, 1)
self.assertEqual(vec1, vec2)
self.assertEqual(vec1, tuple(vec1))
self.assertEqual(tuple(vec1), vec1)
self.assertNotEqual(vec1, vec3)
self.assertNotEqual(vec2, vec3)
def test_pickling(self):
vec = Vec2D(0.5, 2)
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
with self.subTest(proto=proto):
pickled = pickle.dumps(vec, protocol=proto)
unpickled = pickle.loads(pickled)
self.assertEqual(unpickled, vec)
self.assertIsInstance(unpickled, Vec2D)
def _assert_arithmetic_cases(self, test_cases, lambda_operator):
for test_case in test_cases:
with self.subTest(case=test_case):
((first, second), expected) = test_case
op1 = Vec2D(*first)
op2 = Vec2D(*second)
result = lambda_operator(op1, op2)
expected = Vec2D(*expected)
self.assertVectorsAlmostEqual(result, expected)
def test_vector_addition(self):
test_cases = [
(((0, 0), (1, 1)), (1.0, 1.0)),
(((-1, 0), (2, 2)), (1, 2)),
(((1.5, 0), (1, 1)), (2.5, 1)),
]
self._assert_arithmetic_cases(test_cases, lambda x, y: x + y)
def test_vector_subtraction(self):
test_cases = [
(((0, 0), (1, 1)), (-1, -1)),
(((10.625, 0.125), (10, 0)), (0.625, 0.125)),
]
self._assert_arithmetic_cases(test_cases, lambda x, y: x - y)
def test_vector_multiply(self):
vec1 = Vec2D(10, 10)
vec2 = Vec2D(0.5, 3)
answer = vec1 * vec2
expected = 35
self.assertAlmostEqual(answer, expected)
vec = Vec2D(0.5, 3)
answer = vec * 10
expected = Vec2D(5, 30)
self.assertVectorsAlmostEqual(answer, expected)
def test_vector_negative(self):
vec = Vec2D(10, -10)
expected = (-10, 10)
self.assertVectorsAlmostEqual(-vec, expected)
def test_distance(self):
vec = Vec2D(6, 8)
expected = 10
self.assertEqual(abs(vec), expected)
vec = Vec2D(0, 0)
expected = 0
self.assertEqual(abs(vec), expected)
vec = Vec2D(2.5, 6)
expected = 6.5
self.assertEqual(abs(vec), expected)
def test_rotate(self):
cases = [
(((0, 0), 0), (0, 0)),
(((0, 1), 90), (-1, 0)),
(((0, 1), -90), (1, 0)),
(((1, 0), 180), (-1, 0)),
(((1, 0), 360), (1, 0)),
]
for case in cases:
with self.subTest(case=case):
(vec, rot), expected = case
vec = Vec2D(*vec)
got = vec.rotate(rot)
self.assertVectorsAlmostEqual(got, expected)
class TestTNavigator(VectorComparisonMixin, unittest.TestCase):
def setUp(self):
self.nav = turtle.TNavigator()
def test_goto(self):
self.nav.goto(100, -100)
self.assertAlmostEqual(self.nav.xcor(), 100)
self.assertAlmostEqual(self.nav.ycor(), -100)
def test_pos(self):
self.assertEqual(self.nav.pos(), self.nav._position)
self.nav.goto(100, -100)
self.assertEqual(self.nav.pos(), self.nav._position)
def test_left(self):
self.assertEqual(self.nav._orient, (1.0, 0))
self.nav.left(90)
self.assertVectorsAlmostEqual(self.nav._orient, (0.0, 1.0))
def test_right(self):
self.assertEqual(self.nav._orient, (1.0, 0))
self.nav.right(90)
self.assertVectorsAlmostEqual(self.nav._orient, (0, -1.0))
def test_reset(self):
self.nav.goto(100, -100)
self.assertAlmostEqual(self.nav.xcor(), 100)
self.assertAlmostEqual(self.nav.ycor(), -100)
self.nav.reset()
self.assertAlmostEqual(self.nav.xcor(), 0)
self.assertAlmostEqual(self.nav.ycor(), 0)
def test_forward(self):
self.nav.forward(150)
expected = Vec2D(150, 0)
self.assertVectorsAlmostEqual(self.nav.position(), expected)
self.nav.reset()
self.nav.left(90)
self.nav.forward(150)
expected = Vec2D(0, 150)
self.assertVectorsAlmostEqual(self.nav.position(), expected)
self.assertRaises(TypeError, self.nav.forward, 'skldjfldsk')
def test_backwards(self):
self.nav.back(200)
expected = Vec2D(-200, 0)
self.assertVectorsAlmostEqual(self.nav.position(), expected)
self.nav.reset()
self.nav.right(90)
self.nav.back(200)
expected = Vec2D(0, 200)
self.assertVectorsAlmostEqual(self.nav.position(), expected)
def test_distance(self):
self.nav.forward(100)
expected = 100
self.assertAlmostEqual(self.nav.distance(Vec2D(0,0)), expected)
def test_radians_and_degrees(self):
self.nav.left(90)
self.assertAlmostEqual(self.nav.heading(), 90)
self.nav.radians()
self.assertAlmostEqual(self.nav.heading(), 1.57079633)
self.nav.degrees()
self.assertAlmostEqual(self.nav.heading(), 90)
def test_towards(self):
coordinates = [
# coordinates, expected
((100, 0), 0.0),
((100, 100), 45.0),
((0, 100), 90.0),
((-100, 100), 135.0),
((-100, 0), 180.0),
((-100, -100), 225.0),
((0, -100), 270.0),
((100, -100), 315.0),
]
for (x, y), expected in coordinates:
self.assertEqual(self.nav.towards(x, y), expected)
self.assertEqual(self.nav.towards((x, y)), expected)
self.assertEqual(self.nav.towards(Vec2D(x, y)), expected)
def test_heading(self):
self.nav.left(90)
self.assertAlmostEqual(self.nav.heading(), 90)
self.nav.left(45)
self.assertAlmostEqual(self.nav.heading(), 135)
self.nav.right(1.6)
self.assertAlmostEqual(self.nav.heading(), 133.4)
self.assertRaises(TypeError, self.nav.right, 'sdkfjdsf')
self.nav.reset()
rotations = [10, 20, 170, 300]
result = sum(rotations) % 360
for num in rotations:
self.nav.left(num)
self.assertEqual(self.nav.heading(), result)
self.nav.reset()
result = (360-sum(rotations)) % 360
for num in rotations:
self.nav.right(num)
self.assertEqual(self.nav.heading(), result)
self.nav.reset()
rotations = [10, 20, -170, 300, -210, 34.3, -50.2, -10, -29.98, 500]
sum_so_far = 0
for num in rotations:
if num < 0:
self.nav.right(abs(num))
else:
self.nav.left(num)
sum_so_far += num
self.assertAlmostEqual(self.nav.heading(), sum_so_far % 360)
def test_setheading(self):
self.nav.setheading(102.32)
self.assertAlmostEqual(self.nav.heading(), 102.32)
self.nav.setheading(-123.23)
self.assertAlmostEqual(self.nav.heading(), (-123.23) % 360)
self.nav.setheading(-1000.34)
self.assertAlmostEqual(self.nav.heading(), (-1000.34) % 360)
self.nav.setheading(300000)
self.assertAlmostEqual(self.nav.heading(), 300000%360)
def test_positions(self):
self.nav.forward(100)
self.nav.left(90)
self.nav.forward(-200)
self.assertVectorsAlmostEqual(self.nav.pos(), (100.0, -200.0))
def test_setx_and_sety(self):
self.nav.setx(-1023.2334)
self.nav.sety(193323.234)
self.assertVectorsAlmostEqual(self.nav.pos(), (-1023.2334, 193323.234))
def test_home(self):
self.nav.left(30)
self.nav.forward(-100000)
self.nav.home()
self.assertVectorsAlmostEqual(self.nav.pos(), (0,0))
self.assertAlmostEqual(self.nav.heading(), 0)
def test_distance_method(self):
self.assertAlmostEqual(self.nav.distance(30, 40), 50)
vec = Vec2D(0.22, .001)
self.assertAlmostEqual(self.nav.distance(vec), 0.22000227271553355)
another_turtle = turtle.TNavigator()
another_turtle.left(90)
another_turtle.forward(10000)
self.assertAlmostEqual(self.nav.distance(another_turtle), 10000)
class TestTPen(unittest.TestCase):
def test_pendown_and_penup(self):
tpen = turtle.TPen()
self.assertTrue(tpen.isdown())
tpen.penup()
self.assertFalse(tpen.isdown())
tpen.pendown()
self.assertTrue(tpen.isdown())
def test_showturtle_hideturtle_and_isvisible(self):
tpen = turtle.TPen()
self.assertTrue(tpen.isvisible())
tpen.hideturtle()
self.assertFalse(tpen.isvisible())
tpen.showturtle()
self.assertTrue(tpen.isvisible())
if __name__ == '__main__':
unittest.main()
| 12,657 | 437 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/cfgparser.1 | # Also used by idlelib.test_idle.test_config.
[Foo Bar]
foo=newbar
| 67 | 4 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_unicode_identifiers.py | import unittest
import sys
class PEP3131Test(unittest.TestCase):
def test_valid(self):
class T:
ä = 1
µ = 2 # this is a compatibility character
è = 3
xó = 4
self.assertEqual(getattr(T, "\xe4"), 1)
self.assertEqual(getattr(T, "\u03bc"), 2)
self.assertEqual(getattr(T, '\u87d2'), 3)
self.assertEqual(getattr(T, 'x\U000E0100'), 4)
def test_non_bmp_normalized(self):
ðð«ð¦ð ð¬ð¡ð¢ = 1
self.assertIn("Unicode", dir())
def test_invalid(self):
try:
from test import badsyntax_3131
except SyntaxError as s:
self.assertEqual(str(s),
"invalid character in identifier (badsyntax_3131.py, line 2)")
except ImportError:
pass # don't care
else:
self.fail("expected exception didn't occur")
if __name__ == "__main__":
unittest.main()
| 961 | 34 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_gdb.py | # Verify that gdb can pretty-print the various PyObject* types
#
# The code for testing gdb was adapted from similar work in Unladen Swallow's
# Lib/test/test_jit_gdb.py
import locale
import os
import platform
import re
import subprocess
import sys
import sysconfig
import textwrap
import unittest
# Is this Python configured to support threads?
try:
import _thread
except ImportError:
_thread = None
from test import support
from test.support import run_unittest, findfile, python_is_optimized
def get_gdb_version():
try:
proc = subprocess.Popen(["gdb", "-nx", "--version"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
universal_newlines=True)
with proc:
version = proc.communicate()[0]
except OSError:
# This is what "no gdb" looks like. There may, however, be other
# errors that manifest this way too.
raise unittest.SkipTest("Couldn't find gdb on the path")
# Regex to parse:
# 'GNU gdb (GDB; SUSE Linux Enterprise 12) 7.7\n' -> 7.7
# 'GNU gdb (GDB) Fedora 7.9.1-17.fc22\n' -> 7.9
# 'GNU gdb 6.1.1 [FreeBSD]\n' -> 6.1
# 'GNU gdb (GDB) Fedora (7.5.1-37.fc18)\n' -> 7.5
match = re.search(r"^GNU gdb.*?\b(\d+)\.(\d+)", version)
if match is None:
raise Exception("unable to parse GDB version: %r" % version)
return (version, int(match.group(1)), int(match.group(2)))
gdb_version, gdb_major_version, gdb_minor_version = get_gdb_version()
if gdb_major_version < 7:
raise unittest.SkipTest("gdb versions before 7.0 didn't support python "
"embedding. Saw %s.%s:\n%s"
% (gdb_major_version, gdb_minor_version,
gdb_version))
if not sysconfig.is_python_build():
raise unittest.SkipTest("test_gdb only works on source builds at the moment.")
if 'Clang' in platform.python_compiler() and sys.platform == 'darwin':
raise unittest.SkipTest("test_gdb doesn't work correctly when python is"
" built with LLVM clang")
# Location of custom hooks file in a repository checkout.
checkout_hook_path = os.path.join(os.path.dirname(sys.executable),
'python-gdb.py')
PYTHONHASHSEED = '123'
def cet_protection():
cflags = sysconfig.get_config_var('CFLAGS')
if not cflags:
return False
flags = cflags.split()
# True if "-mcet -fcf-protection" options are found, but false
# if "-fcf-protection=none" or "-fcf-protection=return" is found.
return (('-mcet' in flags)
and any((flag.startswith('-fcf-protection')
and not flag.endswith(("=none", "=return")))
for flag in flags))
# Control-flow enforcement technology
CET_PROTECTION = cet_protection()
def run_gdb(*args, **env_vars):
"""Runs gdb in --batch mode with the additional arguments given by *args.
Returns its (stdout, stderr) decoded from utf-8 using the replace handler.
"""
if env_vars:
env = os.environ.copy()
env.update(env_vars)
else:
env = None
# -nx: Do not execute commands from any .gdbinit initialization files
# (issue #22188)
base_cmd = ('gdb', '--batch', '-nx')
if (gdb_major_version, gdb_minor_version) >= (7, 4):
base_cmd += ('-iex', 'add-auto-load-safe-path ' + checkout_hook_path)
proc = subprocess.Popen(base_cmd + args,
# Redirect stdin to prevent GDB from messing with
# the terminal settings
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
env=env)
with proc:
out, err = proc.communicate()
return out.decode('utf-8', 'replace'), err.decode('utf-8', 'replace')
# Verify that "gdb" was built with the embedded python support enabled:
gdbpy_version, _ = run_gdb("--eval-command=python import sys; print(sys.version_info)")
if not gdbpy_version:
raise unittest.SkipTest("gdb not built with embedded python support")
# Verify that "gdb" can load our custom hooks, as OS security settings may
# disallow this without a customized .gdbinit.
_, gdbpy_errors = run_gdb('--args', sys.executable)
if "auto-loading has been declined" in gdbpy_errors:
msg = "gdb security settings prevent use of custom hooks: "
raise unittest.SkipTest(msg + gdbpy_errors.rstrip())
def gdb_has_frame_select():
# Does this build of gdb have gdb.Frame.select ?
stdout, _ = run_gdb("--eval-command=python print(dir(gdb.Frame))")
m = re.match(r'.*\[(.*)\].*', stdout)
if not m:
raise unittest.SkipTest("Unable to parse output from gdb.Frame.select test")
gdb_frame_dir = m.group(1).split(', ')
return "'select'" in gdb_frame_dir
HAS_PYUP_PYDOWN = gdb_has_frame_select()
BREAKPOINT_FN='builtin_id'
@unittest.skipIf(support.PGO, "not useful for PGO")
class DebuggerTests(unittest.TestCase):
"""Test that the debugger can debug Python."""
def get_stack_trace(self, source=None, script=None,
breakpoint=BREAKPOINT_FN,
cmds_after_breakpoint=None,
import_site=False):
'''
Run 'python -c SOURCE' under gdb with a breakpoint.
Support injecting commands after the breakpoint is reached
Returns the stdout from gdb
cmds_after_breakpoint: if provided, a list of strings: gdb commands
'''
# We use "set breakpoint pending yes" to avoid blocking with a:
# Function "foo" not defined.
# Make breakpoint pending on future shared library load? (y or [n])
# error, which typically happens python is dynamically linked (the
# breakpoints of interest are to be found in the shared library)
# When this happens, we still get:
# Function "textiowrapper_write" not defined.
# emitted to stderr each time, alas.
# Initially I had "--eval-command=continue" here, but removed it to
# avoid repeated print breakpoints when traversing hierarchical data
# structures
# Generate a list of commands in gdb's language:
commands = ['set breakpoint pending yes',
'break %s' % breakpoint,
# The tests assume that the first frame of printed
# backtrace will not contain program counter,
# that is however not guaranteed by gdb
# therefore we need to use 'set print address off' to
# make sure the counter is not there. For example:
# #0 in PyObject_Print ...
# is assumed, but sometimes this can be e.g.
# #0 0x00003fffb7dd1798 in PyObject_Print ...
'set print address off',
'run']
# GDB as of 7.4 onwards can distinguish between the
# value of a variable at entry vs current value:
# http://sourceware.org/gdb/onlinedocs/gdb/Variables.html
# which leads to the selftests failing with errors like this:
# AssertionError: 'v@entry=()' != '()'
# Disable this:
if (gdb_major_version, gdb_minor_version) >= (7, 4):
commands += ['set print entry-values no']
if cmds_after_breakpoint:
if CET_PROTECTION:
# bpo-32962: When Python is compiled with -mcet
# -fcf-protection, function arguments are unusable before
# running the first instruction of the function entry point.
# The 'next' command makes the required first step.
commands += ['next']
commands += cmds_after_breakpoint
else:
commands += ['backtrace']
# print commands
# Use "commands" to generate the arguments with which to invoke "gdb":
args = ['--eval-command=%s' % cmd for cmd in commands]
args += ["--args",
sys.executable]
args.extend(subprocess._args_from_interpreter_flags())
if not import_site:
# -S suppresses the default 'import site'
args += ["-S"]
if source:
args += ["-c", source]
elif script:
args += [script]
# print args
# print (' '.join(args))
# Use "args" to invoke gdb, capturing stdout, stderr:
out, err = run_gdb(*args, PYTHONHASHSEED=PYTHONHASHSEED)
errlines = err.splitlines()
unexpected_errlines = []
# Ignore some benign messages on stderr.
ignore_patterns = (
'Function "%s" not defined.' % breakpoint,
'Do you need "set solib-search-path" or '
'"set sysroot"?',
# BFD: /usr/lib/debug/(...): unable to initialize decompress
# status for section .debug_aranges
'BFD: ',
# ignore all warnings
'warning: ',
)
for line in errlines:
if not line:
continue
# bpo34007: Sometimes some versions of the shared libraries that
# are part of the traceback are compiled in optimised mode and the
# Program Counter (PC) is not present, not allowing gdb to walk the
# frames back. When this happens, the Python bindings of gdb raise
# an exception, making the test impossible to succeed.
if "PC not saved" in line:
raise unittest.SkipTest("gdb cannot walk the frame object"
" because the Program Counter is"
" not present")
if not line.startswith(ignore_patterns):
unexpected_errlines.append(line)
# Ensure no unexpected error messages:
self.assertEqual(unexpected_errlines, [])
return out
def get_gdb_repr(self, source,
cmds_after_breakpoint=None,
import_site=False):
# Given an input python source representation of data,
# run "python -c'id(DATA)'" under gdb with a breakpoint on
# builtin_id and scrape out gdb's representation of the "op"
# parameter, and verify that the gdb displays the same string
#
# Verify that the gdb displays the expected string
#
# For a nested structure, the first time we hit the breakpoint will
# give us the top-level structure
# NOTE: avoid decoding too much of the traceback as some
# undecodable characters may lurk there in optimized mode
# (issue #19743).
cmds_after_breakpoint = cmds_after_breakpoint or ["backtrace 1"]
gdb_output = self.get_stack_trace(source, breakpoint=BREAKPOINT_FN,
cmds_after_breakpoint=cmds_after_breakpoint,
import_site=import_site)
# gdb can insert additional '\n' and space characters in various places
# in its output, depending on the width of the terminal it's connected
# to (using its "wrap_here" function)
m = re.match(r'.*#0\s+builtin_id\s+\(self\=.*,\s+v=\s*(.*?)\)\s+at\s+\S*Python/bltinmodule.c.*',
gdb_output, re.DOTALL)
if not m:
self.fail('Unexpected gdb output: %r\n%s' % (gdb_output, gdb_output))
return m.group(1), gdb_output
def assertEndsWith(self, actual, exp_end):
'''Ensure that the given "actual" string ends with "exp_end"'''
self.assertTrue(actual.endswith(exp_end),
msg='%r did not end with %r' % (actual, exp_end))
def assertMultilineMatches(self, actual, pattern):
m = re.match(pattern, actual, re.DOTALL)
if not m:
self.fail(msg='%r did not match %r' % (actual, pattern))
def get_sample_script(self):
return findfile('gdb_sample.py')
class PrettyPrintTests(DebuggerTests):
def test_getting_backtrace(self):
gdb_output = self.get_stack_trace('id(42)')
self.assertTrue(BREAKPOINT_FN in gdb_output)
def assertGdbRepr(self, val, exp_repr=None):
# Ensure that gdb's rendering of the value in a debugged process
# matches repr(value) in this process:
gdb_repr, gdb_output = self.get_gdb_repr('id(' + ascii(val) + ')')
if not exp_repr:
exp_repr = repr(val)
self.assertEqual(gdb_repr, exp_repr,
('%r did not equal expected %r; full output was:\n%s'
% (gdb_repr, exp_repr, gdb_output)))
def test_int(self):
'Verify the pretty-printing of various int values'
self.assertGdbRepr(42)
self.assertGdbRepr(0)
self.assertGdbRepr(-7)
self.assertGdbRepr(1000000000000)
self.assertGdbRepr(-1000000000000000)
def test_singletons(self):
'Verify the pretty-printing of True, False and None'
self.assertGdbRepr(True)
self.assertGdbRepr(False)
self.assertGdbRepr(None)
def test_dicts(self):
'Verify the pretty-printing of dictionaries'
self.assertGdbRepr({})
self.assertGdbRepr({'foo': 'bar'}, "{'foo': 'bar'}")
# Python preserves insertion order since 3.6
self.assertGdbRepr({'foo': 'bar', 'douglas': 42}, "{'foo': 'bar', 'douglas': 42}")
def test_lists(self):
'Verify the pretty-printing of lists'
self.assertGdbRepr([])
self.assertGdbRepr(list(range(5)))
def test_bytes(self):
'Verify the pretty-printing of bytes'
self.assertGdbRepr(b'')
self.assertGdbRepr(b'And now for something hopefully the same')
self.assertGdbRepr(b'string with embedded NUL here \0 and then some more text')
self.assertGdbRepr(b'this is a tab:\t'
b' this is a slash-N:\n'
b' this is a slash-R:\r'
)
self.assertGdbRepr(b'this is byte 255:\xff and byte 128:\x80')
self.assertGdbRepr(bytes([b for b in range(255)]))
def test_strings(self):
'Verify the pretty-printing of unicode strings'
encoding = locale.getpreferredencoding()
def check_repr(text):
try:
text.encode(encoding)
printable = True
except UnicodeEncodeError:
self.assertGdbRepr(text, ascii(text))
else:
self.assertGdbRepr(text)
self.assertGdbRepr('')
self.assertGdbRepr('And now for something hopefully the same')
self.assertGdbRepr('string with embedded NUL here \0 and then some more text')
# Test printing a single character:
# U+2620 SKULL AND CROSSBONES
check_repr('\u2620')
# Test printing a Japanese unicode string
# (I believe this reads "mojibake", using 3 characters from the CJK
# Unified Ideographs area, followed by U+3051 HIRAGANA LETTER KE)
check_repr('\u6587\u5b57\u5316\u3051')
# Test a character outside the BMP:
# U+1D121 MUSICAL SYMBOL C CLEF
# This is:
# UTF-8: 0xF0 0x9D 0x84 0xA1
# UTF-16: 0xD834 0xDD21
check_repr(chr(0x1D121))
def test_tuples(self):
'Verify the pretty-printing of tuples'
self.assertGdbRepr(tuple(), '()')
self.assertGdbRepr((1,), '(1,)')
self.assertGdbRepr(('foo', 'bar', 'baz'))
def test_sets(self):
'Verify the pretty-printing of sets'
if (gdb_major_version, gdb_minor_version) < (7, 3):
self.skipTest("pretty-printing of sets needs gdb 7.3 or later")
self.assertGdbRepr(set(), "set()")
self.assertGdbRepr(set(['a']), "{'a'}")
# PYTHONHASHSEED is need to get the exact frozenset item order
if not sys.flags.ignore_environment:
self.assertGdbRepr(set(['a', 'b']), "{'a', 'b'}")
self.assertGdbRepr(set([4, 5, 6]), "{4, 5, 6}")
# Ensure that we handle sets containing the "dummy" key value,
# which happens on deletion:
gdb_repr, gdb_output = self.get_gdb_repr('''s = set(['a','b'])
s.remove('a')
id(s)''')
self.assertEqual(gdb_repr, "{'b'}")
def test_frozensets(self):
'Verify the pretty-printing of frozensets'
if (gdb_major_version, gdb_minor_version) < (7, 3):
self.skipTest("pretty-printing of frozensets needs gdb 7.3 or later")
self.assertGdbRepr(frozenset(), "frozenset()")
self.assertGdbRepr(frozenset(['a']), "frozenset({'a'})")
# PYTHONHASHSEED is need to get the exact frozenset item order
if not sys.flags.ignore_environment:
self.assertGdbRepr(frozenset(['a', 'b']), "frozenset({'a', 'b'})")
self.assertGdbRepr(frozenset([4, 5, 6]), "frozenset({4, 5, 6})")
def test_exceptions(self):
# Test a RuntimeError
gdb_repr, gdb_output = self.get_gdb_repr('''
try:
raise RuntimeError("I am an error")
except RuntimeError as e:
id(e)
''')
self.assertEqual(gdb_repr,
"RuntimeError('I am an error',)")
# Test division by zero:
gdb_repr, gdb_output = self.get_gdb_repr('''
try:
a = 1 / 0
except ZeroDivisionError as e:
id(e)
''')
self.assertEqual(gdb_repr,
"ZeroDivisionError('division by zero',)")
def test_modern_class(self):
'Verify the pretty-printing of new-style class instances'
gdb_repr, gdb_output = self.get_gdb_repr('''
class Foo:
pass
foo = Foo()
foo.an_int = 42
id(foo)''')
m = re.match(r'<Foo\(an_int=42\) at remote 0x-?[0-9a-f]+>', gdb_repr)
self.assertTrue(m,
msg='Unexpected new-style class rendering %r' % gdb_repr)
def test_subclassing_list(self):
'Verify the pretty-printing of an instance of a list subclass'
gdb_repr, gdb_output = self.get_gdb_repr('''
class Foo(list):
pass
foo = Foo()
foo += [1, 2, 3]
foo.an_int = 42
id(foo)''')
m = re.match(r'<Foo\(an_int=42\) at remote 0x-?[0-9a-f]+>', gdb_repr)
self.assertTrue(m,
msg='Unexpected new-style class rendering %r' % gdb_repr)
def test_subclassing_tuple(self):
'Verify the pretty-printing of an instance of a tuple subclass'
# This should exercise the negative tp_dictoffset code in the
# new-style class support
gdb_repr, gdb_output = self.get_gdb_repr('''
class Foo(tuple):
pass
foo = Foo((1, 2, 3))
foo.an_int = 42
id(foo)''')
m = re.match(r'<Foo\(an_int=42\) at remote 0x-?[0-9a-f]+>', gdb_repr)
self.assertTrue(m,
msg='Unexpected new-style class rendering %r' % gdb_repr)
def assertSane(self, source, corruption, exprepr=None):
'''Run Python under gdb, corrupting variables in the inferior process
immediately before taking a backtrace.
Verify that the variable's representation is the expected failsafe
representation'''
if corruption:
cmds_after_breakpoint=[corruption, 'backtrace']
else:
cmds_after_breakpoint=['backtrace']
gdb_repr, gdb_output = \
self.get_gdb_repr(source,
cmds_after_breakpoint=cmds_after_breakpoint)
if exprepr:
if gdb_repr == exprepr:
# gdb managed to print the value in spite of the corruption;
# this is good (see http://bugs.python.org/issue8330)
return
# Match anything for the type name; 0xDEADBEEF could point to
# something arbitrary (see http://bugs.python.org/issue8330)
pattern = '<.* at remote 0x-?[0-9a-f]+>'
m = re.match(pattern, gdb_repr)
if not m:
self.fail('Unexpected gdb representation: %r\n%s' % \
(gdb_repr, gdb_output))
def test_NULL_ptr(self):
'Ensure that a NULL PyObject* is handled gracefully'
gdb_repr, gdb_output = (
self.get_gdb_repr('id(42)',
cmds_after_breakpoint=['set variable v=0',
'backtrace'])
)
self.assertEqual(gdb_repr, '0x0')
def test_NULL_ob_type(self):
'Ensure that a PyObject* with NULL ob_type is handled gracefully'
self.assertSane('id(42)',
'set v->ob_type=0')
def test_corrupt_ob_type(self):
'Ensure that a PyObject* with a corrupt ob_type is handled gracefully'
self.assertSane('id(42)',
'set v->ob_type=0xDEADBEEF',
exprepr='42')
def test_corrupt_tp_flags(self):
'Ensure that a PyObject* with a type with corrupt tp_flags is handled'
self.assertSane('id(42)',
'set v->ob_type->tp_flags=0x0',
exprepr='42')
def test_corrupt_tp_name(self):
'Ensure that a PyObject* with a type with corrupt tp_name is handled'
self.assertSane('id(42)',
'set v->ob_type->tp_name=0xDEADBEEF',
exprepr='42')
def test_builtins_help(self):
'Ensure that the new-style class _Helper in site.py can be handled'
if sys.flags.no_site:
self.skipTest("need site module, but -S option was used")
# (this was the issue causing tracebacks in
# http://bugs.python.org/issue8032#msg100537 )
gdb_repr, gdb_output = self.get_gdb_repr('id(__builtins__.help)', import_site=True)
m = re.match(r'<_Helper at remote 0x-?[0-9a-f]+>', gdb_repr)
self.assertTrue(m,
msg='Unexpected rendering %r' % gdb_repr)
def test_selfreferential_list(self):
'''Ensure that a reference loop involving a list doesn't lead proxyval
into an infinite loop:'''
gdb_repr, gdb_output = \
self.get_gdb_repr("a = [3, 4, 5] ; a.append(a) ; id(a)")
self.assertEqual(gdb_repr, '[3, 4, 5, [...]]')
gdb_repr, gdb_output = \
self.get_gdb_repr("a = [3, 4, 5] ; b = [a] ; a.append(b) ; id(a)")
self.assertEqual(gdb_repr, '[3, 4, 5, [[...]]]')
def test_selfreferential_dict(self):
'''Ensure that a reference loop involving a dict doesn't lead proxyval
into an infinite loop:'''
gdb_repr, gdb_output = \
self.get_gdb_repr("a = {} ; b = {'bar':a} ; a['foo'] = b ; id(a)")
self.assertEqual(gdb_repr, "{'foo': {'bar': {...}}}")
def test_selfreferential_old_style_instance(self):
gdb_repr, gdb_output = \
self.get_gdb_repr('''
class Foo:
pass
foo = Foo()
foo.an_attr = foo
id(foo)''')
self.assertTrue(re.match(r'<Foo\(an_attr=<\.\.\.>\) at remote 0x-?[0-9a-f]+>',
gdb_repr),
'Unexpected gdb representation: %r\n%s' % \
(gdb_repr, gdb_output))
def test_selfreferential_new_style_instance(self):
gdb_repr, gdb_output = \
self.get_gdb_repr('''
class Foo(object):
pass
foo = Foo()
foo.an_attr = foo
id(foo)''')
self.assertTrue(re.match(r'<Foo\(an_attr=<\.\.\.>\) at remote 0x-?[0-9a-f]+>',
gdb_repr),
'Unexpected gdb representation: %r\n%s' % \
(gdb_repr, gdb_output))
gdb_repr, gdb_output = \
self.get_gdb_repr('''
class Foo(object):
pass
a = Foo()
b = Foo()
a.an_attr = b
b.an_attr = a
id(a)''')
self.assertTrue(re.match(r'<Foo\(an_attr=<Foo\(an_attr=<\.\.\.>\) at remote 0x-?[0-9a-f]+>\) at remote 0x-?[0-9a-f]+>',
gdb_repr),
'Unexpected gdb representation: %r\n%s' % \
(gdb_repr, gdb_output))
def test_truncation(self):
'Verify that very long output is truncated'
gdb_repr, gdb_output = self.get_gdb_repr('id(list(range(1000)))')
self.assertEqual(gdb_repr,
"[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, "
"14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, "
"27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, "
"40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, "
"53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, "
"66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, "
"79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, "
"92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, "
"104, 105, 106, 107, 108, 109, 110, 111, 112, 113, "
"114, 115, 116, 117, 118, 119, 120, 121, 122, 123, "
"124, 125, 126, 127, 128, 129, 130, 131, 132, 133, "
"134, 135, 136, 137, 138, 139, 140, 141, 142, 143, "
"144, 145, 146, 147, 148, 149, 150, 151, 152, 153, "
"154, 155, 156, 157, 158, 159, 160, 161, 162, 163, "
"164, 165, 166, 167, 168, 169, 170, 171, 172, 173, "
"174, 175, 176, 177, 178, 179, 180, 181, 182, 183, "
"184, 185, 186, 187, 188, 189, 190, 191, 192, 193, "
"194, 195, 196, 197, 198, 199, 200, 201, 202, 203, "
"204, 205, 206, 207, 208, 209, 210, 211, 212, 213, "
"214, 215, 216, 217, 218, 219, 220, 221, 222, 223, "
"224, 225, 226...(truncated)")
self.assertEqual(len(gdb_repr),
1024 + len('...(truncated)'))
def test_builtin_method(self):
gdb_repr, gdb_output = self.get_gdb_repr('import sys; id(sys.stdout.readlines)')
self.assertTrue(re.match(r'<built-in method readlines of _io.TextIOWrapper object at remote 0x-?[0-9a-f]+>',
gdb_repr),
'Unexpected gdb representation: %r\n%s' % \
(gdb_repr, gdb_output))
def test_frames(self):
gdb_output = self.get_stack_trace('''
def foo(a, b, c):
pass
foo(3, 4, 5)
id(foo.__code__)''',
breakpoint='builtin_id',
cmds_after_breakpoint=['print (PyFrameObject*)(((PyCodeObject*)v)->co_zombieframe)']
)
self.assertTrue(re.match(r'.*\s+\$1 =\s+Frame 0x-?[0-9a-f]+, for file <string>, line 3, in foo \(\)\s+.*',
gdb_output,
re.DOTALL),
'Unexpected gdb representation: %r\n%s' % (gdb_output, gdb_output))
@unittest.skipIf(python_is_optimized(),
"Python was compiled with optimizations")
class PyListTests(DebuggerTests):
def assertListing(self, expected, actual):
self.assertEndsWith(actual, expected)
def test_basic_command(self):
'Verify that the "py-list" command works'
bt = self.get_stack_trace(script=self.get_sample_script(),
cmds_after_breakpoint=['py-list'])
self.assertListing(' 5 \n'
' 6 def bar(a, b, c):\n'
' 7 baz(a, b, c)\n'
' 8 \n'
' 9 def baz(*args):\n'
' >10 id(42)\n'
' 11 \n'
' 12 foo(1, 2, 3)\n',
bt)
def test_one_abs_arg(self):
'Verify the "py-list" command with one absolute argument'
bt = self.get_stack_trace(script=self.get_sample_script(),
cmds_after_breakpoint=['py-list 9'])
self.assertListing(' 9 def baz(*args):\n'
' >10 id(42)\n'
' 11 \n'
' 12 foo(1, 2, 3)\n',
bt)
def test_two_abs_args(self):
'Verify the "py-list" command with two absolute arguments'
bt = self.get_stack_trace(script=self.get_sample_script(),
cmds_after_breakpoint=['py-list 1,3'])
self.assertListing(' 1 # Sample script for use by test_gdb.py\n'
' 2 \n'
' 3 def foo(a, b, c):\n',
bt)
class StackNavigationTests(DebuggerTests):
@unittest.skipUnless(HAS_PYUP_PYDOWN, "test requires py-up/py-down commands")
@unittest.skipIf(python_is_optimized(),
"Python was compiled with optimizations")
def test_pyup_command(self):
'Verify that the "py-up" command works'
bt = self.get_stack_trace(script=self.get_sample_script(),
cmds_after_breakpoint=['py-up', 'py-up'])
self.assertMultilineMatches(bt,
r'''^.*
#[0-9]+ Frame 0x-?[0-9a-f]+, for file .*gdb_sample.py, line 7, in bar \(a=1, b=2, c=3\)
baz\(a, b, c\)
$''')
@unittest.skipUnless(HAS_PYUP_PYDOWN, "test requires py-up/py-down commands")
def test_down_at_bottom(self):
'Verify handling of "py-down" at the bottom of the stack'
bt = self.get_stack_trace(script=self.get_sample_script(),
cmds_after_breakpoint=['py-down'])
self.assertEndsWith(bt,
'Unable to find a newer python frame\n')
@unittest.skipUnless(HAS_PYUP_PYDOWN, "test requires py-up/py-down commands")
def test_up_at_top(self):
'Verify handling of "py-up" at the top of the stack'
bt = self.get_stack_trace(script=self.get_sample_script(),
cmds_after_breakpoint=['py-up'] * 5)
self.assertEndsWith(bt,
'Unable to find an older python frame\n')
@unittest.skipUnless(HAS_PYUP_PYDOWN, "test requires py-up/py-down commands")
@unittest.skipIf(python_is_optimized(),
"Python was compiled with optimizations")
def test_up_then_down(self):
'Verify "py-up" followed by "py-down"'
bt = self.get_stack_trace(script=self.get_sample_script(),
cmds_after_breakpoint=['py-up', 'py-up', 'py-down'])
self.assertMultilineMatches(bt,
r'''^.*
#[0-9]+ Frame 0x-?[0-9a-f]+, for file .*gdb_sample.py, line 7, in bar \(a=1, b=2, c=3\)
baz\(a, b, c\)
#[0-9]+ Frame 0x-?[0-9a-f]+, for file .*gdb_sample.py, line 10, in baz \(args=\(1, 2, 3\)\)
id\(42\)
$''')
class PyBtTests(DebuggerTests):
@unittest.skipIf(python_is_optimized(),
"Python was compiled with optimizations")
def test_bt(self):
'Verify that the "py-bt" command works'
bt = self.get_stack_trace(script=self.get_sample_script(),
cmds_after_breakpoint=['py-bt'])
self.assertMultilineMatches(bt,
r'''^.*
Traceback \(most recent call first\):
<built-in method id of module object .*>
File ".*gdb_sample.py", line 10, in baz
id\(42\)
File ".*gdb_sample.py", line 7, in bar
baz\(a, b, c\)
File ".*gdb_sample.py", line 4, in foo
bar\(a, b, c\)
File ".*gdb_sample.py", line 12, in <module>
foo\(1, 2, 3\)
''')
@unittest.skipIf(python_is_optimized(),
"Python was compiled with optimizations")
def test_bt_full(self):
'Verify that the "py-bt-full" command works'
bt = self.get_stack_trace(script=self.get_sample_script(),
cmds_after_breakpoint=['py-bt-full'])
self.assertMultilineMatches(bt,
r'''^.*
#[0-9]+ Frame 0x-?[0-9a-f]+, for file .*gdb_sample.py, line 7, in bar \(a=1, b=2, c=3\)
baz\(a, b, c\)
#[0-9]+ Frame 0x-?[0-9a-f]+, for file .*gdb_sample.py, line 4, in foo \(a=1, b=2, c=3\)
bar\(a, b, c\)
#[0-9]+ Frame 0x-?[0-9a-f]+, for file .*gdb_sample.py, line 12, in <module> \(\)
foo\(1, 2, 3\)
''')
@unittest.skipUnless(_thread,
"Python was compiled without thread support")
def test_threads(self):
'Verify that "py-bt" indicates threads that are waiting for the GIL'
cmd = '''
from threading import Thread
class TestThread(Thread):
# These threads would run forever, but we'll interrupt things with the
# debugger
def run(self):
i = 0
while 1:
i += 1
t = {}
for i in range(4):
t[i] = TestThread()
t[i].start()
# Trigger a breakpoint on the main thread
id(42)
'''
# Verify with "py-bt":
gdb_output = self.get_stack_trace(cmd,
cmds_after_breakpoint=['thread apply all py-bt'])
self.assertIn('Waiting for the GIL', gdb_output)
# Verify with "py-bt-full":
gdb_output = self.get_stack_trace(cmd,
cmds_after_breakpoint=['thread apply all py-bt-full'])
self.assertIn('Waiting for the GIL', gdb_output)
@unittest.skipIf(python_is_optimized(),
"Python was compiled with optimizations")
# Some older versions of gdb will fail with
# "Cannot find new threads: generic error"
# unless we add LD_PRELOAD=PATH-TO-libpthread.so.1 as a workaround
@unittest.skipUnless(_thread,
"Python was compiled without thread support")
def test_gc(self):
'Verify that "py-bt" indicates if a thread is garbage-collecting'
cmd = ('from gc import collect\n'
'id(42)\n'
'def foo():\n'
' collect()\n'
'def bar():\n'
' foo()\n'
'bar()\n')
# Verify with "py-bt":
gdb_output = self.get_stack_trace(cmd,
cmds_after_breakpoint=['break update_refs', 'continue', 'py-bt'],
)
self.assertIn('Garbage-collecting', gdb_output)
# Verify with "py-bt-full":
gdb_output = self.get_stack_trace(cmd,
cmds_after_breakpoint=['break update_refs', 'continue', 'py-bt-full'],
)
self.assertIn('Garbage-collecting', gdb_output)
@unittest.skipIf(python_is_optimized(),
"Python was compiled with optimizations")
# Some older versions of gdb will fail with
# "Cannot find new threads: generic error"
# unless we add LD_PRELOAD=PATH-TO-libpthread.so.1 as a workaround
@unittest.skipUnless(_thread,
"Python was compiled without thread support")
def test_pycfunction(self):
'Verify that "py-bt" displays invocations of PyCFunction instances'
# Tested function must not be defined with METH_NOARGS or METH_O,
# otherwise call_function() doesn't call PyCFunction_Call()
cmd = ('from time import gmtime\n'
'def foo():\n'
' gmtime(1)\n'
'def bar():\n'
' foo()\n'
'bar()\n')
# Verify with "py-bt":
gdb_output = self.get_stack_trace(cmd,
breakpoint='time_gmtime',
cmds_after_breakpoint=['bt', 'py-bt'],
)
self.assertIn('<built-in method gmtime', gdb_output)
# Verify with "py-bt-full":
gdb_output = self.get_stack_trace(cmd,
breakpoint='time_gmtime',
cmds_after_breakpoint=['py-bt-full'],
)
self.assertIn('#1 <built-in method gmtime', gdb_output)
@unittest.skipIf(python_is_optimized(),
"Python was compiled with optimizations")
def test_wrapper_call(self):
cmd = textwrap.dedent('''
class MyList(list):
def __init__(self):
super().__init__() # wrapper_call()
id("first break point")
l = MyList()
''')
cmds_after_breakpoint = ['break wrapper_call', 'continue']
if CET_PROTECTION:
# bpo-32962: same case as in get_stack_trace():
# we need an additional 'next' command in order to read
# arguments of the innermost function of the call stack.
cmds_after_breakpoint.append('next')
cmds_after_breakpoint.append('py-bt')
# Verify with "py-bt":
gdb_output = self.get_stack_trace(cmd,
cmds_after_breakpoint=cmds_after_breakpoint)
self.assertRegex(gdb_output,
r"<method-wrapper u?'__init__' of MyList object at ")
class PyPrintTests(DebuggerTests):
@unittest.skipIf(python_is_optimized(),
"Python was compiled with optimizations")
def test_basic_command(self):
'Verify that the "py-print" command works'
bt = self.get_stack_trace(script=self.get_sample_script(),
cmds_after_breakpoint=['py-up', 'py-print args'])
self.assertMultilineMatches(bt,
r".*\nlocal 'args' = \(1, 2, 3\)\n.*")
@unittest.skipIf(python_is_optimized(),
"Python was compiled with optimizations")
@unittest.skipUnless(HAS_PYUP_PYDOWN, "test requires py-up/py-down commands")
def test_print_after_up(self):
bt = self.get_stack_trace(script=self.get_sample_script(),
cmds_after_breakpoint=['py-up', 'py-up', 'py-print c', 'py-print b', 'py-print a'])
self.assertMultilineMatches(bt,
r".*\nlocal 'c' = 3\nlocal 'b' = 2\nlocal 'a' = 1\n.*")
@unittest.skipIf(python_is_optimized(),
"Python was compiled with optimizations")
def test_printing_global(self):
bt = self.get_stack_trace(script=self.get_sample_script(),
cmds_after_breakpoint=['py-up', 'py-print __name__'])
self.assertMultilineMatches(bt,
r".*\nglobal '__name__' = '__main__'\n.*")
@unittest.skipIf(python_is_optimized(),
"Python was compiled with optimizations")
def test_printing_builtin(self):
bt = self.get_stack_trace(script=self.get_sample_script(),
cmds_after_breakpoint=['py-up', 'py-print len'])
self.assertMultilineMatches(bt,
r".*\nbuiltin 'len' = <built-in method len of module object at remote 0x-?[0-9a-f]+>\n.*")
class PyLocalsTests(DebuggerTests):
@unittest.skipIf(python_is_optimized(),
"Python was compiled with optimizations")
def test_basic_command(self):
bt = self.get_stack_trace(script=self.get_sample_script(),
cmds_after_breakpoint=['py-up', 'py-locals'])
self.assertMultilineMatches(bt,
r".*\nargs = \(1, 2, 3\)\n.*")
@unittest.skipUnless(HAS_PYUP_PYDOWN, "test requires py-up/py-down commands")
@unittest.skipIf(python_is_optimized(),
"Python was compiled with optimizations")
def test_locals_after_up(self):
bt = self.get_stack_trace(script=self.get_sample_script(),
cmds_after_breakpoint=['py-up', 'py-up', 'py-locals'])
self.assertMultilineMatches(bt,
r".*\na = 1\nb = 2\nc = 3\n.*")
def test_main():
if support.verbose:
print("GDB version %s.%s:" % (gdb_major_version, gdb_minor_version))
for line in gdb_version.splitlines():
print(" " * 4 + line)
run_unittest(PrettyPrintTests,
PyListTests,
StackNavigationTests,
PyBtTests,
PyPrintTests,
PyLocalsTests
)
if __name__ == "__main__":
test_main()
| 40,792 | 982 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/badsyntax_future4.py | """This is a test"""
import __future__
from __future__ import nested_scopes
def f(x):
def g(y):
return x + y
return g
result = f(2)(4)
| 153 | 11 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/test/test_repl.py | """Test the interactive interpreter."""
import sys
import cosmo
import os
import unittest
import subprocess
from textwrap import dedent
from test.support import cpython_only, SuppressCrashReport
from test.support.script_helper import kill_python
if __name__ == "PYOBJ.COM":
import _testcapi
def spawn_repl(*args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, **kw):
"""Run the Python REPL with the given arguments.
kw is extra keyword args to pass to subprocess.Popen. Returns a Popen
object.
"""
# To run the REPL without using a terminal, spawn python with the command
# line option '-i' and the process name set to '<stdin>'.
# The directory of argv[0] must match the directory of the Python
# executable for the Popen() call to python to succeed as the directory
# path may be used by Py_GetPath() to build the default module search
# path.
stdin_fname = sys.executable
cmd_line = [stdin_fname, '-E', '-i']
cmd_line.extend(args)
# Set TERM=vt100, for the rationale see the comments in spawn_python() of
# test.support.script_helper.
env = kw.setdefault('env', dict(os.environ))
env['TERM'] = 'vt100'
return subprocess.Popen(cmd_line, executable=sys.executable,
stdin=subprocess.PIPE,
stdout=stdout, stderr=stderr,
**kw)
class TestInteractiveInterpreter(unittest.TestCase):
@unittest.skipUnless(cosmo.MODE == "dbg", "disabled memory hooks")
@cpython_only
def test_no_memory(self):
# Issue #30696: Fix the interactive interpreter looping endlessly when
# no memory. Check also that the fix does not break the interactive
# loop when an exception is raised.
user_input = """
import sys, _testcapi
1/0
print('After the exception.')
_testcapi.set_nomemory(0)
sys.exit(0)
"""
user_input = dedent(user_input)
user_input = user_input.encode()
p = spawn_repl()
with SuppressCrashReport():
p.stdin.write(user_input)
output = kill_python(p)
self.assertIn(b'After the exception.', output)
# Exit code 120: Py_FinalizeEx() failed to flush stdout and stderr.
self.assertIn(p.returncode, (1, 120))
if __name__ == "__main__":
unittest.main()
| 2,395 | 68 | jart/cosmopolitan | false |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.