'Ensure tuple subtypes are appropriately handled.'

def test_can_insert_tuples_all_primitive_datatypes(self):

    if (self.cass_version < (2, 1, 0)):
        raise unittest.SkipTest('The    tuple    type    was    introduced    in    Cassandra    2.1')
    c = Cluster(protocol_version=PROTOCOL_VERSION)
    s = c.connect(self.keyspace_name)
    s.encoder.mapping[tuple] = s.encoder.cql_encode_tuple
    s.execute(('CREATE    TABLE    tuple_primitive    (k    int    PRIMARY    KEY,    v    frozen<tuple<%s>>)' % ','.join(PRIMITIVE_DATATYPES)))
    values = []
    type_count = len(PRIMITIVE_DATATYPES)
    for (i, data_type) in enumerate(PRIMITIVE_DATATYPES):
        values.append(get_sample(data_type))
        expected = tuple((values + ([None] * (type_count - len(values)))))
        s.execute('INSERT    INTO    tuple_primitive    (k,    v)    VALUES    (%s,    %s)', (i, tuple(values)))
        result = s.execute('SELECT    v    FROM    tuple_primitive    WHERE    k=%s', (i,))[0]
        self.assertEqual(result.v, expected)
    c.shutdown()
