'Test introspection of various Django field types'

def test_number_field_types(self):

    assertFieldType = self.make_field_type_asserter()
    if (not connection.features.can_introspect_autofield):
        assertFieldType('id', 'models.IntegerField(primary_key=True)        #    AutoField?')
    if connection.features.can_introspect_big_integer_field:
        assertFieldType('big_int_field', 'models.BigIntegerField()')
    else:
        assertFieldType('big_int_field', 'models.IntegerField()')
    bool_field = ColumnTypes._meta.get_field('bool_field')
    bool_field_type = connection.features.introspected_boolean_field_type(bool_field)
    assertFieldType('bool_field', 'models.{}()'.format(bool_field_type))
    null_bool_field = ColumnTypes._meta.get_field('null_bool_field')
    null_bool_field_type = connection.features.introspected_boolean_field_type(null_bool_field)
    if ('BooleanField' in null_bool_field_type):
        assertFieldType('null_bool_field', 'models.{}()'.format(null_bool_field_type))
    elif connection.features.can_introspect_null:
        assertFieldType('null_bool_field', 'models.{}(blank=True,    null=True)'.format(null_bool_field_type))
    else:
        assertFieldType('null_bool_field', 'models.{}()'.format(null_bool_field_type))
    if connection.features.can_introspect_decimal_field:
        assertFieldType('decimal_field', 'models.DecimalField(max_digits=6,    decimal_places=1)')
    else:
        assertFieldType('decimal_field', 'models.DecimalField(max_digits=10,    decimal_places=5)        #    max_digits    and    decimal_places    have    been    guessed,    as    this    database    handles    decimal    fields    as    float')
    assertFieldType('float_field', 'models.FloatField()')
    assertFieldType('int_field', 'models.IntegerField()')
    if connection.features.can_introspect_positive_integer_field:
        assertFieldType('pos_int_field', 'models.PositiveIntegerField()')
    else:
        assertFieldType('pos_int_field', 'models.IntegerField()')
    if connection.features.can_introspect_positive_integer_field:
        if connection.features.can_introspect_small_integer_field:
            assertFieldType('pos_small_int_field', 'models.PositiveSmallIntegerField()')
        else:
            assertFieldType('pos_small_int_field', 'models.PositiveIntegerField()')
    elif connection.features.can_introspect_small_integer_field:
        assertFieldType('pos_small_int_field', 'models.SmallIntegerField()')
    else:
        assertFieldType('pos_small_int_field', 'models.IntegerField()')
    if connection.features.can_introspect_small_integer_field:
        assertFieldType('small_int_field', 'models.SmallIntegerField()')
    else:
        assertFieldType('small_int_field', 'models.IntegerField()')
