Example #1
0
 def teste_por_uma_delecao_no_comeco(self):
     texto1 = 'aperte o play'
     texto2 = 'o play'
     self.assertEqual(1, plagio.distancia(texto1, texto2))
Example #2
0
 def teste_por_uma_troca_delecao(self):
     texto1 = 'aperte o play?'
     texto2 = 'aperte a'
     self.assertEqual(2, plagio.distancia(texto1, texto2))
Example #3
0
 def teste_por_uma_troca(self):
     texto1 = 'aperte a play'
     texto2 = 'aperte o play?'
     self.assertEqual(1, plagio.distancia(texto1, texto2))
Example #4
0
 def teste_uma_palavra(self):
     texto1 = 'aperte o play?'
     texto2 = 'aperte o'
     self.assertEqual(1, plagio.distancia(texto1, texto2))
Example #5
0
 def teste_uma_palavra_com_o_segundo_texto_maior(self):
     texto1 = 'aperte o'
     texto2 = 'aperte o play?'
     self.assertEqual(1, plagio.distancia(texto1, texto2))
Example #6
0
 def teste_textos_iguais(self):
     texto1 = u'olá, tudo bem?'
     texto2 = texto1
     self.assertEqual(0, plagio.distancia(texto1, texto2))
Example #7
0
 def teste_textos_iguais_exceto_pela_pontuacao(self):
     texto1 = u'olá, tudo bem?'
     texto2 = u'olá tudo bem'
     self.assertEqual(0, plagio.distancia(texto1, texto2))
 def teste_por_uma_troca(self):
     texto1 = 'aperte a play'
     texto2 = 'aperte o play?'
     self.assertEqual(1, plagio.distancia(texto1, texto2)) 
 def teste_por_uma_delecao_no_comeco(self):
     texto1 = 'aperte o play'
     texto2 = 'o play'
     self.assertEqual(1, plagio.distancia(texto1, texto2)) 
Example #10
0
 def teste_por_uma_troca_delecao(self):
     texto1 = 'aperte o play?'
     texto2 = 'aperte a'
     self.assertEqual(2, plagio.distancia(texto1, texto2)) 
Example #11
0
 def teste_uma_palavra_com_o_segundo_texto_maior(self):
     texto1 = 'aperte o'
     texto2 = 'aperte o play?'
     self.assertEqual(1, plagio.distancia(texto1, texto2)) 
Example #12
0
 def teste_uma_palavra(self):
     texto1 = 'aperte o play?'
     texto2 = 'aperte o'
     self.assertEqual(1, plagio.distancia(texto1, texto2)) 
Example #13
0
 def teste_textos_iguais_exceto_pela_pontuacao(self):
     texto1 = u'olá, tudo bem?'
     texto2 = u'olá tudo bem'
     self.assertEqual(0, plagio.distancia(texto1, texto2)) 
Example #14
0
 def teste_textos_iguais(self):
     texto1 = u'olá, tudo bem?'
     texto2 = texto1
     self.assertEqual(0, plagio.distancia(texto1, texto2))