예제 #1
0
def test_init_badvalue():
    with pytest.raises(ValueError):
        tabular.TabularData([{'foo': 'bar'}])
예제 #2
0
def test_td_badlen():
    with pytest.raises(ValueError):
        tabular.TabularData(ex_data2_badlen)
예제 #3
0
def test_init_emptyvalue():
    with pytest.raises(ValueError):
        tabular.TabularData([])
예제 #4
0
def test_init_badtype():
    with pytest.raises(TypeError):
        tabular.TabularData('foo')
    with pytest.raises(TypeError):
        tabular.TabularData({'foo': 'bar'})
예제 #5
0
def tabdata2():
    obj = tabular.TabularData(ex_data2)
    return obj
예제 #6
0
def test_init_badvalue():
    with pytest.raises(ValueError):
        tabular.TabularData([{"foo": "bar"}])
예제 #7
0
def test_init_badtype():
    with pytest.raises(TypeError):
        tabular.TabularData("foo")
    with pytest.raises(TypeError):
        tabular.TabularData({"foo": "bar"})