From 87d81451ab61e3eb7ee6d0807fb52b81e255319e Mon Sep 17 00:00:00 2001 From: Kalyan Dutia Date: Thu, 18 Jul 2024 23:15:02 +0100 Subject: [PATCH] make sliding window test more robust --- src/test/test_ml.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/test_ml.py b/src/test/test_ml.py index ace8618..cf402a2 100644 --- a/src/test/test_ml.py +++ b/src/test/test_ml.py @@ -34,3 +34,7 @@ def test_encoder_sliding_window(): assert isinstance(embeddings, np.ndarray) assert embeddings.shape[0] == len(batch_to_encode) assert embeddings.shape[1] == encoder.dimension + + assert np.array_equal(embeddings[0, :], embeddings[2, :]) + assert np.array_equal(embeddings[0, :], embeddings[3, :]) + assert not np.array_equal(embeddings[0, :], embeddings[1, :])