Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • david/lipn-search
1 result
Show changes
Commits on Source (10)
image: alpine
image: ubuntu
stages:
- test
......@@ -7,14 +7,20 @@ lipn-search:
stage: test
script:
- echo "Installation des paquets"
- apk update
- apk add python3
- apk add py-pip
- pip install pytest
- apt-get update
- apt-get install -y make cmake gcc g++
- apt-get install -y python3 python3-pip
- pip3 install numpy
- pip3 install pytest
- echo "Début de la phase de test"
- echo "Début des tests sur l'index inversé"
- cd index_inverse/test/
- pytest test_hamming.py
- cd ../../
- echo "Fin des tests sur l'index inversé"
- echo "Début des tests sur le pagerank"
- cd pagerank/test/
- echo "Faire des trucs"
- cd ../../
- echo "Début des tests sur le pagerank"
- echo "Fin de la phase de test"
\ No newline at end of file
......@@ -51,7 +51,8 @@ class IndexInverse :
self.invert_index.setdefault(word,[]).append(doc_id)
IndexInverse.vocaCount=len(self.vocabulary)
print(IndexInverse.vocaCount)
def get_index(self):
'''Obtenir le dictionnaire invert_index.
......
......@@ -11,6 +11,17 @@ dot -Tpdf graphe_3.dot -o graphe_3.pdf
#define NB_SOMMETS 7
void test_creation(){
//Test création
graphe g;
creer_graphe(&g, NB_SOMMETS);
assert(g.max > 0);
assert(g.premierVide == 0);
assert(g.ligne);
assert(g.col);
}
int main()
{
graphe g;
......@@ -22,13 +33,7 @@ int main()
char* fichier3 = "graphe_3.dot";
assert(fichier3);
//Test création
creer_graphe(&g, NB_SOMMETS);
assert(g.max > 0);
assert(g.premierVide == 0);
assert(g.ligne);
assert(g.col);
test_creation();
//Test insertion
graphe_ajouter_arete(&g, 0, 1);
......
......@@ -22,7 +22,7 @@ int main()
liste_add(&l, pasGoogle);
assert(!strcmp(l.urls[1], pasGoogle));
liste_add(&l, fichierNico);
assert(!strcmp(l.urls[2], fichierNico));
......