print "Test fonctions substitueVariables" print "\t",substitueVariables(['?x', 'est un', 'doctorant'] , {}) print "\t", ['?x', 'est un', 'doctorant'] print "\t",substitueVariables(['?x', 'est un', 'doctorant'] , {'?y':'michael'}) print "\t", ['?x', 'est un', 'doctorant'] print "\t",substitueVariables(['?x', 'est un', 'doctorant'] , {'?x':'vincent','?y':'michael','?z':'paolo'}) print "\t", ['vincent', 'est un', 'doctorant'] print "\t",substitueVariables(['?w', 'est un', 'doctorant'] , {'?x':'vincent','?y':'michael','?z':'paolo'}) print "\t", ['?w', 'est un', 'doctorant'] print "\t",substitueVariables(['?x', 'et', '?z', 'sont', 'doctorants'] , {'?x':'vincent','?y':'michael','?z':'paolo'}) print "\t", ['vincent', 'et', 'paolo', 'sont', 'doctorants'] print "\t",substitueVariables(['?x', 'est un', ['?x']] , {'?x':'vincent','?y':'michael','?z':'paolo'}) print "\t", ['vincent', 'est un', ['vincent']] print "\t",substitueVariables(['?x', 'est un', ['?a']] , {'?x':'vincent','?y':'michael','?z':'paolo'}) print "\t", ['vincent', 'est un', ['?a']] print "\t",substitueVariables('?x', {'?x':'vincent','?y':'michael','?z':'paolo'}) print "\t", 'vincent' print "\t",substitueVariables('doctorant', {'?x':'vincent','?y':'michael','?z':'paolo'}) print "\t", 'doctorant'