✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ beluga.o2switch.net ​🇻​♯➤ 4.18.0-553.123.2.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 185.154.139.77 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.84
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /opt/alt/python38/lib64/python3.8/test//test_collections.py
"""Unit tests for collections.py."""

import collections
import copy
import doctest
import inspect
import operator
import pickle
from random import choice, randrange
import string
import sys
from test import support
import types
import unittest

from collections import namedtuple, Counter, OrderedDict, _count_elements
from collections import UserDict, UserString, UserList
from collections import ChainMap
from collections import deque
from collections.abc import Awaitable, Coroutine
from collections.abc import AsyncIterator, AsyncIterable, AsyncGenerator
from collections.abc import Hashable, Iterable, Iterator, Generator, Reversible
from collections.abc import Sized, Container, Callable, Collection
from collections.abc import Set, MutableSet
from collections.abc import Mapping, MutableMapping, KeysView, ItemsView, ValuesView
from collections.abc import Sequence, MutableSequence
from collections.abc import ByteString


class TestUserObjects(unittest.TestCase):
    def _superset_test(self, a, b):
        self.assertGreaterEqual(
            set(dir(a)),
            set(dir(b)),
            '{a} should have all the methods of {b}'.format(
                a=a.__name__,
                b=b.__name__,
            ),
        )

    def _copy_test(self, obj):
        # Test internal copy
        obj_copy = obj.copy()
        self.assertIsNot(obj.data, obj_copy.data)
        self.assertEqual(obj.data, obj_copy.data)

        # Test copy.copy
        obj.test = [1234]  # Make sure instance vars are also copied.
        obj_copy = copy.copy(obj)
        self.assertIsNot(obj.data, obj_copy.data)
        self.assertEqual(obj.data, obj_copy.data)
        self.assertIs(obj.test, obj_copy.test)

    def test_str_protocol(self):
        self._superset_test(UserString, str)

    def test_list_protocol(self):
        self._superset_test(UserList, list)

    def test_dict_protocol(self):
        self._superset_test(UserDict, dict)

    def test_list_copy(self):
        obj = UserList()
        obj.append(123)
        self._copy_test(obj)

    def test_dict_copy(self):
        obj = UserDict()
        obj[123] = "abc"
        self._copy_test(obj)


################################################################################
### ChainMap (helper class for configparser and the string module)
################################################################################

class TestChainMap(unittest.TestCase):

    def test_basics(self):
        c = ChainMap()
        c['a'] = 1
        c['b'] = 2
        d = c.new_child()
        d['b'] = 20
        d['c'] = 30
        self.assertEqual(d.maps, [{'b':20, 'c':30}, {'a':1, 'b':2}])  # check internal state
        self.assertEqual(d.items(), dict(a=1, b=20, c=30).items())    # check items/iter/getitem
        self.assertEqual(len(d), 3)                                   # check len
        for key in 'abc':                                             # check contains
            self.assertIn(key, d)
        for k, v in dict(a=1, b=20, c=30, z=100).items():             # check get
            self.assertEqual(d.get(k, 100), v)

        del d['b']                                                    # unmask a value
        self.assertEqual(d.maps, [{'c':30}, {'a':1, 'b':2}])          # check internal state
        self.assertEqual(d.items(), dict(a=1, b=2, c=30).items())     # check items/iter/getitem
        self.assertEqual(len(d), 3)                                   # check len
        for key in 'abc':                                             # check contains
            self.assertIn(key, d)
        for k, v in dict(a=1, b=2, c=30, z=100).items():              # check get
            self.assertEqual(d.get(k, 100), v)
        self.assertIn(repr(d), [                                      # check repr
            type(d).__name__ + "({'c': 30}, {'a': 1, 'b': 2})",
            type(d).__name__ + "({'c': 30}, {'b': 2, 'a': 1})"
        ])

        for e in d.copy(), copy.copy(d):                               # check shallow copies
            self.assertEqual(d, e)
            self.assertEqual(d.maps, e.maps)
            self.assertIsNot(d, e)
            self.assertIsNot(d.maps[0], e.maps[0])
            for m1, m2 in zip(d.maps[1:], e.maps[1:]):
                self.assertIs(m1, m2)

        # check deep copies
        for proto in range(pickle.HIGHEST_PROTOCOL + 1):
            e = pickle.loads(pickle.dumps(d, proto))
            self.assertEqual(d, e)
            self.assertEqual(d.maps, e.maps)
            self.assertIsNot(d, e)
            for m1, m2 in zip(d.maps, e.maps):
                self.assertIsNot(m1, m2, e)
        for e in [copy.deepcopy(d),
                  eval(repr(d))
                ]:
            self.assertEqual(d, e)
            self.assertEqual(d.maps, e.maps)
            self.assertIsNot(d, e)
            for m1, m2 in zip(d.maps, e.maps):
                self.assertIsNot(m1, m2, e)

        f = d.new_child()
        f['b'] = 5
        self.assertEqual(f.maps, [{'b': 5}, {'c':30}, {'a':1, 'b':2}])
        self.assertEqual(f.parents.maps, [{'c':30}, {'a':1, 'b':2}])   # check parents
        self.assertEqual(f['b'], 5)                                    # find first in chain
        self.assertEqual(f.parents['b'], 2)                            # look beyond maps[0]

    def test_ordering(self):
        # Combined order matches a series of dict updates from last to first.
        # This test relies on the ordering of the underlying dicts.

        baseline = {'music': 'bach', 'art': 'rembrandt'}
        adjustments = {'art': 'van gogh', 'opera': 'carmen'}

        cm = ChainMap(adjustments, baseline)

        combined = baseline.copy()
        combined.update(adjustments)

        self.assertEqual(list(combined.items()), list(cm.items()))

    def test_constructor(self):
        self.assertEqual(ChainMap().maps, [{}])                        # no-args --> one new dict
        self.assertEqual(ChainMap({1:2}).maps, [{1:2}])                # 1 arg --> list

    def test_bool(self):
        self.assertFalse(ChainMap())
        self.assertFalse(ChainMap({}, {}))
        self.assertTrue(ChainMap({1:2}, {}))
        self.assertTrue(ChainMap({}, {1:2}))

    def test_missing(self):
        class DefaultChainMap(ChainMap):
            def __missing__(self, key):
                return 999
        d = DefaultChainMap(dict(a=1, b=2), dict(b=20, c=30))
        for k, v in dict(a=1, b=2, c=30, d=999).items():
            self.assertEqual(d[k], v)                                  # check __getitem__ w/missing
        for k, v in dict(a=1, b=2, c=30, d=77).items():
            self.assertEqual(d.get(k, 77), v)                          # check get() w/ missing
        for k, v in dict(a=True, b=True, c=True, d=False).items():
            self.assertEqual(k in d, v)                                # check __contains__ w/missing
        self.assertEqual(d.pop('a', 1001), 1, d)
        self.assertEqual(d.pop('a', 1002), 1002)                       # check pop() w/missing
        self.assertEqual(d.popitem(), ('b', 2))                        # check popitem() w/missing
        with self.assertRaises(KeyError):
            d.popitem()

    def test_order_preservation(self):
        d = ChainMap(
                OrderedDict(j=0, h=88888),
                OrderedDict(),
                OrderedDict(i=9999, d=4444, c=3333),
                OrderedDict(f=666, b=222, g=777, c=333, h=888),
                OrderedDict(),
                OrderedDict(e=55, b=22),
                OrderedDict(a=1, b=2, c=3, d=4, e=5),
                OrderedDict(),
            )
        self.assertEqual(''.join(d), 'abcdefghij')
        self.assertEqual(list(d.items()),
            [('a', 1), ('b', 222), ('c', 3333), ('d', 4444),
             ('e', 55), ('f', 666), ('g', 777), ('h', 88888),
             ('i', 9999), ('j', 0)])

    def test_dict_coercion(self):
        d = ChainMap(dict(a=1, b=2), dict(b=20, c=30))
        self.assertEqual(dict(d), dict(a=1, b=2, c=30))
        self.assertEqual(dict(d.items()), dict(a=1, b=2, c=30))

    def test_new_child(self):
        'Tests for changes for issue #16613.'
        c = ChainMap()
        c['a'] = 1
        c['b'] = 2
        m = {'b':20, 'c': 30}
        d = c.new_child(m)
        self.assertEqual(d.maps, [{'b':20, 'c':30}, {'a':1, 'b':2}])  # check internal state
        self.assertIs(m, d.maps[0])

        # Use a different map than a dict
        class lowerdict(dict):
            def __getitem__(self, key):
                if isinstance(key, str):
                    key = key.lower()
                return dict.__getitem__(self, key)
            def __contains__(self, key):
                if isinstance(key, str):
                    key = key.lower()
                return dict.__contains__(self, key)

        c = ChainMap()
        c['a'] = 1
        c['b'] = 2
        m = lowerdict(b=20, c=30)
        d = c.new_child(m)
        self.assertIs(m, d.maps[0])
        for key in 'abc':                                             # check contains
            self.assertIn(key, d)
        for k, v in dict(a=1, B=20, C=30, z=100).items():             # check get
            self.assertEqual(d.get(k, 100), v)


################################################################################
### Named Tuples
################################################################################

TestNT = namedtuple('TestNT', 'x y z')    # type used for pickle tests

class TestNamedTuple(unittest.TestCase):

    def test_factory(self):
        Point = namedtuple('Point', 'x y')
        self.assertEqual(Point.__name__, 'Point')
        self.assertEqual(Point.__slots__, ())
        self.assertEqual(Point.__module__, __name__)
        self.assertEqual(Point.__getitem__, tuple.__getitem__)
        self.assertEqual(Point._fields, ('x', 'y'))

        self.assertRaises(ValueError, namedtuple, 'abc%', 'efg ghi')       # type has non-alpha char
        self.assertRaises(ValueError, namedtuple, 'class', 'efg ghi')      # type has keyword
        self.assertRaises(ValueError, namedtuple, '9abc', 'efg ghi')       # type starts with digit

        self.assertRaises(ValueError, namedtuple, 'abc', 'efg g%hi')       # field with non-alpha char
        self.assertRaises(ValueError, namedtuple, 'abc', 'abc class')      # field has keyword
        self.assertRaises(ValueError, namedtuple, 'abc', '8efg 9ghi')      # field starts with digit
        self.assertRaises(ValueError, namedtuple, 'abc', '_efg ghi')       # field with leading underscore
        self.assertRaises(ValueError, namedtuple, 'abc', 'efg efg ghi')    # duplicate field

        namedtuple('Point0', 'x1 y2')   # Verify that numbers are allowed in names
        namedtuple('_', 'a b c')        # Test leading underscores in a typename

        nt = namedtuple('nt', 'the quick brown fox')                       # check unicode input
        self.assertNotIn("u'", repr(nt._fields))
        nt = namedtuple('nt', ('the', 'quick'))                           # check unicode input
        self.assertNotIn("u'", repr(nt._fields))

        self.assertRaises(TypeError, Point._make, [11])                     # catch too few args
        self.assertRaises(TypeError, Point._make, [11, 22, 33])             # catch too many args

    def test_defaults(self):
        Point = namedtuple('Point', 'x y', defaults=(10, 20))              # 2 defaults
        self.assertEqual(Point._field_defaults, {'x': 10, 'y': 20})
        self.assertEqual(Point(1, 2), (1, 2))
        self.assertEqual(Point(1), (1, 20))
        self.assertEqual(Point(), (10, 20))

        Point = namedtuple('Point', 'x y', defaults=(20,))                 # 1 default
        self.assertEqual(Point._field_defaults, {'y': 20})
        self.assertEqual(Point(1, 2), (1, 2))
        self.assertEqual(Point(1), (1, 20))

        Point = namedtuple('Point', 'x y', defaults=())                     # 0 defaults
        self.assertEqual(Point._field_defaults, {})
        self.assertEqual(Point(1, 2), (1, 2))
        with self.assertRaises(TypeError):
            Point(1)

        with self.assertRaises(TypeError):                                  # catch too few args
            Point()
        with self.assertRaises(TypeError):                                  # catch too many args
            Point(1, 2, 3)
        with self.assertRaises(TypeError):                                  # too many defaults
            Point = namedtuple('Point', 'x y', defaults=(10, 20, 30))
        with self.assertRaises(TypeError):                                  # non-iterable defaults
            Point = namedtuple('Point', 'x y', defaults=10)
        with self.assertRaises(TypeError):                                  # another non-iterable default
            Point = namedtuple('Point', 'x y', defaults=False)

        Point = namedtuple('Point', 'x y', defaults=None)                   # default is None
        self.assertEqual(Point._field_defaults, {})
        self.assertIsNone(Point.__new__.__defaults__, None)
        self.assertEqual(Point(10, 20), (10, 20))
        with self.assertRaises(TypeError):                                  # catch too few args
            Point(10)

        Point = namedtuple('Point', 'x y', defaults=[10, 20])               # allow non-tuple iterable
        self.assertEqual(Point._field_defaults, {'x': 10, 'y': 20})
        self.assertEqual(Point.__new__.__defaults__, (10, 20))
        self.assertEqual(Point(1, 2), (1, 2))
        self.assertEqual(Point(1), (1, 20))
        self.assertEqual(Point(), (10, 20))

        Point = namedtuple('Point', 'x y', defaults=iter([10, 20]))         # allow plain iterator
        self.assertEqual(Point._field_defaults, {'x': 10, 'y': 20})
        self.assertEqual(Point.__new__.__defaults__, (10, 20))
        self.assertEqual(Point(1, 2), (1, 2))
        self.assertEqual(Point(1), (1, 20))
        self.assertEqual(Point(), (10, 20))

    def test_readonly(self):
        Point = namedtuple('Point', 'x y')
        p = Point(11, 22)
        with self.assertRaises(AttributeError):
            p.x = 33
        with self.assertRaises(AttributeError):
            del p.x
        with self.assertRaises(TypeError):
            p[0] = 33
        with self.assertRaises(TypeError):
            del p[0]
        self.assertEqual(p.x, 11)
        self.assertEqual(p[0], 11)

    @unittest.skipIf(sys.flags.optimize >= 2,
                     "Docstrings are omitted with -O2 and above")
    def test_factory_doc_attr(self):
        Point = namedtuple('Point', 'x y')
        self.assertEqual(Point.__doc__, 'Point(x, y)')
        Point.__doc__ = '2D point'
        self.assertEqual(Point.__doc__, '2D point')

    @unittest.skipIf(sys.flags.optimize >= 2,
                     "Docstrings are omitted with -O2 and above")
    def test_field_doc(self):
        Point = namedtuple('Point', 'x y')
        self.assertEqual(Point.x.__doc__, 'Alias for field number 0')
        self.assertEqual(Point.y.__doc__, 'Alias for field number 1')
        Point.x.__doc__ = 'docstring for Point.x'
        self.assertEqual(Point.x.__doc__, 'docstring for Point.x')
        # namedtuple can mutate doc of descriptors independently
        Vector = namedtuple('Vector', 'x y')
        self.assertEqual(Vector.x.__doc__, 'Alias for field number 0')
        Vector.x.__doc__ = 'docstring for Vector.x'
        self.assertEqual(Vector.x.__doc__, 'docstring for Vector.x')

    @support.cpython_only
    @unittest.skipIf(sys.flags.optimize >= 2,
                     "Docstrings are omitted with -O2 and above")
    def test_field_doc_reuse(self):
        P = namedtuple('P', ['m', 'n'])
        Q = namedtuple('Q', ['o', 'p'])
        self.assertIs(P.m.__doc__, Q.o.__doc__)
        self.assertIs(P.n.__doc__, Q.p.__doc__)

    def test_name_fixer(self):
        for spec, renamed in [
            [('efg', 'g%hi'),  ('efg', '_1')],                              # field with non-alpha char
            [('abc', 'class'), ('abc', '_1')],                              # field has keyword
            [('8efg', '9ghi'), ('_0', '_1')],                               # field starts with digit
            [('abc', '_efg'), ('abc', '_1')],                               # field with leading underscore
            [('abc', 'efg', 'efg', 'ghi'), ('abc', 'efg', '_2', 'ghi')],    # duplicate field
            [('abc', '', 'x'), ('abc', '_1', 'x')],                         # fieldname is a space
        ]:
            self.assertEqual(namedtuple('NT', spec, rename=True)._fields, renamed)

    def test_module_parameter(self):
        NT = namedtuple('NT', ['x', 'y'], module=collections)
        self.assertEqual(NT.__module__, collections)

    def test_instance(self):
        Point = namedtuple('Point', 'x y')
        p = Point(11, 22)
        self.assertEqual(p, Point(x=11, y=22))
        self.assertEqual(p, Point(11, y=22))
        self.assertEqual(p, Point(y=22, x=11))
        self.assertEqual(p, Point(*(11, 22)))
        self.assertEqual(p, Point(**dict(x=11, y=22)))
        self.assertRaises(TypeError, Point, 1)          # too few args
        self.assertRaises(TypeError, Point, 1, 2, 3)    # too many args
        with self.assertRaises(TypeError):              # wrong keyword argument
            Point(XXX=1, y=2)
        with self.assertRaises(TypeError):              # missing keyword argument
            Point(x=1)
        self.assertEqual(repr(p), 'Point(x=11, y=22)')
        self.assertNotIn('__weakref__', dir(p))
        self.assertEqual(p, Point._make([11, 22]))      # test _make classmethod
        self.assertEqual(p._fields, ('x', 'y'))         # test _fields attribute
        self.assertEqual(p._replace(x=1), (1, 22))      # test _replace method
        self.assertEqual(p._asdict(), dict(x=11, y=22)) # test _asdict method

        try:
            p._replace(x=1, error=2)
        except ValueError:
            pass
        else:
            self._fail('Did not detect an incorrect fieldname')

        # verify that field string can have commas
        Point = namedtuple('Point', 'x, y')
        p = Point(x=11, y=22)
        self.assertEqual(repr(p), 'Point(x=11, y=22)')

        # verify that fieldspec can be a non-string sequence
        Point = namedtuple('Point', ('x', 'y'))
        p = Point(x=11, y=22)
        self.assertEqual(repr(p), 'Point(x=11, y=22)')

    def test_tupleness(self):
        Point = namedtuple('Point', 'x y')
        p = Point(11, 22)

        self.assertIsInstance(p, tuple)
        self.assertEqual(p, (11, 22))                                       # matches a real tuple
        self.assertEqual(tuple(p), (11, 22))                                # coercable to a real tuple
        self.assertEqual(list(p), [11, 22])                                 # coercable to a list
        self.assertEqual(max(p), 22)                                        # iterable
        self.assertEqual(max(*p), 22)                                       # star-able
        x, y = p
        self.assertEqual(p, (x, y))                                         # unpacks like a tuple
        self.assertEqual((p[0], p[1]), (11, 22))                            # indexable like a tuple
        with self.assertRaises(IndexError):
            p[3]
        self.assertEqual(p[-1], 22)
        self.assertEqual(hash(p), hash((11, 22)))

        self.assertEqual(p.x, x)
        self.assertEqual(p.y, y)
        with self.assertRaises(AttributeError):
            p.z

    def test_odd_sizes(self):
        Zero = namedtuple('Zero', '')
        self.assertEqual(Zero(), ())
        self.assertEqual(Zero._make([]), ())
        self.assertEqual(repr(Zero()), 'Zero()')
        self.assertEqual(Zero()._asdict(), {})
        self.assertEqual(Zero()._fields, ())

        Dot = namedtuple('Dot', 'd')
        self.assertEqual(Dot(1), (1,))
        self.assertEqual(Dot._make([1]), (1,))
        self.assertEqual(Dot(1).d, 1)
        self.assertEqual(repr(Dot(1)), 'Dot(d=1)')
        self.assertEqual(Dot(1)._asdict(), {'d':1})
        self.assertEqual(Dot(1)._replace(d=999), (999,))
        self.assertEqual(Dot(1)._fields, ('d',))

        n = 5000
        names = list(set(''.join([choice(string.ascii_letters)
                                  for j in range(10)]) for i in range(n)))
        n = len(names)
        Big = namedtuple('Big', names)
        b = Big(*range(n))
        self.assertEqual(b, tuple(range(n)))
        self.assertEqual(Big._make(range(n)), tuple(range(n)))
        for pos, name in enumerate(names):
            self.assertEqual(getattr(b, name), pos)
        repr(b)                                 # make sure repr() doesn't blow-up
        d = b._asdict()
        d_expected = dict(zip(names, range(n)))
        self.assertEqual(d, d_expected)
        b2 = b._replace(**dict([(names[1], 999),(names[-5], 42)]))
        b2_expected = list(range(n))
        b2_expected[1] = 999
        b2_expected[-5] = 42
        self.assertEqual(b2, tuple(b2_expected))
        self.assertEqual(b._fields, tuple(names))

    def test_pickle(self):
        p = TestNT(x=10, y=20, z=30)
        for module in (pickle,):
            loads = getattr(module, 'loads')
            dumps = getattr(module, 'dumps')
            for protocol in range(-1, module.HIGHEST_PROTOCOL + 1):
                q = loads(dumps(p, protocol))
                self.assertEqual(p, q)
                self.assertEqual(p._fields, q._fields)
                self.assertNotIn(b'OrderedDict', dumps(p, protocol))

    def test_copy(self):
        p = TestNT(x=10, y=20, z=30)
        for copier in copy.copy, copy.deepcopy:
            q = copier(p)
            self.assertEqual(p, q)
            self.assertEqual(p._fields, q._fields)

    def test_name_conflicts(self):
        # Some names like "self", "cls", "tuple", "itemgetter", and "property"
        # failed when used as field names.  Test to make sure these now work.
        T = namedtuple('T', 'itemgetter property self cls tuple')
        t = T(1, 2, 3, 4, 5)
        self.assertEqual(t, (1,2,3,4,5))
        newt = t._replace(itemgetter=10, property=20, self=30, cls=40, tuple=50)
        self.assertEqual(newt, (10,20,30,40,50))

       # Broader test of all interesting names taken from the code, old
       # template, and an example
        words = {'Alias', 'At', 'AttributeError', 'Build', 'Bypass', 'Create',
        'Encountered', 'Expected', 'Field', 'For', 'Got', 'Helper',
        'IronPython', 'Jython', 'KeyError', 'Make', 'Modify', 'Note',
        'OrderedDict', 'Point', 'Return', 'Returns', 'Type', 'TypeError',
        'Used', 'Validate', 'ValueError', 'Variables', 'a', 'accessible', 'add',
        'added', 'all', 'also', 'an', 'arg_list', 'args', 'arguments',
        'automatically', 'be', 'build', 'builtins', 'but', 'by', 'cannot',
        'class_namespace', 'classmethod', 'cls', 'collections', 'convert',
        'copy', 'created', 'creation', 'd', 'debugging', 'defined', 'dict',
        'dictionary', 'doc', 'docstring', 'docstrings', 'duplicate', 'effect',
        'either', 'enumerate', 'environments', 'error', 'example', 'exec', 'f',
        'f_globals', 'field', 'field_names', 'fields', 'formatted', 'frame',
        'function', 'functions', 'generate', 'get', 'getter', 'got', 'greater',
        'has', 'help', 'identifiers', 'index', 'indexable', 'instance',
        'instantiate', 'interning', 'introspection', 'isidentifier',
        'isinstance', 'itemgetter', 'iterable', 'join', 'keyword', 'keywords',
        'kwds', 'len', 'like', 'list', 'map', 'maps', 'message', 'metadata',
        'method', 'methods', 'module', 'module_name', 'must', 'name', 'named',
        'namedtuple', 'namedtuple_', 'names', 'namespace', 'needs', 'new',
        'nicely', 'num_fields', 'number', 'object', 'of', 'operator', 'option',
        'p', 'particular', 'pickle', 'pickling', 'plain', 'pop', 'positional',
        'property', 'r', 'regular', 'rename', 'replace', 'replacing', 'repr',
        'repr_fmt', 'representation', 'result', 'reuse_itemgetter', 's', 'seen',
        'self', 'sequence', 'set', 'side', 'specified', 'split', 'start',
        'startswith', 'step', 'str', 'string', 'strings', 'subclass', 'sys',
        'targets', 'than', 'the', 'their', 'this', 'to', 'tuple', 'tuple_new',
        'type', 'typename', 'underscore', 'unexpected', 'unpack', 'up', 'use',
        'used', 'user', 'valid', 'values', 'variable', 'verbose', 'where',
        'which', 'work', 'x', 'y', 'z', 'zip'}
        T = namedtuple('T', words)
        # test __new__
        values = tuple(range(len(words)))
        t = T(*values)
        self.assertEqual(t, values)
        t = T(**dict(zip(T._fields, values)))
        self.assertEqual(t, values)
        # test _make
        t = T._make(values)
        self.assertEqual(t, values)
        # exercise __repr__
        repr(t)
        # test _asdict
        self.assertEqual(t._asdict(), dict(zip(T._fields, values)))
        # test _replace
        t = T._make(values)
        newvalues = tuple(v*10 for v in values)
        newt = t._replace(**dict(zip(T._fields, newvalues)))
        self.assertEqual(newt, newvalues)
        # test _fields
        self.assertEqual(T._fields, tuple(words))
        # test __getnewargs__
        self.assertEqual(t.__getnewargs__(), values)

    def test_repr(self):
        A = namedtuple('A', 'x')
        self.assertEqual(repr(A(1)), 'A(x=1)')
        # repr should show the name of the subclass
        class B(A):
            pass
        self.assertEqual(repr(B(1)), 'B(x=1)')

    def test_keyword_only_arguments(self):
        # See issue 25628
        with self.assertRaises(TypeError):
            NT = namedtuple('NT', ['x', 'y'], True)

        NT = namedtuple('NT', ['abc', 'def'], rename=True)
        self.assertEqual(NT._fields, ('abc', '_1'))
        with self.assertRaises(TypeError):
            NT = namedtuple('NT', ['abc', 'def'], False, True)

    def test_namedtuple_subclass_issue_24931(self):
        class Point(namedtuple('_Point', ['x', 'y'])):
            pass

        a = Point(3, 4)
        self.assertEqual(a._asdict(), OrderedDict([('x', 3), ('y', 4)]))

        a.w = 5
        self.assertEqual(a.__dict__, {'w': 5})

    @support.cpython_only
    def test_field_descriptor(self):
        Point = namedtuple('Point', 'x y')
        p = Point(11, 22)
        self.assertTrue(inspect.isdatadescriptor(Point.x))
        self.assertEqual(Point.x.__get__(p), 11)
        self.assertRaises(AttributeError, Point.x.__set__, p, 33)
        self.assertRaises(AttributeError, Point.x.__delete__, p)

        class NewPoint(tuple):
            x = pickle.loads(pickle.dumps(Point.x))
            y = pickle.loads(pickle.dumps(Point.y))

        np = NewPoint([1, 2])

        self.assertEqual(np.x, 1)
        self.assertEqual(np.y, 2)


################################################################################
### Abstract Base Classes
################################################################################

class ABCTestCase(unittest.TestCase):

    def validate_abstract_methods(self, abc, *names):
        methodstubs = dict.fromkeys(names, lambda s, *args: 0)

        # everything should work will all required methods are present
        C = type('C', (abc,), methodstubs)
        C()

        # instantiation should fail if a required method is missing
        for name in names:
            stubs = methodstubs.copy()
            del stubs[name]
            C = type('C', (abc,), stubs)
            self.assertRaises(TypeError, C, name)

    def validate_isinstance(self, abc, name):
        stub = lambda s, *args: 0

        C = type('C', (object,), {'__hash__': None})
        setattr(C, name, stub)
        self.assertIsInstance(C(), abc)
        self.assertTrue(issubclass(C, abc))

        C = type('C', (object,), {'__hash__': None})
        self.assertNotIsInstance(C(), abc)
        self.assertFalse(issubclass(C, abc))

    def validate_comparison(self, instance):
        ops = ['lt', 'gt', 'le', 'ge', 'ne', 'or', 'and', 'xor', 'sub']
        operators = {}
        for op in ops:
            name = '__' + op + '__'
            operators[name] = getattr(operator, name)

        class Other:
            def __init__(self):
                self.right_side = False
            def __eq__(self, other):
                self.right_side = True
                return True
            __lt__ = __eq__
            __gt__ = __eq__
            __le__ = __eq__
            __ge__ = __eq__
            __ne__ = __eq__
            __ror__ = __eq__
            __rand__ = __eq__
            __rxor__ = __eq__
            __rsub__ = __eq__

        for name, op in operators.items():
            if not hasattr(instance, name):
                continue
            other = Other()
            op(instance, other)
            self.assertTrue(other.right_side,'Right side not called for %s.%s'
                            % (type(instance), name))

def _test_gen():
    yield

class TestOneTrickPonyABCs(ABCTestCase):

    def test_Awaitable(self):
        def gen():
            yield

        @types.coroutine
        def coro():
            yield

        async def new_coro():
            pass

        class Bar:
            def __await__(self):
                yield

        class MinimalCoro(Coroutine):
            def send(self, value):
                return value
            def throw(self, typ, val=None, tb=None):
                super().throw(typ, val, tb)
            def __await__(self):
                yield

        non_samples = [None, int(), gen(), object()]
        for x in non_samples:
            self.assertNotIsInstance(x, Awaitable)
            self.assertFalse(issubclass(type(x), Awaitable), repr(type(x)))

        samples = [Bar(), MinimalCoro()]
        for x in samples:
            self.assertIsInstance(x, Awaitable)
            self.assertTrue(issubclass(type(x), Awaitable))

        c = coro()
        # Iterable coroutines (generators with CO_ITERABLE_COROUTINE
        # flag don't have '__await__' method, hence can't be instances
        # of Awaitable. Use inspect.isawaitable to detect them.
        self.assertNotIsInstance(c, Awaitable)

        c = new_coro()
        self.assertIsInstance(c, Awaitable)
        c.close() # avoid RuntimeWarning that coro() was not awaited

        class CoroLike: pass
        Coroutine.register(CoroLike)
        self.assertTrue(isinstance(CoroLike(), Awaitable))
        self.assertTrue(issubclass(CoroLike, Awaitable))
        CoroLike = None
        support.gc_collect() # Kill CoroLike to clean-up ABCMeta cache

    def test_Coroutine(self):
        def gen():
            yield

        @types.coroutine
        def coro():
            yield

        async def new_coro():
            pass

        class Bar:
            def __await__(self):
                yield

        class MinimalCoro(Coroutine):
            def send(self, value):
                return value
            def throw(self, typ, val=None, tb=None):
                super().throw(typ, val, tb)
            def __await__(self):
                yield

        non_samples = [None, int(), gen(), object(), Bar()]
        for x in non_samples:
            self.assertNotIsInstance(x, Coroutine)
            self.assertFalse(issubclass(type(x), Coroutine), repr(type(x)))

        samples = [MinimalCoro()]
        for x in samples:
            self.assertIsInstance(x, Awaitable)
            self.assertTrue(issubclass(type(x), Awaitable))

        c = coro()
        # Iterable coroutines (generators with CO_ITERABLE_COROUTINE
        # flag don't have '__await__' method, hence can't be instances
        # of Coroutine. Use inspect.isawaitable to detect them.
        self.assertNotIsInstance(c, Coroutine)

        c = new_coro()
        self.assertIsInstance(c, Coroutine)
        c.close() # avoid RuntimeWarning that coro() was not awaited

        class CoroLike:
            def send(self, value):
                pass
            def throw(self, typ, val=None, tb=None):
                pass
            def close(self):
                pass
            def __await__(self):
                pass
        self.assertTrue(isinstance(CoroLike(), Coroutine))
        self.assertTrue(issubclass(CoroLike, Coroutine))

        class CoroLike:
            def send(self, value):
                pass
            def close(self):
                pass
            def __await__(self):
                pass
        self.assertFalse(isinstance(CoroLike(), Coroutine))
        self.assertFalse(issubclass(CoroLike, Coroutine))

    def test_Hashable(self):
        # Check some non-hashables
        non_samples = [bytearray(), list(), set(), dict()]
        for x in non_samples:
            self.assertNotIsInstance(x, Hashable)
            self.assertFalse(issubclass(type(x), Hashable), repr(type(x)))
        # Check some hashables
        samples = [None,
                   int(), float(), complex(),
                   str(),
                   tuple(), frozenset(),
                   int, list, object, type, bytes()
                   ]
        for x in samples:
            self.assertIsInstance(x, Hashable)
            self.assertTrue(issubclass(type(x), Hashable), repr(type(x)))
        self.assertRaises(TypeError, Hashable)
        # Check direct subclassing
        class H(Hashable):
            def __hash__(self):
                return super().__hash__()
        self.assertEqual(hash(H()), 0)
        self.assertFalse(issubclass(int, H))
        self.validate_abstract_methods(Hashable, '__hash__')
        self.validate_isinstance(Hashable, '__hash__')

    def test_AsyncIterable(self):
        class AI:
            def __aiter__(self):
                return self
        self.assertTrue(isinstance(AI(), AsyncIterable))
        self.assertTrue(issubclass(AI, AsyncIterable))
        # Check some non-iterables
        non_samples = [None, object, []]
        for x in non_samples:
            self.assertNotIsInstance(x, AsyncIterable)
            self.assertFalse(issubclass(type(x), AsyncIterable), repr(type(x)))
        self.validate_abstract_methods(AsyncIterable, '__aiter__')
        self.validate_isinstance(AsyncIterable, '__aiter__')

    def test_AsyncIterator(self):
        class AI:
            def __aiter__(self):
                return self
            async def __anext__(self):
                raise StopAsyncIteration
        self.assertTrue(isinstance(AI(), AsyncIterator))
        self.assertTrue(issubclass(AI, AsyncIterator))
        non_samples = [None, object, []]
        # Check some non-iterables
        for x in non_samples:
            self.assertNotIsInstance(x, AsyncIterator)
            self.assertFalse(issubclass(type(x), AsyncIterator), repr(type(x)))
        # Similarly to regular iterators (see issue 10565)
        class AnextOnly:
            async def __anext__(self):
                raise StopAsyncIteration
        self.assertNotIsInstance(AnextOnly(), AsyncIterator)
        self.validate_abstract_methods(AsyncIterator, '__anext__', '__aiter__')

    def test_Iterable(self):
        # Check some non-iterables
        non_samples = [None, 42, 3.14, 1j]
        for x in non_samples:
            self.assertNotIsInstance(x, Iterable)
            self.assertFalse(issubclass(type(x), Iterable), repr(type(x)))
        # Check some iterables
        samples = [bytes(), str(),
                   tuple(), list(), set(), frozenset(), dict(),
                   dict().keys(), dict().items(), dict().values(),
                   _test_gen(),
                   (x for x in []),
                   ]
        for x in samples:
            self.assertIsInstance(x, Iterable)
            self.assertTrue(issubclass(type(x), Iterable), repr(type(x)))
        # Check direct subclassing
        class I(Iterable):
            def __iter__(self):
                return super().__iter__()
        self.assertEqual(list(I()), [])
        self.assertFalse(issubclass(str, I))
        self.validate_abstract_methods(Iterable, '__iter__')
        self.validate_isinstance(Iterable, '__iter__')
        # Check None blocking
        class It:
            def __iter__(self): return iter([])
        class ItBlocked(It):
            __iter__ = None
        self.assertTrue(issubclass(It, Iterable))
        self.assertTrue(isinstance(It(), Iterable))
        self.assertFalse(issubclass(ItBlocked, Iterable))
        self.assertFalse(isinstance(ItBlocked(), Iterable))

    def test_Reversible(self):
        # Check some non-reversibles
        non_samples = [None, 42, 3.14, 1j, set(), frozenset()]
        for x in non_samples:
            self.assertNotIsInstance(x, Reversible)
            self.assertFalse(issubclass(type(x), Reversible), repr(type(x)))
        # Check some non-reversible iterables
        non_reversibles = [_test_gen(), (x for x in []), iter([]), reversed([])]
        for x in non_reversibles:
            self.assertNotIsInstance(x, Reversible)
            self.assertFalse(issubclass(type(x), Reversible), repr(type(x)))
        # Check some reversible iterables
        samples = [bytes(), str(), tuple(), list(), OrderedDict(),
                   OrderedDict().keys(), OrderedDict().items(),
                   OrderedDict().values(), Counter(), Counter().keys(),
                   Counter().items(), Counter().values(), dict(),
                   dict().keys(), dict().items(), dict().values()]
        for x in samples:
            self.assertIsInstance(x, Reversible)
            self.assertTrue(issubclass(type(x), Reversible), repr(type(x)))
        # Check also Mapping, MutableMapping, and Sequence
        self.assertTrue(issubclass(Sequence, Reversible), repr(Sequence))
        self.assertFalse(issubclass(Mapping, Reversible), repr(Mapping))
        self.assertFalse(issubclass(MutableMapping, Reversible), repr(MutableMapping))
        # Check direct subclassing
        class R(Reversible):
            def __iter__(self):
                return iter(list())
            def __reversed__(self):
                return iter(list())
        self.assertEqual(list(reversed(R())), [])
        self.assertFalse(issubclass(float, R))
        self.validate_abstract_methods(Reversible, '__reversed__', '__iter__')
        # Check reversible non-iterable (which is not Reversible)
        class RevNoIter:
            def __reversed__(self): return reversed([])
        class RevPlusIter(RevNoIter):
            def __iter__(self): return iter([])
        self.assertFalse(issubclass(RevNoIter, Reversible))
        self.assertFalse(isinstance(RevNoIter(), Reversible))
        self.assertTrue(issubclass(RevPlusIter, Reversible))
        self.assertTrue(isinstance(RevPlusIter(), Reversible))
        # Check None blocking
        class Rev:
            def __iter__(self): return iter([])
            def __reversed__(self): return reversed([])
        class RevItBlocked(Rev):
            __iter__ = None
        class RevRevBlocked(Rev):
            __reversed__ = None
        self.assertTrue(issubclass(Rev, Reversible))
        self.assertTrue(isinstance(Rev(), Reversible))
        self.assertFalse(issubclass(RevItBlocked, Reversible))
        self.assertFalse(isinstance(RevItBlocked(), Reversible))
        self.assertFalse(issubclass(RevRevBlocked, Reversible))
        self.assertFalse(isinstance(RevRevBlocked(), Reversible))

    def test_Collection(self):
        # Check some non-collections
        non_collections = [None, 42, 3.14, 1j, lambda x: 2*x]
        for x in non_collections:
            self.assertNotIsInstance(x, Collection)
            self.assertFalse(issubclass(type(x), Collection), repr(type(x)))
        # Check some non-collection iterables
        non_col_iterables = [_test_gen(), iter(b''), iter(bytearray()),
                             (x for x in [])]
        for x in non_col_iterables:
            self.assertNotIsInstance(x, Collection)
            self.assertFalse(issubclass(type(x), Collection), repr(type(x)))
        # Check some collections
        samples = [set(), frozenset(), dict(), bytes(), str(), tuple(),
                   list(), dict().keys(), dict().items(), dict().values()]
        for x in samples:
            self.assertIsInstance(x, Collection)
            self.assertTrue(issubclass(type(x), Collection), repr(type(x)))
        # Check also Mapping, MutableMapping, etc.
        self.assertTrue(issubclass(Sequence, Collection), repr(Sequence))
        self.assertTrue(issubclass(Mapping, Collection), repr(Mapping))
        self.assertTrue(issubclass(MutableMapping, Collection),
                                    repr(MutableMapping))
        self.assertTrue(issubclass(Set, Collection), repr(Set))
        self.assertTrue(issubclass(MutableSet, Collection), repr(MutableSet))
        self.assertTrue(issubclass(Sequence, Collection), repr(MutableSet))
        # Check direct subclassing
        class Col(Collection):
            def __iter__(self):
                return iter(list())
            def __len__(self):
                return 0
            def __contains__(self, item):
                return False
        class DerCol(Col): pass
        self.assertEqual(list(iter(Col())), [])
        self.assertFalse(issubclass(list, Col))
        self.assertFalse(issubclass(set, Col))
        self.assertFalse(issubclass(float, Col))
        self.assertEqual(list(iter(DerCol())), [])
        self.assertFalse(issubclass(list, DerCol))
        self.assertFalse(issubclass(set, DerCol))
        self.assertFalse(issubclass(float, DerCol))
        self.validate_abstract_methods(Collection, '__len__', '__iter__',
                                                   '__contains__')
        # Check sized container non-iterable (which is not Collection) etc.
        class ColNoIter:
            def __len__(self): return 0
            def __contains__(self, item): return False
        class ColNoSize:
            def __iter__(self): return iter([])
            def __contains__(self, item): return False
        class ColNoCont:
            def __iter__(self): return iter([])
            def __len__(self): return 0
        self.assertFalse(issubclass(ColNoIter, Collection))
        self.assertFalse(isinstance(ColNoIter(), Collection))
        self.assertFalse(issubclass(ColNoSize, Collection))
        self.assertFalse(isinstance(ColNoSize(), Collection))
        self.assertFalse(issubclass(ColNoCont, Collection))
        self.assertFalse(isinstance(ColNoCont(), Collection))
        # Check None blocking
        class SizeBlock:
            def __iter__(self): return iter([])
            def __contains__(self): return False
            __len__ = None
        class IterBlock:
            def __len__(self): return 0
            def __contains__(self): return True
            __iter__ = None
        self.assertFalse(issubclass(SizeBlock, Collection))
        self.assertFalse(isinstance(SizeBlock(), Collection))
        self.assertFalse(issubclass(IterBlock, Collection))
        self.assertFalse(isinstance(IterBlock(), Collection))
        # Check None blocking in subclass
        class ColImpl:
            def __iter__(self):
                return iter(list())
            def __len__(self):
                return 0
            def __contains__(self, item):
                return False
        class NonCol(ColImpl):
            __contains__ = None
        self.assertFalse(issubclass(NonCol, Collection))
        self.assertFalse(isinstance(NonCol(), Collection))


    def test_Iterator(self):
        non_samples = [None, 42, 3.14, 1j, b"", "", (), [], {}, set()]
        for x in non_samples:
            self.assertNotIsInstance(x, Iterator)
            self.assertFalse(issubclass(type(x), Iterator), repr(type(x)))
        samples = [iter(bytes()), iter(str()),
                   iter(tuple()), iter(list()), iter(dict()),
                   iter(set()), iter(frozenset()),
                   iter(dict().keys()), iter(dict().items()),
                   iter(dict().values()),
                   _test_gen(),
                   (x for x in []),
                   ]
        for x in samples:
            self.assertIsInstance(x, Iterator)
            self.assertTrue(issubclass(type(x), Iterator), repr(type(x)))
        self.validate_abstract_methods(Iterator, '__next__', '__iter__')

        # Issue 10565
        class NextOnly:
            def __next__(self):
                yield 1
                return
        self.assertNotIsInstance(NextOnly(), Iterator)

    def test_Generator(self):
        class NonGen1:
            def __iter__(self): return self
            def __next__(self): return None
            def close(self): pass
            def throw(self, typ, val=None, tb=None): pass

        class NonGen2:
            def __iter__(self): return self
            def __next__(self): return None
            def close(self): pass
            def send(self, value): return value

        class NonGen3:
            def close(self): pass
            def send(self, value): return value
            def throw(self, typ, val=None, tb=None): pass

        non_samples = [
            None, 42, 3.14, 1j, b"", "", (), [], {}, set(),
            iter(()), iter([]), NonGen1(), NonGen2(), NonGen3()]
        for x in non_samples:
            self.assertNotIsInstance(x, Generator)
            self.assertFalse(issubclass(type(x), Generator), repr(type(x)))

        class Gen:
            def __iter__(self): return self
            def __next__(self): return None
            def close(self): pass
            def send(self, value): return value
            def throw(self, typ, val=None, tb=None): pass

        class MinimalGen(Generator):
            def send(self, value):
                return value
            def throw(self, typ, val=None, tb=None):
                super().throw(typ, val, tb)

        def gen():
            yield 1

        samples = [gen(), (lambda: (yield))(), Gen(), MinimalGen()]
        for x in samples:
            self.assertIsInstance(x, Iterator)
            self.assertIsInstance(x, Generator)
            self.assertTrue(issubclass(type(x), Generator), repr(type(x)))
        self.validate_abstract_methods(Generator, 'send', 'throw')

        # mixin tests
        mgen = MinimalGen()
        self.assertIs(mgen, iter(mgen))
        self.assertIs(mgen.send(None), next(mgen))
        self.assertEqual(2, mgen.send(2))
        self.assertIsNone(mgen.close())
        self.assertRaises(ValueError, mgen.throw, ValueError)
        self.assertRaisesRegex(ValueError, "^huhu$",
                               mgen.throw, ValueError, ValueError("huhu"))
        self.assertRaises(StopIteration, mgen.throw, StopIteration())

        class FailOnClose(Generator):
            def send(self, value): return value
            def throw(self, *args): raise ValueError

        self.assertRaises(ValueError, FailOnClose().close)

        class IgnoreGeneratorExit(Generator):
            def send(self, value): return value
            def throw(self, *args): pass

        self.assertRaises(RuntimeError, IgnoreGeneratorExit().close)

    def test_AsyncGenerator(self):
        class NonAGen1:
            def __aiter__(self): return self
            def __anext__(self): return None
            def aclose(self): pass
            def athrow(self, typ, val=None, tb=None): pass

        class NonAGen2:
            def __aiter__(self): return self
            def __anext__(self): return None
            def aclose(self): pass
            def asend(self, value): return value

        class NonAGen3:
            def aclose(self): pass
            def asend(self, value): return value
            def athrow(self, typ, val=None, tb=None): pass

        non_samples = [
            None, 42, 3.14, 1j, b"", "", (), [], {}, set(),
            iter(()), iter([]), NonAGen1(), NonAGen2(), NonAGen3()]
        for x in non_samples:
            self.assertNotIsInstance(x, AsyncGenerator)
            self.assertFalse(issubclass(type(x), AsyncGenerator), repr(type(x)))

        class Gen:
            def __aiter__(self): return self
            async def __anext__(self): return None
            async def aclose(self): pass
            async def asend(self, value): return value
            async def athrow(self, typ, val=None, tb=None): pass

        class MinimalAGen(AsyncGenerator):
            async def asend(self, value):
                return value
            async def athrow(self, typ, val=None, tb=None):
                await super().athrow(typ, val, tb)

        async def gen():
            yield 1

        samples = [gen(), Gen(), MinimalAGen()]
        for x in samples:
            self.assertIsInstance(x, AsyncIterator)
            self.assertIsInstance(x, AsyncGenerator)
            self.assertTrue(issubclass(type(x), AsyncGenerator), repr(type(x)))
        self.validate_abstract_methods(AsyncGenerator, 'asend', 'athrow')

        def run_async(coro):
            result = None
            while True:
                try:
                    coro.send(None)
                except StopIteration as ex:
                    result = ex.args[0] if ex.args else None
                    break
            return result

        # mixin tests
        mgen = MinimalAGen()
        self.assertIs(mgen, mgen.__aiter__())
        self.assertIs(run_async(mgen.asend(None)), run_async(mgen.__anext__()))
        self.assertEqual(2, run_async(mgen.asend(2)))
        self.assertIsNone(run_async(mgen.aclose()))
        with self.assertRaises(ValueError):
            run_async(mgen.athrow(ValueError))

        class FailOnClose(AsyncGenerator):
            async def asend(self, value): return value
            async def athrow(self, *args): raise ValueError

        with self.assertRaises(ValueError):
            run_async(FailOnClose().aclose())

        class IgnoreGeneratorExit(AsyncGenerator):
            async def asend(self, value): return value
            async def athrow(self, *args): pass

        with self.assertRaises(RuntimeError):
            run_async(IgnoreGeneratorExit().aclose())

    def test_Sized(self):
        non_samples = [None, 42, 3.14, 1j,
                       _test_gen(),
                       (x for x in []),
                       ]
        for x in non_samples:
            self.assertNotIsInstance(x, Sized)
            self.assertFalse(issubclass(type(x), Sized), repr(type(x)))
        samples = [bytes(), str(),
                   tuple(), list(), set(), frozenset(), dict(),
                   dict().keys(), dict().items(), dict().values(),
                   ]
        for x in samples:
            self.assertIsInstance(x, Sized)
            self.assertTrue(issubclass(type(x), Sized), repr(type(x)))
        self.validate_abstract_methods(Sized, '__len__')
        self.validate_isinstance(Sized, '__len__')

    def test_Container(self):
        non_samples = [None, 42, 3.14, 1j,
                       _test_gen(),
                       (x for x in []),
                       ]
        for x in non_samples:
            self.assertNotIsInstance(x, Container)
            self.assertFalse(issubclass(type(x), Container), repr(type(x)))
        samples = [bytes(), str(),
                   tuple(), list(), set(), frozenset(), dict(),
                   dict().keys(), dict().items(),
                   ]
        for x in samples:
            self.assertIsInstance(x, Container)
            self.assertTrue(issubclass(type(x), Container), repr(type(x)))
        self.validate_abstract_methods(Container, '__contains__')
        self.validate_isinstance(Container, '__contains__')

    def test_Callable(self):
        non_samples = [None, 42, 3.14, 1j,
                       "", b"", (), [], {}, set(),
                       _test_gen(),
                       (x for x in []),
                       ]
        for x in non_samples:
            self.assertNotIsInstance(x, Callable)
            self.assertFalse(issubclass(type(x), Callable), repr(type(x)))
        samples = [lambda: None,
                   type, int, object,
                   len,
                   list.append, [].append,
                   ]
        for x in samples:
            self.assertIsInstance(x, Callable)
            self.assertTrue(issubclass(type(x), Callable), repr(type(x)))
        self.validate_abstract_methods(Callable, '__call__')
        self.validate_isinstance(Callable, '__call__')

    def test_direct_subclassing(self):
        for B in Hashable, Iterable, Iterator, Reversible, Sized, Container, Callable:
            class C(B):
                pass
            self.assertTrue(issubclass(C, B))
            self.assertFalse(issubclass(int, C))

    def test_registration(self):
        for B in Hashable, Iterable, Iterator, Reversible, Sized, Container, Callable:
            class C:
                __hash__ = None  # Make sure it isn't hashable by default
            self.assertFalse(issubclass(C, B), B.__name__)
            B.register(C)
            self.assertTrue(issubclass(C, B))

class WithSet(MutableSet):

    def __init__(self, it=()):
        self.data = set(it)

    def __len__(self):
        return len(self.data)

    def __iter__(self):
        return iter(self.data)

    def __contains__(self, item):
        return item in self.data

    def add(self, item):
        self.data.add(item)

    def discard(self, item):
        self.data.discard(item)

class TestCollectionABCs(ABCTestCase):

    # XXX For now, we only test some virtual inheritance properties.
    # We should also test the proper behavior of the collection ABCs
    # as real base classes or mix-in classes.

    def test_Set(self):
        for sample in [set, frozenset]:
            self.assertIsInstance(sample(), Set)
            self.assertTrue(issubclass(sample, Set))
        self.validate_abstract_methods(Set, '__contains__', '__iter__', '__len__')
        class MySet(Set):
            def __contains__(self, x):
                return False
            def __len__(self):
                return 0
            def __iter__(self):
                return iter([])
        self.validate_comparison(MySet())

    def test_hash_Set(self):
        class OneTwoThreeSet(Set):
            def __init__(self):
                self.contents = [1, 2, 3]
            def __contains__(self, x):
                return x in self.contents
            def __len__(self):
                return len(self.contents)
            def __iter__(self):
                return iter(self.contents)
            def __hash__(self):
                return self._hash()
        a, b = OneTwoThreeSet(), OneTwoThreeSet()
        self.assertTrue(hash(a) == hash(b))

    def test_isdisjoint_Set(self):
        class MySet(Set):
            def __init__(self, itr):
                self.contents = itr
            def __contains__(self, x):
                return x in self.contents
            def __iter__(self):
                return iter(self.contents)
            def __len__(self):
                return len([x for x in self.contents])
        s1 = MySet((1, 2, 3))
        s2 = MySet((4, 5, 6))
        s3 = MySet((1, 5, 6))
        self.assertTrue(s1.isdisjoint(s2))
        self.assertFalse(s1.isdisjoint(s3))

    def test_equality_Set(self):
        class MySet(Set):
            def __init__(self, itr):
                self.contents = itr
            def __contains__(self, x):
                return x in self.contents
            def __iter__(self):
                return iter(self.contents)
            def __len__(self):
                return len([x for x in self.contents])
        s1 = MySet((1,))
        s2 = MySet((1, 2))
        s3 = MySet((3, 4))
        s4 = MySet((3, 4))
        self.assertTrue(s2 > s1)
        self.assertTrue(s1 < s2)
        self.assertFalse(s2 <= s1)
        self.assertFalse(s2 <= s3)
        self.assertFalse(s1 >= s2)
        self.assertEqual(s3, s4)
        self.assertNotEqual(s2, s3)

    def test_arithmetic_Set(self):
        class MySet(Set):
            def __init__(self, itr):
                self.contents = itr
            def __contains__(self, x):
                return x in self.contents
            def __iter__(self):
                return iter(self.contents)
            def __len__(self):
                return len([x for x in self.contents])
        s1 = MySet((1, 2, 3))
        s2 = MySet((3, 4, 5))
        s3 = s1 & s2
        self.assertEqual(s3, MySet((3,)))

    def test_MutableSet(self):
        self.assertIsInstance(set(), MutableSet)
        self.assertTrue(issubclass(set, MutableSet))
        self.assertNotIsInstance(frozenset(), MutableSet)
        self.assertFalse(issubclass(frozenset, MutableSet))
        self.validate_abstract_methods(MutableSet, '__contains__', '__iter__', '__len__',
            'add', 'discard')

    def test_issue_5647(self):
        # MutableSet.__iand__ mutated the set during iteration
        s = WithSet('abcd')
        s &= WithSet('cdef')            # This used to fail
        self.assertEqual(set(s), set('cd'))

    def test_issue_4920(self):
        # MutableSet.pop() method did not work
        class MySet(MutableSet):
            __slots__=['__s']
            def __init__(self,items=None):
                if items is None:
                    items=[]
                self.__s=set(items)
            def __contains__(self,v):
                return v in self.__s
            def __iter__(self):
                return iter(self.__s)
            def __len__(self):
                return len(self.__s)
            def add(self,v):
                result=v not in self.__s
                self.__s.add(v)
                return result
            def discard(self,v):
                result=v in self.__s
                self.__s.discard(v)
                return result
            def __repr__(self):
                return "MySet(%s)" % repr(list(self))
        items = [5,43,2,1]
        s = MySet(items)
        r = s.pop()
        self.assertEquals(len(s), len(items) - 1)
        self.assertNotIn(r, s)
        self.assertIn(r, items)

    def test_issue8750(self):
        empty = WithSet()
        full = WithSet(range(10))
        s = WithSet(full)
        s -= s
        self.assertEqual(s, empty)
        s = WithSet(full)
        s ^= s
        self.assertEqual(s, empty)
        s = WithSet(full)
        s &= s
        self.assertEqual(s, full)
        s |= s
        self.assertEqual(s, full)

    def test_issue16373(self):
        # Recursion error comparing comparable and noncomparable
        # Set instances
        class MyComparableSet(Set):
            def __contains__(self, x):
                return False
            def __len__(self):
                return 0
            def __iter__(self):
                return iter([])
        class MyNonComparableSet(Set):
            def __contains__(self, x):
                return False
            def __len__(self):
                return 0
            def __iter__(self):
                return iter([])
            def __le__(self, x):
                return NotImplemented
            def __lt__(self, x):
                return NotImplemented

        cs = MyComparableSet()
        ncs = MyNonComparableSet()
        self.assertFalse(ncs < cs)
        self.assertTrue(ncs <= cs)
        self.assertFalse(ncs > cs)
        self.assertTrue(ncs >= cs)

    def test_issue26915(self):
        # Container membership test should check identity first
        class CustomEqualObject:
            def __eq__(self, other):
                return False
        class CustomSequence(Sequence):
            def __init__(self, seq):
                self._seq = seq
            def __getitem__(self, index):
                return self._seq[index]
            def __len__(self):
                return len(self._seq)

        nan = float('nan')
        obj = CustomEqualObject()
        seq = CustomSequence([nan, obj, nan])
        containers = [
            seq,
            ItemsView({1: nan, 2: obj}),
            ValuesView({1: nan, 2: obj})
        ]
        for container in containers:
            for elem in container:
                self.assertIn(elem, container)
        self.assertEqual(seq.index(nan), 0)
        self.assertEqual(seq.index(obj), 1)
        self.assertEqual(seq.count(nan), 2)
        self.assertEqual(seq.count(obj), 1)

    def assertSameSet(self, s1, s2):
        # coerce both to a real set then check equality
        self.assertSetEqual(set(s1), set(s2))

    def test_Set_interoperability_with_real_sets(self):
        # Issue: 8743
        class ListSet(Set):
            def __init__(self, elements=()):
                self.data = []
                for elem in elements:
                    if elem not in self.data:
                        self.data.append(elem)
            def __contains__(self, elem):
                return elem in self.data
            def __iter__(self):
                return iter(self.data)
            def __len__(self):
                return len(self.data)
            def __repr__(self):
                return 'Set({!r})'.format(self.data)

        r1 = set('abc')
        r2 = set('bcd')
        r3 = set('abcde')
        f1 = ListSet('abc')
        f2 = ListSet('bcd')
        f3 = ListSet('abcde')
        l1 = list('abccba')
        l2 = list('bcddcb')
        l3 = list('abcdeedcba')

        target = r1 & r2
        self.assertSameSet(f1 & f2, target)
        self.assertSameSet(f1 & r2, target)
        self.assertSameSet(r2 & f1, target)
        self.assertSameSet(f1 & l2, target)

        target = r1 | r2
        self.assertSameSet(f1 | f2, target)
        self.assertSameSet(f1 | r2, target)
        self.assertSameSet(r2 | f1, target)
        self.assertSameSet(f1 | l2, target)

        fwd_target = r1 - r2
        rev_target = r2 - r1
        self.assertSameSet(f1 - f2, fwd_target)
        self.assertSameSet(f2 - f1, rev_target)
        self.assertSameSet(f1 - r2, fwd_target)
        self.assertSameSet(f2 - r1, rev_target)
        self.assertSameSet(r1 - f2, fwd_target)
        self.assertSameSet(r2 - f1, rev_target)
        self.assertSameSet(f1 - l2, fwd_target)
        self.assertSameSet(f2 - l1, rev_target)

        target = r1 ^ r2
        self.assertSameSet(f1 ^ f2, target)
        self.assertSameSet(f1 ^ r2, target)
        self.assertSameSet(r2 ^ f1, target)
        self.assertSameSet(f1 ^ l2, target)

        # Don't change the following to use assertLess or other
        # "more specific" unittest assertions.  The current
        # assertTrue/assertFalse style makes the pattern of test
        # case combinations clear and allows us to know for sure
        # the exact operator being invoked.

        # proper subset
        self.assertTrue(f1 < f3)
        self.assertFalse(f1 < f1)
        self.assertFalse(f1 < f2)
        self.assertTrue(r1 < f3)
        self.assertFalse(r1 < f1)
        self.assertFalse(r1 < f2)
        self.assertTrue(r1 < r3)
        self.assertFalse(r1 < r1)
        self.assertFalse(r1 < r2)
        with self.assertRaises(TypeError):
            f1 < l3
        with self.assertRaises(TypeError):
            f1 < l1
        with self.assertRaises(TypeError):
            f1 < l2

        # any subset
        self.assertTrue(f1 <= f3)
        self.assertTrue(f1 <= f1)
        self.assertFalse(f1 <= f2)
        self.assertTrue(r1 <= f3)
        self.assertTrue(r1 <= f1)
        self.assertFalse(r1 <= f2)
        self.assertTrue(r1 <= r3)
        self.assertTrue(r1 <= r1)
        self.assertFalse(r1 <= r2)
        with self.assertRaises(TypeError):
            f1 <= l3
        with self.assertRaises(TypeError):
            f1 <= l1
        with self.assertRaises(TypeError):
            f1 <= l2

        # proper superset
        self.assertTrue(f3 > f1)
        self.assertFalse(f1 > f1)
        self.assertFalse(f2 > f1)
        self.assertTrue(r3 > r1)
        self.assertFalse(f1 > r1)
        self.assertFalse(f2 > r1)
        self.assertTrue(r3 > r1)
        self.assertFalse(r1 > r1)
        self.assertFalse(r2 > r1)
        with self.assertRaises(TypeError):
            f1 > l3
        with self.assertRaises(TypeError):
            f1 > l1
        with self.assertRaises(TypeError):
            f1 > l2

        # any superset
        self.assertTrue(f3 >= f1)
        self.assertTrue(f1 >= f1)
        self.assertFalse(f2 >= f1)
        self.assertTrue(r3 >= r1)
        self.assertTrue(f1 >= r1)
        self.assertFalse(f2 >= r1)
        self.assertTrue(r3 >= r1)
        self.assertTrue(r1 >= r1)
        self.assertFalse(r2 >= r1)
        with self.assertRaises(TypeError):
            f1 >= l3
        with self.assertRaises(TypeError):
            f1 >=l1
        with self.assertRaises(TypeError):
            f1 >= l2

        # equality
        self.assertTrue(f1 == f1)
        self.assertTrue(r1 == f1)
        self.assertTrue(f1 == r1)
        self.assertFalse(f1 == f3)
        self.assertFalse(r1 == f3)
        self.assertFalse(f1 == r3)
        self.assertFalse(f1 == l3)
        self.assertFalse(f1 == l1)
        self.assertFalse(f1 == l2)

        # inequality
        self.assertFalse(f1 != f1)
        self.assertFalse(r1 != f1)
        self.assertFalse(f1 != r1)
        self.assertTrue(f1 != f3)
        self.assertTrue(r1 != f3)
        self.assertTrue(f1 != r3)
        self.assertTrue(f1 != l3)
        self.assertTrue(f1 != l1)
        self.assertTrue(f1 != l2)

    def test_Mapping(self):
        for sample in [dict]:
            self.assertIsInstance(sample(), Mapping)
            self.assertTrue(issubclass(sample, Mapping))
        self.validate_abstract_methods(Mapping, '__contains__', '__iter__', '__len__',
            '__getitem__')
        class MyMapping(Mapping):
            def __len__(self):
                return 0
            def __getitem__(self, i):
                raise IndexError
            def __iter__(self):
                return iter(())
        self.validate_comparison(MyMapping())
        self.assertRaises(TypeError, reversed, MyMapping())

    def test_MutableMapping(self):
        for sample in [dict]:
            self.assertIsInstance(sample(), MutableMapping)
            self.assertTrue(issubclass(sample, MutableMapping))
        self.validate_abstract_methods(MutableMapping, '__contains__', '__iter__', '__len__',
            '__getitem__', '__setitem__', '__delitem__')

    def test_MutableMapping_subclass(self):
        # Test issue 9214
        mymap = UserDict()
        mymap['red'] = 5
        self.assertIsInstance(mymap.keys(), Set)
        self.assertIsInstance(mymap.keys(), KeysView)
        self.assertIsInstance(mymap.items(), Set)
        self.assertIsInstance(mymap.items(), ItemsView)

        mymap = UserDict()
        mymap['red'] = 5
        z = mymap.keys() | {'orange'}
        self.assertIsInstance(z, set)
        list(z)
        mymap['blue'] = 7               # Shouldn't affect 'z'
        self.assertEqual(sorted(z), ['orange', 'red'])

        mymap = UserDict()
        mymap['red'] = 5
        z = mymap.items() | {('orange', 3)}
        self.assertIsInstance(z, set)
        list(z)
        mymap['blue'] = 7               # Shouldn't affect 'z'
        self.assertEqual(z, {('orange', 3), ('red', 5)})

    def test_Sequence(self):
        for sample in [tuple, list, bytes, str]:
            self.assertIsInstance(sample(), Sequence)
            self.assertTrue(issubclass(sample, Sequence))
        self.assertIsInstance(range(10), Sequence)
        self.assertTrue(issubclass(range, Sequence))
        self.assertIsInstance(memoryview(b""), Sequence)
        self.assertTrue(issubclass(memoryview, Sequence))
        self.assertTrue(issubclass(str, Sequence))
        self.validate_abstract_methods(Sequence, '__contains__', '__iter__', '__len__',
            '__getitem__')

    def test_Sequence_mixins(self):
        class SequenceSubclass(Sequence):
            def __init__(self, seq=()):
                self.seq = seq

            def __getitem__(self, index):
                return self.seq[index]

            def __len__(self):
                return len(self.seq)

        # Compare Sequence.index() behavior to (list|str).index() behavior
        def assert_index_same(seq1, seq2, index_args):
            try:
                expected = seq1.index(*index_args)
            except ValueError:
                with self.assertRaises(ValueError):
                    seq2.index(*index_args)
            else:
                actual = seq2.index(*index_args)
                self.assertEqual(
                    actual, expected, '%r.index%s' % (seq1, index_args))

        for ty in list, str:
            nativeseq = ty('abracadabra')
            indexes = [-10000, -9999] + list(range(-3, len(nativeseq) + 3))
            seqseq = SequenceSubclass(nativeseq)
            for letter in set(nativeseq) | {'z'}:
                assert_index_same(nativeseq, seqseq, (letter,))
                for start in range(-3, len(nativeseq) + 3):
                    assert_index_same(nativeseq, seqseq, (letter, start))
                    for stop in range(-3, len(nativeseq) + 3):
                        assert_index_same(
                            nativeseq, seqseq, (letter, start, stop))

    def test_ByteString(self):
        for sample in [bytes, bytearray]:
            self.assertIsInstance(sample(), ByteString)
            self.assertTrue(issubclass(sample, ByteString))
        for sample in [str, list, tuple]:
            self.assertNotIsInstance(sample(), ByteString)
            self.assertFalse(issubclass(sample, ByteString))
        self.assertNotIsInstance(memoryview(b""), ByteString)
        self.assertFalse(issubclass(memoryview, ByteString))

    def test_MutableSequence(self):
        for sample in [tuple, str, bytes]:
            self.assertNotIsInstance(sample(), MutableSequence)
            self.assertFalse(issubclass(sample, MutableSequence))
        for sample in [list, bytearray, deque]:
            self.assertIsInstance(sample(), MutableSequence)
            self.assertTrue(issubclass(sample, MutableSequence))
        self.assertFalse(issubclass(str, MutableSequence))
        self.validate_abstract_methods(MutableSequence, '__contains__', '__iter__',
            '__len__', '__getitem__', '__setitem__', '__delitem__', 'insert')

    def test_MutableSequence_mixins(self):
        # Test the mixins of MutableSequence by creating a minimal concrete
        # class inherited from it.
        class MutableSequenceSubclass(MutableSequence):
            def __init__(self):
                self.lst = []

            def __setitem__(self, index, value):
                self.lst[index] = value

            def __getitem__(self, index):
                return self.lst[index]

            def __len__(self):
                return len(self.lst)

            def __delitem__(self, index):
                del self.lst[index]

            def insert(self, index, value):
                self.lst.insert(index, value)

        mss = MutableSequenceSubclass()
        mss.append(0)
        mss.extend((1, 2, 3, 4))
        self.assertEqual(len(mss), 5)
        self.assertEqual(mss[3], 3)
        mss.reverse()
        self.assertEqual(mss[3], 1)
        mss.pop()
        self.assertEqual(len(mss), 4)
        mss.remove(3)
        self.assertEqual(len(mss), 3)
        mss += (10, 20, 30)
        self.assertEqual(len(mss), 6)
        self.assertEqual(mss[-1], 30)
        mss.clear()
        self.assertEqual(len(mss), 0)

        # issue 34427
        # extending self should not cause infinite loop
        items = 'ABCD'
        mss2 = MutableSequenceSubclass()
        mss2.extend(items + items)
        mss.clear()
        mss.extend(items)
        mss.extend(mss)
        self.assertEqual(len(mss), len(mss2))
        self.assertEqual(list(mss), list(mss2))


################################################################################
### Counter
################################################################################

class CounterSubclassWithSetItem(Counter):
    # Test a counter subclass that overrides __setitem__
    def __init__(self, *args, **kwds):
        self.called = False
        Counter.__init__(self, *args, **kwds)
    def __setitem__(self, key, value):
        self.called = True
        Counter.__setitem__(self, key, value)

class CounterSubclassWithGet(Counter):
    # Test a counter subclass that overrides get()
    def __init__(self, *args, **kwds):
        self.called = False
        Counter.__init__(self, *args, **kwds)
    def get(self, key, default):
        self.called = True
        return Counter.get(self, key, default)

class TestCounter(unittest.TestCase):

    def test_basics(self):
        c = Counter('abcaba')
        self.assertEqual(c, Counter({'a':3 , 'b': 2, 'c': 1}))
        self.assertEqual(c, Counter(a=3, b=2, c=1))
        self.assertIsInstance(c, dict)
        self.assertIsInstance(c, Mapping)
        self.assertTrue(issubclass(Counter, dict))
        self.assertTrue(issubclass(Counter, Mapping))
        self.assertEqual(len(c), 3)
        self.assertEqual(sum(c.values()), 6)
        self.assertEqual(list(c.values()), [3, 2, 1])
        self.assertEqual(list(c.keys()), ['a', 'b', 'c'])
        self.assertEqual(list(c), ['a', 'b', 'c'])
        self.assertEqual(list(c.items()),
                         [('a', 3), ('b', 2), ('c', 1)])
        self.assertEqual(c['b'], 2)
        self.assertEqual(c['z'], 0)
        self.assertEqual(c.__contains__('c'), True)
        self.assertEqual(c.__contains__('z'), False)
        self.assertEqual(c.get('b', 10), 2)
        self.assertEqual(c.get('z', 10), 10)
        self.assertEqual(c, dict(a=3, b=2, c=1))
        self.assertEqual(repr(c), "Counter({'a': 3, 'b': 2, 'c': 1})")
        self.assertEqual(c.most_common(), [('a', 3), ('b', 2), ('c', 1)])
        for i in range(5):
            self.assertEqual(c.most_common(i),
                             [('a', 3), ('b', 2), ('c', 1)][:i])
        self.assertEqual(''.join(c.elements()), 'aaabbc')
        c['a'] += 1         # increment an existing value
        c['b'] -= 2         # sub existing value to zero
        del c['c']          # remove an entry
        del c['c']          # make sure that del doesn't raise KeyError
        c['d'] -= 2         # sub from a missing value
        c['e'] = -5         # directly assign a missing value
        c['f'] += 4         # add to a missing value
        self.assertEqual(c, dict(a=4, b=0, d=-2, e=-5, f=4))
        self.assertEqual(''.join(c.elements()), 'aaaaffff')
        self.assertEqual(c.pop('f'), 4)
        self.assertNotIn('f', c)
        for i in range(3):
            elem, cnt = c.popitem()
            self.assertNotIn(elem, c)
        c.clear()
        self.assertEqual(c, {})
        self.assertEqual(repr(c), 'Counter()')
        self.assertRaises(NotImplementedError, Counter.fromkeys, 'abc')
        self.assertRaises(TypeError, hash, c)
        c.update(dict(a=5, b=3))
        c.update(c=1)
        c.update(Counter('a' * 50 + 'b' * 30))
        c.update()          # test case with no args
        c.__init__('a' * 500 + 'b' * 300)
        c.__init__('cdc')
        c.__init__()
        self.assertEqual(c, dict(a=555, b=333, c=3, d=1))
        self.assertEqual(c.setdefault('d', 5), 1)
        self.assertEqual(c['d'], 1)
        self.assertEqual(c.setdefault('e', 5), 5)
        self.assertEqual(c['e'], 5)

    def test_init(self):
        self.assertEqual(list(Counter(self=42).items()), [('self', 42)])
        self.assertEqual(list(Counter(iterable=42).items()), [('iterable', 42)])
        self.assertEqual(list(Counter(iterable=None).items()), [('iterable', None)])
        self.assertRaises(TypeError, Counter, 42)
        self.assertRaises(TypeError, Counter, (), ())
        self.assertRaises(TypeError, Counter.__init__)

    def test_order_preservation(self):
        # Input order dictates items() order
        self.assertEqual(list(Counter('abracadabra').items()),
               [('a', 5), ('b', 2), ('r', 2), ('c', 1), ('d', 1)])
        # letters with same count:   ^----------^         ^---------^

        # Verify retention of order even when all counts are equal
        self.assertEqual(list(Counter('xyzpdqqdpzyx').items()),
               [('x', 2), ('y', 2), ('z', 2), ('p', 2), ('d', 2), ('q', 2)])

        # Input order dictates elements() order
        self.assertEqual(list(Counter('abracadabra simsalabim').elements()),
                ['a', 'a', 'a', 'a', 'a', 'a', 'a', 'b', 'b', 'b','r',
                 'r', 'c', 'd', ' ', 's', 's', 'i', 'i', 'm', 'm', 'l'])

        # Math operations order first by the order encountered in the left
        # operand and then by the order encountered in the right operand.
        ps = 'aaabbcdddeefggghhijjjkkl'
        qs = 'abbcccdeefffhkkllllmmnno'
        order = {letter: i for i, letter in enumerate(dict.fromkeys(ps + qs))}
        def correctly_ordered(seq):
            'Return true if the letters occur in the expected order'
            positions = [order[letter] for letter in seq]
            return positions == sorted(positions)

        p, q = Counter(ps), Counter(qs)
        self.assertTrue(correctly_ordered(+p))
        self.assertTrue(correctly_ordered(-p))
        self.assertTrue(correctly_ordered(p + q))
        self.assertTrue(correctly_ordered(p - q))
        self.assertTrue(correctly_ordered(p | q))
        self.assertTrue(correctly_ordered(p & q))

        p, q = Counter(ps), Counter(qs)
        p += q
        self.assertTrue(correctly_ordered(p))

        p, q = Counter(ps), Counter(qs)
        p -= q
        self.assertTrue(correctly_ordered(p))

        p, q = Counter(ps), Counter(qs)
        p |= q
        self.assertTrue(correctly_ordered(p))

        p, q = Counter(ps), Counter(qs)
        p &= q
        self.assertTrue(correctly_ordered(p))

        p, q = Counter(ps), Counter(qs)
        p.update(q)
        self.assertTrue(correctly_ordered(p))

        p, q = Counter(ps), Counter(qs)
        p.subtract(q)
        self.assertTrue(correctly_ordered(p))

    def test_update(self):
        c = Counter()
        c.update(self=42)
        self.assertEqual(list(c.items()), [('self', 42)])
        c = Counter()
        c.update(iterable=42)
        self.assertEqual(list(c.items()), [('iterable', 42)])
        c = Counter()
        c.update(iterable=None)
        self.assertEqual(list(c.items()), [('iterable', None)])
        self.assertRaises(TypeError, Counter().update, 42)
        self.assertRaises(TypeError, Counter().update, {}, {})
        self.assertRaises(TypeError, Counter.update)

    def test_copying(self):
        # Check that counters are copyable, deepcopyable, picklable, and
        #have a repr/eval round-trip
        words = Counter('which witch had which witches wrist watch'.split())
        def check(dup):
            msg = "\ncopy: %s\nwords: %s" % (dup, words)
            self.assertIsNot(dup, words, msg)
            self.assertEqual(dup, words)
        check(words.copy())
        check(copy.copy(words))
        check(copy.deepcopy(words))
        for proto in range(pickle.HIGHEST_PROTOCOL + 1):
            with self.subTest(proto=proto):
                check(pickle.loads(pickle.dumps(words, proto)))
        check(eval(repr(words)))
        update_test = Counter()
        update_test.update(words)
        check(update_test)
        check(Counter(words))

    def test_copy_subclass(self):
        class MyCounter(Counter):
            pass
        c = MyCounter('slartibartfast')
        d = c.copy()
        self.assertEqual(d, c)
        self.assertEqual(len(d), len(c))
        self.assertEqual(type(d), type(c))

    def test_conversions(self):
        # Convert to: set, list, dict
        s = 'she sells sea shells by the sea shore'
        self.assertEqual(sorted(Counter(s).elements()), sorted(s))
        self.assertEqual(sorted(Counter(s)), sorted(set(s)))
        self.assertEqual(dict(Counter(s)), dict(Counter(s).items()))
        self.assertEqual(set(Counter(s)), set(s))

    def test_invariant_for_the_in_operator(self):
        c = Counter(a=10, b=-2, c=0)
        for elem in c:
            self.assertTrue(elem in c)
            self.assertIn(elem, c)

    def test_multiset_operations(self):
        # Verify that adding a zero counter will strip zeros and negatives
        c = Counter(a=10, b=-2, c=0) + Counter()
        self.assertEqual(dict(c), dict(a=10))

        elements = 'abcd'
        for i in range(1000):
            # test random pairs of multisets
            p = Counter(dict((elem, randrange(-2,4)) for elem in elements))
            p.update(e=1, f=-1, g=0)
            q = Counter(dict((elem, randrange(-2,4)) for elem in elements))
            q.update(h=1, i=-1, j=0)
            for counterop, numberop in [
                (Counter.__add__, lambda x, y: max(0, x+y)),
                (Counter.__sub__, lambda x, y: max(0, x-y)),
                (Counter.__or__, lambda x, y: max(0,x,y)),
                (Counter.__and__, lambda x, y: max(0, min(x,y))),
            ]:
                result = counterop(p, q)
                for x in elements:
                    self.assertEqual(numberop(p[x], q[x]), result[x],
                                     (counterop, x, p, q))
                # verify that results exclude non-positive counts
                self.assertTrue(x>0 for x in result.values())

        elements = 'abcdef'
        for i in range(100):
            # verify that random multisets with no repeats are exactly like sets
            p = Counter(dict((elem, randrange(0, 2)) for elem in elements))
            q = Counter(dict((elem, randrange(0, 2)) for elem in elements))
            for counterop, setop in [
                (Counter.__sub__, set.__sub__),
                (Counter.__or__, set.__or__),
                (Counter.__and__, set.__and__),
            ]:
                counter_result = counterop(p, q)
                set_result = setop(set(p.elements()), set(q.elements()))
                self.assertEqual(counter_result, dict.fromkeys(set_result, 1))

    def test_inplace_operations(self):
        elements = 'abcd'
        for i in range(1000):
            # test random pairs of multisets
            p = Counter(dict((elem, randrange(-2,4)) for elem in elements))
            p.update(e=1, f=-1, g=0)
            q = Counter(dict((elem, randrange(-2,4)) for elem in elements))
            q.update(h=1, i=-1, j=0)
            for inplace_op, regular_op in [
                (Counter.__iadd__, Counter.__add__),
                (Counter.__isub__, Counter.__sub__),
                (Counter.__ior__, Counter.__or__),
                (Counter.__iand__, Counter.__and__),
            ]:
                c = p.copy()
                c_id = id(c)
                regular_result = regular_op(c, q)
                inplace_result = inplace_op(c, q)
                self.assertEqual(inplace_result, regular_result)
                self.assertEqual(id(inplace_result), c_id)

    def test_subtract(self):
        c = Counter(a=-5, b=0, c=5, d=10, e=15,g=40)
        c.subtract(a=1, b=2, c=-3, d=10, e=20, f=30, h=-50)
        self.assertEqual(c, Counter(a=-6, b=-2, c=8, d=0, e=-5, f=-30, g=40, h=50))
        c = Counter(a=-5, b=0, c=5, d=10, e=15,g=40)
        c.subtract(Counter(a=1, b=2, c=-3, d=10, e=20, f=30, h=-50))
        self.assertEqual(c, Counter(a=-6, b=-2, c=8, d=0, e=-5, f=-30, g=40, h=50))
        c = Counter('aaabbcd')
        c.subtract('aaaabbcce')
        self.assertEqual(c, Counter(a=-1, b=0, c=-1, d=1, e=-1))

        c = Counter()
        c.subtract(self=42)
        self.assertEqual(list(c.items()), [('self', -42)])
        c = Counter()
        c.subtract(iterable=42)
        self.assertEqual(list(c.items()), [('iterable', -42)])
        self.assertRaises(TypeError, Counter().subtract, 42)
        self.assertRaises(TypeError, Counter().subtract, {}, {})
        self.assertRaises(TypeError, Counter.subtract)

    def test_unary(self):
        c = Counter(a=-5, b=0, c=5, d=10, e=15,g=40)
        self.assertEqual(dict(+c), dict(c=5, d=10, e=15, g=40))
        self.assertEqual(dict(-c), dict(a=5))

    def test_repr_nonsortable(self):
        c = Counter(a=2, b=None)
        r = repr(c)
        self.assertIn("'a': 2", r)
        self.assertIn("'b': None", r)

    def test_helper_function(self):
        # two paths, one for real dicts and one for other mappings
        elems = list('abracadabra')

        d = dict()
        _count_elements(d, elems)
        self.assertEqual(d, {'a': 5, 'r': 2, 'b': 2, 'c': 1, 'd': 1})

        m = OrderedDict()
        _count_elements(m, elems)
        self.assertEqual(m,
             OrderedDict([('a', 5), ('b', 2), ('r', 2), ('c', 1), ('d', 1)]))

        # test fidelity to the pure python version
        c = CounterSubclassWithSetItem('abracadabra')
        self.assertTrue(c.called)
        self.assertEqual(dict(c), {'a': 5, 'b': 2, 'c': 1, 'd': 1, 'r':2 })
        c = CounterSubclassWithGet('abracadabra')
        self.assertTrue(c.called)
        self.assertEqual(dict(c), {'a': 5, 'b': 2, 'c': 1, 'd': 1, 'r':2 })


################################################################################
### Run tests
################################################################################

def test_main(verbose=None):
    NamedTupleDocs = doctest.DocTestSuite(module=collections)
    test_classes = [TestNamedTuple, NamedTupleDocs, TestOneTrickPonyABCs,
                    TestCollectionABCs, TestCounter, TestChainMap,
                    TestUserObjects,
                    ]
    support.run_unittest(*test_classes)
    support.run_doctest(collections, verbose)


if __name__ == "__main__":
    test_main(verbose=True)


Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
25 Oct 2024 11.52 AM
root / linksafe
0755
__pycache__
--
25 Oct 2024 11.54 AM
root / linksafe
0755
audiodata
--
25 Oct 2024 11.54 AM
root / linksafe
0755
capath
--
25 Oct 2024 11.54 AM
root / linksafe
0755
cjkencodings
--
25 Oct 2024 11.54 AM
root / linksafe
0755
data
--
25 Oct 2024 11.54 AM
root / linksafe
0755
decimaltestdata
--
25 Oct 2024 11.54 AM
root / linksafe
0755
dtracedata
--
25 Oct 2024 11.54 AM
root / linksafe
0755
eintrdata
--
25 Oct 2024 11.54 AM
root / linksafe
0755
encoded_modules
--
25 Oct 2024 11.54 AM
root / linksafe
0755
imghdrdata
--
25 Oct 2024 11.54 AM
root / linksafe
0755
libregrtest
--
25 Oct 2024 11.54 AM
root / linksafe
0755
sndhdrdata
--
25 Oct 2024 11.54 AM
root / linksafe
0755
subprocessdata
--
25 Oct 2024 11.54 AM
root / linksafe
0755
support
--
25 Oct 2024 11.54 AM
root / linksafe
0755
test_asyncio
--
25 Oct 2024 11.54 AM
root / linksafe
0755
test_email
--
25 Oct 2024 11.54 AM
root / linksafe
0755
test_import
--
25 Oct 2024 11.54 AM
root / linksafe
0755
test_importlib
--
25 Oct 2024 11.54 AM
root / linksafe
0755
test_json
--
25 Oct 2024 11.54 AM
root / linksafe
0755
test_warnings
--
25 Oct 2024 11.54 AM
root / linksafe
0755
tracedmodules
--
25 Oct 2024 11.54 AM
root / linksafe
0755
xmltestdata
--
25 Oct 2024 11.54 AM
root / linksafe
0755
ziptestdata
--
25 Oct 2024 11.54 AM
root / linksafe
0755
Sine-1000Hz-300ms.aif
60.25 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
__init__.py
0.046 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
__main__.py
0.04 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
_test_multiprocessing.py
183.479 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
allsans.pem
9.868 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
ann_module.py
1.078 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
ann_module2.py
0.507 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
ann_module3.py
0.438 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
audiotest.au
27.484 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
audiotests.py
12.462 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
audit-tests.py
9.082 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
autotest.py
0.204 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
bad_coding.py
0.023 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
bad_coding2.py
0.029 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
bad_getattr.py
0.06 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
bad_getattr2.py
0.075 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
bad_getattr3.py
0.136 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
badcert.pem
1.883 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
badkey.pem
2.111 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
badsyntax_3131.py
0.031 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
badsyntax_future10.py
0.093 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
badsyntax_future3.py
0.168 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
badsyntax_future4.py
0.149 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
badsyntax_future5.py
0.18 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
badsyntax_future6.py
0.157 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
badsyntax_future7.py
0.191 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
badsyntax_future8.py
0.119 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
badsyntax_future9.py
0.139 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
badsyntax_pep3120.py
0.014 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
bisect_cmd.py
4.862 KB
6 Sep 2024 8.41 PM
root / linksafe
0755
bytecode_helper.py
1.563 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
cfgparser.1
0.065 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
cfgparser.2
19.016 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
cfgparser.3
1.55 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
clinic.test
94.653 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
cmath_testcases.txt
141.047 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
coding20731.py
0.021 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
curses_tests.py
1.225 KB
6 Sep 2024 8.41 PM
root / linksafe
0755
dataclass_module_1.py
0.817 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
dataclass_module_1_str.py
0.815 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
dataclass_module_2.py
0.738 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
dataclass_module_2_str.py
0.736 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
dataclass_textanno.py
0.123 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
datetimetester.py
239.839 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
dis_module.py
0.074 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
doctest_aliases.py
0.234 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
double_const.py
1.184 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
empty.vbs
0.068 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
exception_hierarchy.txt
1.779 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
ffdh3072.pem
2.16 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
final_a.py
0.401 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
final_b.py
0.401 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
floating_points.txt
15.92 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
fork_wait.py
2.53 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
formatfloat_testcases.txt
7.451 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
future_test1.py
0.224 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
future_test2.py
0.146 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
gdb_sample.py
0.149 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
good_getattr.py
0.193 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
idnsans.pem
9.713 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
ieee754.txt
3.206 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
imp_dummy.py
0.062 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
inspect_fodder.py
1.882 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
inspect_fodder2.py
2.061 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
keycert.passwd.pem
4.126 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
keycert.pem
3.963 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
keycert2.pem
3.982 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
keycert3.pem
9.227 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
keycert4.pem
9.24 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
keycertecc.pem
5.505 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
list_tests.py
16.539 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
lock_tests.py
28.265 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
mailcap.txt
1.24 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
make_ssl_certs.py
9.246 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
mapping_tests.py
21.746 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
math_testcases.txt
23.186 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
memory_watchdog.py
0.839 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
mime.types
47.372 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
mock_socket.py
3.526 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
mod_generics_cache.py
1.133 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
mp_fork_bomb.py
0.438 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
mp_preload.py
0.343 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
multibytecodec_support.py
14.169 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
nokia.pem
1.878 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
nosan.pem
7.538 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
nullbytecert.pem
5.308 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
nullcert.pem
0 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
outstanding_bugs.py
0.361 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
pickletester.py
135.991 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
profilee.py
2.97 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
pstats.pck
65.046 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
pycacert.pem
5.531 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
pycakey.pem
2.426 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
pyclbr_input.py
0.633 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
pydoc_mod.py
0.696 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
pydocfodder.py
6.184 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
pythoninfo.py
20.343 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
randv2_32.pck
7.341 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
randv2_64.pck
7.192 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
randv3.pck
7.816 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
re_tests.py
25.941 KB
6 Sep 2024 8.41 PM
root / linksafe
0755
recursion.tar
0.504 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
regrtest.py
1.345 KB
6 Sep 2024 8.41 PM
root / linksafe
0755
relimport.py
0.026 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
reperf.py
0.525 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
revocation.crl
0.781 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
sample_doctest.py
1.017 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
sample_doctest_no_docstrings.py
0.222 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
sample_doctest_no_doctests.py
0.263 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
secp384r1.pem
0.25 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
selfsigned_pythontestdotnet.pem
2.08 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
seq_tests.py
14.183 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
sgml_input.html
8.1 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
signalinterproctester.py
2.696 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
sortperf.py
4.693 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
ssl_cert.pem
1.533 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
ssl_key.passwd.pem
2.592 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
ssl_key.pem
2.43 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
ssl_servers.py
7.042 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
ssltests.py
1.026 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
string_tests.py
64.649 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
talos-2019-0758.pem
1.299 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test___all__.py
4.116 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test___future__.py
2.364 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test__locale.py
7.831 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test__opcode.py
3.034 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test__osx_support.py
13.655 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test__xxsubinterpreters.py
68.695 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_abc.py
18.001 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_abstract_numbers.py
1.492 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_aifc.py
17.684 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_argparse.py
172.665 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_array.py
52.573 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_asdl_parser.py
4.146 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_ast.py
88.923 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_asyncgen.py
31.444 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_asynchat.py
9.284 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_asyncore.py
25.812 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_atexit.py
5.812 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_audioop.py
28.236 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_audit.py
4.192 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_augassign.py
7.684 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_base64.py
30.169 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_baseexception.py
6.864 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_bdb.py
41.548 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_bigaddrspace.py
2.92 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_bigmem.py
44.883 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_binascii.py
17.995 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_binhex.py
1.793 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_binop.py
14.14 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_bisect.py
13.633 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_bool.py
12.484 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_buffer.py
160.038 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_bufio.py
2.536 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_builtin.py
78.381 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_bytes.py
72.227 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_bz2.py
36.762 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_c_locale_coercion.py
18.82 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_calendar.py
48.715 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_call.py
20.885 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_capi.py
30.463 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_cgi.py
22.146 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_cgitb.py
2.505 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_charmapcodec.py
1.678 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_class.py
17.418 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_clinic.py
21.707 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_cmath.py
24.066 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_cmd.py
6.103 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_cmd_line.py
35.38 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_cmd_line_script.py
31.456 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_code.py
13.658 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_code_module.py
5.514 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_codeccallbacks.py
40.967 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_codecencodings_cn.py
3.857 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_codecencodings_hk.py
0.685 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_codecencodings_iso2022.py
3.654 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_codecencodings_jp.py
4.792 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_codecencodings_kr.py
2.957 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_codecencodings_tw.py
0.665 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_codecmaps_cn.py
0.729 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_codecmaps_hk.py
0.377 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_codecmaps_jp.py
1.703 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_codecmaps_kr.py
1.16 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_codecmaps_tw.py
0.688 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_codecs.py
129.645 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_codeop.py
7.973 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_collections.py
83.957 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_colorsys.py
3.835 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_compare.py
3.822 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_compile.py
37.073 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_compileall.py
26.704 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_complex.py
30.24 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_concurrent_futures.py
44.932 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_configparser.py
84.926 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_contains.py
3.485 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_context.py
30.744 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_contextlib.py
32.541 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_contextlib_async.py
14.819 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_copy.py
25.813 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_copyreg.py
4.393 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_coroutines.py
62.517 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_cprofile.py
6.325 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_crashers.py
1.169 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_crypt.py
3.968 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_csv.py
47.774 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_ctypes.py
0.18 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_curses.py
45.472 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dataclasses.py
108.797 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_datetime.py
2.149 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dbm.py
6.447 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dbm_dumb.py
10.613 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dbm_gnu.py
6.217 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dbm_ndbm.py
5.054 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_decimal.py
207.145 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_decorators.py
9.477 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_defaultdict.py
5.876 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_deque.py
34.459 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_descr.py
190.584 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_descrtut.py
11.527 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_devpoll.py
4.5 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dict.py
45 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dict_version.py
5.881 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dictcomps.py
4.417 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dictviews.py
11.684 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_difflib.py
19.637 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_difflib_expect.html
100.846 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dis.py
48.396 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_distutils.py
0.366 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_doctest.py
98.672 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_doctest.txt
0.293 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_doctest2.py
2.304 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_doctest2.txt
0.383 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_doctest3.txt
0.08 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_doctest4.txt
0.238 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_docxmlrpc.py
8.673 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dtrace.py
5.23 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dummy_thread.py
9.694 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dummy_threading.py
1.702 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dynamic.py
4.291 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dynamicclassattribute.py
9.565 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_eintr.py
1.321 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_embed.py
49.229 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_ensurepip.py
9.828 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_enum.py
113.676 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_enumerate.py
8.463 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_eof.py
1.943 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_epoll.py
9.03 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_errno.py
1.044 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_exception_hierarchy.py
7.432 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_exception_variations.py
3.855 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_exceptions.py
49.809 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_extcall.py
13.492 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_faulthandler.py
28.132 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_fcntl.py
6.215 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_file.py
11.017 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_file_eintr.py
10.6 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_filecmp.py
8.686 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_fileinput.py
37.335 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_fileio.py
19.965 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_finalization.py
14.657 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_float.py
63.405 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_flufl.py
1.315 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_fnmatch.py
5.065 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_fork1.py
3.673 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_format.py
22.575 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_fractions.py
29.835 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_frame.py
5.67 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_frozen.py
0.921 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_fstring.py
46.158 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_ftplib.py
39.707 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_funcattrs.py
13.545 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_functools.py
90.594 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_future.py
11.901 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_future3.py
0.479 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_future4.py
0.217 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_future5.py
0.498 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_gc.py
40.488 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_gdb.py
40.875 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_generator_stop.py
0.921 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_generators.py
58.515 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_genericclass.py
9.282 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_genericpath.py
21.7 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_genexps.py
7.117 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_getargs2.py
49.997 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_getopt.py
6.748 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_getpass.py
6.286 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_gettext.py
41.381 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_glob.py
13.032 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_global.py
1.309 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_grammar.py
57.501 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_grp.py
3.543 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_gzip.py
29.898 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_hash.py
11.447 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_hashlib.py
39.856 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_heapq.py
16.398 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_hmac.py
22.244 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_html.py
4.234 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_htmlparser.py
33.193 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_http_cookiejar.py
78.357 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_http_cookies.py
20.016 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_httplib.py
76.977 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_httpservers.py
49.479 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_idle.py
0.806 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_imaplib.py
38.95 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_imghdr.py
4.655 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_imp.py
17.733 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_index.py
8.371 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_inspect.py
151.785 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_int.py
28.414 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_int_literal.py
6.888 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_io.py
163.942 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_ioctl.py
3.2 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_ipaddress.py
94.413 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_isinstance.py
10.255 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_iter.py
31.808 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_iterlen.py
7.096 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_itertools.py
101.411 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_keyword.py
1.234 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_keywordonlyarg.py
6.853 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_kqueue.py
8.756 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_largefile.py
6.831 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_lib2to3.py
0.099 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_linecache.py
7.793 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_list.py
7.84 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_listcomps.py
3.763 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_lltrace.py
0.988 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_locale.py
23.865 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_logging.py
182.435 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_long.py
53.215 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_longexp.py
0.228 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_lzma.py
87.923 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_mailbox.py
91.922 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_mailcap.py
10.03 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_marshal.py
20.571 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_math.py
82.178 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_memoryio.py
31.483 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_memoryview.py
17.783 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_metaclass.py
6.201 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_mimetypes.py
12.139 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_minidom.py
67.344 KB
23 Sep 2024 11.15 AM
root / linksafe
0644
test_mmap.py
29.229 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_module.py
10.302 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_modulefinder.py
12.199 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_msilib.py
5.062 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_multibytecodec.py
15.037 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_multiprocessing_fork.py
0.466 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_multiprocessing_forkserver.py
0.383 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_multiprocessing_main_handling.py
11.446 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_multiprocessing_spawn.py
0.271 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_named_expressions.py
16.514 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_netrc.py
5.962 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_nis.py
1.129 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_nntplib.py
61.695 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_normalization.py
3.659 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_ntpath.py
35.081 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_numeric_tower.py
7.18 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_opcodes.py
3.605 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_openpty.py
0.586 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_operator.py
23.544 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_optparse.py
60.994 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_ordered_dict.py
30.218 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_os.py
150.991 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_ossaudiodev.py
7.057 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_osx_env.py
1.297 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_parser.py
35.724 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pathlib.py
97.12 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pdb.py
55.359 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_peepholer.py
19.408 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pickle.py
19.164 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_picklebuffer.py
4.958 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pickletools.py
4.33 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pipes.py
6.586 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pkg.py
9.594 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pkgimport.py
2.665 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pkgutil.py
19.245 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_platform.py
14.313 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_plistlib.py
41.426 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_poll.py
7.234 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_popen.py
1.978 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_poplib.py
16.973 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_positional_only_arg.py
17.498 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_posix.py
75.758 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_posixpath.py
29.186 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pow.py
5.439 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pprint.py
43.849 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_print.py
7.37 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_profile.py
8.721 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_property.py
8.77 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pstats.py
3.035 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pty.py
11.968 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pulldom.py
12.664 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pwd.py
4.168 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_py_compile.py
10.854 KB
23 Sep 2024 11.15 AM
root / linksafe
0644
test_pyclbr.py
10.003 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pydoc.py
56.983 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pyexpat.py
27.706 KB
23 Sep 2024 11.15 AM
root / linksafe
0644
test_queue.py
20.355 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_quopri.py
7.775 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_raise.py
12.859 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_random.py
45.59 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_range.py
23.351 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_re.py
106.407 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_readline.py
13.295 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_regrtest.py
46.36 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_repl.py
3.955 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_reprlib.py
15.115 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_resource.py
7.021 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_richcmp.py
11.91 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_rlcompleter.py
6.298 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_robotparser.py
10.688 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_runpy.py
33.855 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_sax.py
47.745 KB
23 Sep 2024 11.15 AM
root / linksafe
0644
test_sched.py
6.407 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_scope.py
19.704 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_script_helper.py
5.777 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_secrets.py
4.278 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_select.py
2.693 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_selectors.py
17.788 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_set.py
64.411 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_setcomps.py
3.703 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_shelve.py
6.244 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_shlex.py
13.291 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_shutil.py
102.108 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_signal.py
46.615 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_site.py
26.216 KB
23 Sep 2024 11.15 AM
root / linksafe
0644
test_slice.py
8.247 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_smtpd.py
40.145 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_smtplib.py
56.508 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_smtpnet.py
2.868 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_sndhdr.py
1.426 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_socket.py
237.219 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_socketserver.py
17.699 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_sort.py
13.425 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_source_encoding.py
7.891 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_spwd.py
2.709 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_sqlite.py
0.926 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_ssl.py
214.821 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_startfile.py
1.293 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_stat.py
8.303 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_statistics.py
106.497 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_strftime.py
7.542 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_string.py
19.797 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_string_literals.py
9.877 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_stringprep.py
3.04 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_strptime.py
34.424 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_strtod.py
20.056 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_struct.py
34.411 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_structmembers.py
4.703 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_structseq.py
3.871 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_subclassinit.py
8.118 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_subprocess.py
142.636 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_sunau.py
6.068 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_sundry.py
2.073 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_super.py
9.598 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_support.py
24.115 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_symbol.py
2.059 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_symtable.py
9.133 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_syntax.py
25.753 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_sys.py
55.681 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_sys_setprofile.py
12.31 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_sys_settrace.py
43.085 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_sysconfig.py
17.014 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_syslog.py
1.15 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_tabnanny.py
13.437 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_tarfile.py
144.04 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_tcl.py
30.742 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_telnetlib.py
12.698 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_tempfile.py
58.506 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_textwrap.py
38.838 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_thread.py
8.405 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_threaded_import.py
8.898 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_threadedtempfile.py
1.854 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_threading.py
47.516 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_threading_local.py
6.088 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_threadsignals.py
10.092 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_time.py
38.435 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_timeit.py
14.799 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_timeout.py
11.189 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_tix.py
0.738 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_tk.py
0.354 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_tokenize.py
63.185 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_trace.py
19.894 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_traceback.py
46.97 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_tracemalloc.py
37.408 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_ttk_guionly.py
0.729 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_ttk_textonly.py
0.292 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_tuple.py
18.854 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_turtle.py
12.785 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_type_comments.py
10.13 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_typechecks.py
2.554 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_types.py
57.998 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_typing.py
122.047 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_ucn.py
9.352 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_unary.py
1.626 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_unicode.py
129.936 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_unicode_file.py
5.741 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_unicode_file_functions.py
6.84 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_unicode_identifiers.py
0.87 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_unicodedata.py
12.702 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_unittest.py
0.279 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_univnewlines.py
3.83 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_unpack.py
3.014 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_unpack_ex.py
8.731 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_urllib.py
71.238 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_urllib2.py
79.438 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_urllib2_localnet.py
24.242 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_urllib2net.py
12.394 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_urllib_response.py
1.688 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_urllibnet.py
8.901 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_urlparse.py
70.385 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_userdict.py
7.638 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_userlist.py
1.969 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_userstring.py
2.403 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_utf8_mode.py
9.216 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_utf8source.py
1.147 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_uu.py
8.834 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_uuid.py
35.744 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_venv.py
20.456 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_wait3.py
1.155 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_wait4.py
1.154 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_wave.py
6.573 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_weakref.py
69.467 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_weakset.py
15.025 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_webbrowser.py
10.471 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_winconsoleio.py
6.14 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_winreg.py
21.382 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_winsound.py
4.567 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_with.py
25.779 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_wsgiref.py
30.104 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_xdrlib.py
2.174 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_xml_dom_minicompat.py
4.182 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_xml_etree.py
148.399 KB
23 Sep 2024 11.15 AM
root / linksafe
0644
test_xml_etree_c.py
8.058 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_xmlrpc.py
56.342 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_xmlrpc_net.py
0.991 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_xxtestfuzz.py
0.654 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_yield_from.py
30.014 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_zipapp.py
15.92 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_zipfile.py
121.048 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_zipfile64.py
5.801 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_zipimport.py
29.275 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_zipimport_support.py
10.438 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_zlib.py
34.542 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
testcodec.py
1.021 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
testtar.tar
425 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
tf_inherit_check.py
0.697 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
threaded_import_hangers.py
1.449 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
time_hashlib.py
2.874 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
tokenize_tests-latin1-coding-cookie-and-utf8-bom-sig.txt
0.433 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
tokenize_tests-no-coding-cookie-and-utf8-bom-sig-only.txt
0.295 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
tokenize_tests-utf8-coding-cookie-and-no-utf8-bom-sig.txt
0.411 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
tokenize_tests-utf8-coding-cookie-and-utf8-bom-sig.txt
0.318 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
tokenize_tests.txt
2.653 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
win_console_handler.py
1.383 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
xmltests.py
0.487 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
zip_cp437_header.zip
0.264 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
zipdir.zip
0.365 KB
6 Sep 2024 8.41 PM
root / linksafe
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF