def test_vl_spec_for_text_defaults():
    """Check that defaults are according to spec"""

    text = api.Text('foobar')
    assert text.name == 'foobar'
    assert text.type is None
    assert text.timeUnit is None
    assert text.bin is False
    assert text.sort == []
    assert text.aggregate is None
    assert text.scale is None
    assert text.align == 'right'
    assert text.baseline == 'middle'
    assert text.color == '#000000'
    assert text.margin == 4
    assert text.placeholder == 'Abc'
    assert text.font is None
    assert text.format is None

    text = api.Text('foobar:O')
    assert text.name == 'foobar'
    assert text.type == 'O'
    assert text.timeUnit is None
    assert text.bin is False
    assert text.sort == []
    assert text.aggregate is None
    assert text.scale is None
    assert text.align == 'right'
    assert text.baseline == 'middle'
    assert text.color == '#000000'
    assert text.margin == 4
    assert text.placeholder == 'Abc'
    assert text.font is None
    assert text.format is None

    text = api.Text('sum(foobar):O')
    assert text.name == 'foobar'
    assert text.type == 'O'
    assert text.timeUnit is None
    assert text.bin is False
    assert text.sort == []
    assert text.aggregate == 'sum'
    assert text.scale is None
    assert text.align == 'right'
    assert text.baseline == 'middle'
    assert text.color == '#000000'
    assert text.margin == 4
    assert text.placeholder == 'Abc'
    assert text.font is None
    assert text.format is None
dataset/ETHPy150Open ellisonbg/altair/altair/tests/test_api.py/test_vl_spec_for_text_defaults/original