def test_float_int_number():
    grammar = """
        Rule:
            a=NUMBER
            b=INT
            c=FLOAT
        ;
    """
    meta = metamodel_from_str(grammar)

    model = meta.model_from_str('3.4 5 .3')
    assert model.a == 3.4
    assert type(model.a) is float
    assert model.b == 5
    assert model.c == 0.3

    model = meta.model_from_str('3 5 2.0')
    assert model.a == 3

    # NUMBER type always convert to python float
    assert type(model.a) is float

    assert model.b == 5
    assert model.c == 2
    assert type(model.c) is float
Start the timer.
dataset/ETHPy150Open igordejanovic/textX/tests/functional/test_textx_language.py/test_float_int_number--crossover with--dataset/ETHPy150Open RobotLocomotion/director/src/python/director/timercallback.py/TimerCallback.start