def test_split_with_2arg_func(): s = _parse_elements('(asing(x,y),e2)') assert len(s) == 2 assert s[0] == 'asing(x,y)' assert s[1] == 'e2'
def test_split_with_func(): s = _parse_elements('(sin(20), e1)') assert len(s) == 2 assert s[0] == 'sin(20)' assert s[1] == ' e1'
def test_simple_split(): s = _parse_elements('(hi,there)') assert len(s) == 2 assert s[0] == 'hi' assert s[1] == 'there'
def test_split_not_parans(): s = _parse_elements('hi, there') assert len(s) == 1
def test_no_splits(): s = _parse_elements('hi') assert len(s) == 1 assert s[0] == 'hi'