@testing.provide_metadata
def _run_test(self, specs, attributes):
    columns = [Column(('c%i' % (i + 1)), t[0]) for (i, t) in enumerate(specs)]
    use_views = (testing.db.dialect.server_version_info > (5, 0, 10))
    m = self.metadata
    Table('mysql_types', m, *columns)
    if use_views:
        event.listen(m, 'after_create', DDL('CREATE OR REPLACE VIEW mysql_types_v AS SELECT * from mysql_types'))
        event.listen(m, 'before_drop', DDL('DROP VIEW IF EXISTS mysql_types_v'))
    m.create_all()
    m2 = MetaData(testing.db)
    tables = [Table('mysql_types', m2, autoload=True)]
    if use_views:
        tables.append(Table('mysql_types_v', m2, autoload=True))
    for table in tables:
        for (i, (reflected_col, spec)) in enumerate(zip(table.c, specs)):
            expected_spec = spec[1]
            reflected_type = reflected_col.type
            is_(type(reflected_type), type(expected_spec))
            for attr in attributes:
                eq_(getattr(reflected_type, attr), getattr(expected_spec, attr), ('Column %s: Attribute %s value of %s does not match %s for type %s' % (('c%i' % (i + 1)), attr, getattr(reflected_type, attr), getattr(expected_spec, attr), spec[0])))
@testing.provide_metadata
def _run_test(self, specs, attributes):
    columns = [Column(('c%i' % (i + 1)), t[0]) for (i, t) in enumerate(specs)]
    use_views = (testing.db.dialect.server_version_info > (5, 0, 10))
    m = self.metadata
    Table('mysql_types', m, *columns)
    if use_views:
        event.listen(m, 'after_create', DDL('CREATE OR REPLACE VIEW mysql_types_v AS SELECT * from mysql_types'))
        event.listen(m, 'before_drop', DDL('DROP VIEW IF EXISTS mysql_types_v'))
    m.create_all()
    m2 = MetaData(testing.db)
    tables = [Table('mysql_types', m2, autoload=True)]
    if use_views:
        tables.append(Table('mysql_types_v', m2, autoload=True))
    for table in tables:
        for (i, (reflected_col, spec)) in enumerate(zip(table.c, specs)):
            expected_spec = spec[1]
            reflected_type = reflected_col.type
            is_(type(reflected_type), type(expected_spec))
            for attr in attributes:
                eq_(getattr(reflected_type, attr), getattr(expected_spec, attr), ('Column %s: Attribute %s value of %s does not match %s for type %s' % (('c%i' % (i + 1)), attr, getattr(reflected_type, attr), getattr(expected_spec, attr), spec[0])))