import pytest

import matchzoo as mz


@pytest.fixture
def term_index():
    return {'G': 1, 'C': 2, 'D': 3, 'A': 4, '[PAD]': 0}


def test_embedding(term_index):
    embed = mz.embedding.load_from_file(mz.datasets.embeddings.EMBED_RANK)
    matrix = embed.build_matrix(term_index)
    assert matrix.shape == (len(term_index) + 1, 50)

@@ -328,8 +328,231 @@
  1, 50)%0A
+    embed = mz.embedding.load_from_file(mz.datasets.embeddings.EMBED_10_GLOVE, mode='glove')%0A    matrix = embed.build_matrix(term_index)%0A    assert matrix.shape == (len(term_index) + 1, 10)%0A    assert embed.input_dim == 5%0A%0A

test embedding coverage 100%