def test_setDataFrame(self, dataframe): model = ColumnDtypeModel() model.setDataFrame(dataframe) assert model.rowCount(5) with pytest.raises(TypeError) as err: model.setDataFrame(['some', 'neat', 'list', 'entries']) assert 'not of type pandas.core.frame.DataFrame' in str(err.value)
def test_rowCount(self, dataframe): model = ColumnDtypeModel() assert model.rowCount() == 0 model.setDataFrame(dataframe) assert model.rowCount(5)