예제 #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)
예제 #2
0
    def test_rowCount(self, dataframe):
        model = ColumnDtypeModel()
        assert model.rowCount() == 0

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