def test_vl_spec_for_size__defaults():
    size = api.Size('foobar')
    assert size.name == 'foobar'
    assert size.type is None
    assert size.aggregate is None
    assert size.timeUnit is None
    assert size.bin == False
    assert size.scale is None
    assert size.legend == True
    assert size.value == 30
    assert size.sort == []

    size = api.Size('foobar:O')
    assert size.name == 'foobar'
    assert size.type == 'O'
    assert size.aggregate is None
    assert size.timeUnit is None
    assert size.bin == False
    assert size.scale is None
    assert size.legend == True
    assert size.value == 30
    assert size.sort == []

    size = api.Size('sum(foobar):Q')
    assert size.name == 'foobar'
    assert size.type == 'Q'
    assert size.aggregate == 'sum'
    assert size.timeUnit is None
    assert size.bin == False
    assert size.scale is None
    assert size.legend == True
    assert size.value == 30
    assert size.sort == []
Check that defaults are according to spec
dataset/ETHPy150Open ellisonbg/altair/altair/tests/test_api.py/test_vl_spec_for_size__defaults