'Test for inserting single-precision and double-precision values into a Float and Double columns
@since 2.6.0
@changed 3.0.0 removed deprecated Float(double_precision) parameter
@jira_ticket PYTHON-246
@expected_result Each floating point column type is able to hold their respective precision values.
@test_category data_types:primitive'

def test_can_insert_double_and_float(self):

    class FloatingPointModel(Model, ):
        id = columns.Integer(primary_key=True)
        f = columns.Float()
        d = columns.Double()
    sync_table(FloatingPointModel)
    FloatingPointModel.create(id=0, f=2.39)
    output = FloatingPointModel.objects.first()
    self.assertEqual(2.390000104904175, output.f)
    FloatingPointModel.create(id=0, f=3.4028234663852886e+38, d=2.39)
    output = FloatingPointModel.objects.first()
    self.assertEqual(3.4028234663852886e+38, output.f)
    self.assertEqual(2.39, output.d)
    FloatingPointModel.create(id=0, d=3.4028234663852886e+38)
    output = FloatingPointModel.objects.first()
    self.assertEqual(3.4028234663852886e+38, output.d)
