@@ -0,0 +1,1501 @@
+import pytest%0Aimport numpy%0Afrom numpy.testing import assert_allclose%0A%0Afrom ...neural._classes.model import Model%0Afrom ...neural.vecs2vec import MeanPooling, MaxPooling%0Afrom ...neural.vecs2vec import MinPooling%0A%0A%0A@pytest.fixture(params=%5BMeanPooling, MaxPooling, MinPooling%5D)%0Adef PoolClass(request):%0A    return request.param%0A%0A%0A@pytest.fixture%0Adef X(nB, nI):%0A    return %5Bnumpy.zeros((nB, nI))+i for i in range(5)%5D%0A%0A%0A@pytest.fixture%0Adef dY(X, nI):%0A    return numpy.ones((len(X), nI))%0A%0A%0A@pytest.fixture%0Adef model(PoolClass):%0A    return PoolClass()%0A%0A%0Adef test_pools_are_created_successfully(model):%0A    assert hasattr(model, 'predict')%0A    assert hasattr(model, 'begin_update')%0A    assert isinstance(model, Model)%0A%0A%0Adef test_pools_predict_shapes(model, X, nB, nI):%0A    y = model.predict(X)%0A    assert y.shape == (len(X), nI)%0A%0A%0Adef test_pools_begin_update_shapes(model, X, nB, nI):%0A    y, _ = model.begin_update(X)%0A    assert y.shape == (len(X), nI)%0A%0A%0Adef test_pools_finish_update_shapes(model, X, dY, nB, nI):%0A    y, finish_update = model.begin_update(X)%0A    gradient = finish_update(dY)%0A    assert len(gradient) == len(X)%0A    assert all(%5Bg.shape == x.shape for g, x in zip(gradient, X)%5D)%0A%0A%0Adef test_pools_predict_matches_finish_update(model, X):%0A    y = model.predict(X)%0A    y2, _ = model.begin_update(X)%0A    assert_allclose(y, y2)%0A%0A%0Adef test_zero_length_input_succeeds(model):%0A    zero = numpy.ones((0, 10))%0A    ones = numpy.ones((5, 10))%0A    y = model.predict(%5Bzero, ones%5D)%0A    assert y.shape == (2, 10)%0A

Add simple unit tests for max, min and mean pooling