コード例 #1
0
ファイル: test_utils.py プロジェクト: gordonwatts/hep_tables
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'
コード例 #2
0
ファイル: test_utils.py プロジェクト: gordonwatts/hep_tables
def test_split_with_func():
    s = _parse_elements('(sin(20), e1)')
    assert len(s) == 2
    assert s[0] == 'sin(20)'
    assert s[1] == ' e1'
コード例 #3
0
ファイル: test_utils.py プロジェクト: gordonwatts/hep_tables
def test_simple_split():
    s = _parse_elements('(hi,there)')
    assert len(s) == 2
    assert s[0] == 'hi'
    assert s[1] == 'there'
コード例 #4
0
ファイル: test_utils.py プロジェクト: gordonwatts/hep_tables
def test_split_not_parans():
    s = _parse_elements('hi, there')
    assert len(s) == 1
コード例 #5
0
ファイル: test_utils.py プロジェクト: gordonwatts/hep_tables
def test_no_splits():
    s = _parse_elements('hi')
    assert len(s) == 1
    assert s[0] == 'hi'