Exemplo n.º 1
0
    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)
Exemplo n.º 2
0
    def test_rowCount(self, dataframe):
        model = ColumnDtypeModel()
        assert model.rowCount() == 0

        model.setDataFrame(dataframe)
        assert model.rowCount(5)