Ejemplo n.º 1
0
 def test_listed_non_uniques_will_be_treat_as_so(self):
     ''' Test to ensure that word from non_unique list will be 
     treat as non unique
     '''
     results, non_unique = parse.find_unique('test,a1ph@;. d0n6! \n', [],
                                             ["test"])
     self.assertEqual(results, ["a1ph@", "d0n6"], "Wrong findings!")
     self.assertEqual(non_unique, ["test"], "Wrong non-unique value!")
Ejemplo n.º 2
0
 def test_reoccured_unique_word_treat_as_non_unique(self):
     ''' Test to ensure that word from unique list on re-appearance 
     will be treat as non unique
     '''
     results, non_unique = parse.find_unique('test,a1ph@;. d0n6! \n',
                                             ["test"], [])
     self.assertEqual(results, ["a1ph@", "d0n6"], "Wrong findings!")
     self.assertEqual(non_unique, ["test"], "Wrong non-unique value!")
Ejemplo n.º 3
0
 def test_three_occurance_of_non_unique(self):
     ''' Test to ensure that not unoque word will be found in case
     of three appearances
     '''
     results, non_unique = parse.find_unique('test,a1ph@;. d0n6! test.test',
                                             [], [])
     self.assertEqual(results, ["a1ph@", "d0n6"],
                      "Wrong findings on triple occurance!")
     self.assertEqual(non_unique, ["test"], "Wrong non-unique value!")
Ejemplo n.º 4
0
 def test_find_uniques(self):
     '''Test to ensure that few unique words will be found '''
     results, non_unique = parse.find_unique("test,a1ph@;. d0n6", [], [])
     self.assertEqual(results, ["test", "a1ph@", "d0n6"], "Wrong findings!")
     self.assertEqual(non_unique, [], "Wrong non-unique value!")