def test_validate(self):
    f = TestForm2()
    result = f.validate({'float_field': 10.7})
    self.assertEqual(result, True)
    self.assertEqual(f['float_field'], 10.7)

    f = TestForm2()
    result = f.validate({'float_field': 'ten'})
    self.assertEqual(result, False)

    f = TestForm2()
    result = f.validate({'number_field': 10.7})
    self.assertEqual(result, True)
    self.assertEqual(f['number_field'], 10.7)

    f = TestForm2()
    result = f.validate({'number_field': 'ten'})
    self.assertEqual(result, False)

    f = TestForm2()
    result = f.validate({'int_field': 10})
    self.assertEqual(result, True)
    self.assertEqual(f['int_field'], 10)

    f = TestForm2()
    result = f.validate({'int_field': 'ten'})
    self.assertEqual(result, False)
Match a ShinyTag from the ShinyAreaFormat.
dataset/ETHPy150Open IanLewis/kay/kay/tests/formtest.py/NumberFieldTest.test_validate--crossover with--dataset/ETHPy150Open shinymud/ShinyMUD/src/shinymud/lib/sport_plugins/formatters/area_read_shiny_format.py/_match_shiny_tag