Example #1
0
 def test_query_android_in_hash_table_that_contains_it(self):
     table = HashTable(11)
     table.insert("android")
     self.assertTrue(table.query("android"))
Example #2
0
 def test_query_e_g_to_hash_table(self):
     table = HashTable(5)
     table.insert("e")
     table.insert("g")
     self.assertTrue(table.query("e"))
     self.assertTrue(table.query("g"))
Example #3
0
 def test_insert_a_d_to_hash_table(self):
     table = HashTable(5)
     table.insert("a")
     table.insert("d")
     self.assertEquals(len(table.array[3].value_list), 2)
Example #4
0
 def test_query_android_in_empty_hash_table(self):
     table = HashTable(11)
     self.assertFalse(table.query("android"))
Example #5
0
 def test_append_hash_table(self):
     table = HashTable(3)
     self.assertEquals(table.maximum, 3)
     self.assertEquals(table.array, [None, None, None])
Example #6
0
 def test_insert_abc_to_hash_table(self):
     table = HashTable(5)
     table.insert("abc")
     self.assertEquals(len(table.array[0].value_list), 1)
 def test_query_e_g_to_hash_table(self):
     table = HashTable(5)
     table.insert("e")
     table.insert("g")
     self.assertTrue(table.query("e"))
     self.assertTrue(table.query("g"))
 def test_query_android_in_hash_table_that_contains_it(self):
     table = HashTable(11)
     table.insert("android")
     self.assertTrue(table.query("android"))
 def test_query_android_in_empty_hash_table(self):
     table = HashTable(11)
     self.assertFalse(table.query("android"))
 def test_insert_a_d_to_hash_table(self):
     table = HashTable(5)
     table.insert("a")
     table.insert("d")
     self.assertEquals(len(table.array[3].value_list), 2)
 def test_insert_abc_to_hash_table(self):
     table = HashTable(5)
     table.insert("abc")
     self.assertEquals(len(table.array[0].value_list), 1)