def keywords():
    if verbose:
        print "Testing keyword args to basic type constructors ..."
    vereq(int(x=1), 1)
    vereq(float(x=2), 2.0)
    vereq(long(x=3), 3L)
    vereq(complex(imag=42, real=666), complex(666, 42))
    vereq(str(object=500), '500')
    vereq(unicode(string='abc', errors='strict'), u'abc')
    vereq(tuple(sequence=range(3)), (0, 1, 2))
    vereq(list(sequence=(0, 1, 2)), range(3))
    # note: as of Python 2.3, dict() no longer has an "items" keyword arg

    for constructor in (int, float, long, complex, str, unicode,
                        tuple, list, file):
        try:
            constructor(bogus_keyword_arg=1)
        except __HOLE__:
            pass
        else:
            raise TestFailed("expected TypeError from bogus keyword "
                             "argument to %r" % constructor)
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/test/test_descr.py/keywords