def test_init_badvalue(): with pytest.raises(ValueError): tabular.TabularData([{'foo': 'bar'}])
def test_td_badlen(): with pytest.raises(ValueError): tabular.TabularData(ex_data2_badlen)
def test_init_emptyvalue(): with pytest.raises(ValueError): tabular.TabularData([])
def test_init_badtype(): with pytest.raises(TypeError): tabular.TabularData('foo') with pytest.raises(TypeError): tabular.TabularData({'foo': 'bar'})
def tabdata2(): obj = tabular.TabularData(ex_data2) return obj
def test_init_badvalue(): with pytest.raises(ValueError): tabular.TabularData([{"foo": "bar"}])
def test_init_badtype(): with pytest.raises(TypeError): tabular.TabularData("foo") with pytest.raises(TypeError): tabular.TabularData({"foo": "bar"})