Skip to content

Commit

Permalink
Fixed the problem of duplicate names for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nbro committed Feb 16, 2017
1 parent f640273 commit b8c5d9b
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions tests/ds/test_BST.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@ def test_insert_one_key_None(self):
t = BST()
self.assertRaises(ValueError, t.insert, None)

def test_insert_one_key_None(self):
t = BST()
self.assertRaises(ValueError, t.insert, None)

def test_insert_one_bst_node_not_reset(self):
t = BST()
n = BSTNode(2)
Expand Down Expand Up @@ -167,10 +163,6 @@ def test_search_key_None(self):
t = BST()
self.assertRaises(ValueError, t.search, None)

def test_search_key_None(self):
t = BST()
self.assertRaises(ValueError, t.search, None)

def test_search_starting_node_not_bst_node(self):
t = BST()
self.assertRaises(TypeError, t.search, 3, "not a BSTNode")
Expand Down Expand Up @@ -240,7 +232,7 @@ def test_contains_true(self):
t.insert_many(12, 5)
self.assertTrue(t.contains_key(12))

def test_contains_true(self):
def test_contains_false(self):
t = BST()
t.insert(12)
self.assertFalse(t.contains_key(14))
Expand All @@ -249,14 +241,6 @@ def test_rank_key_None(self):
t = BST()
self.assertRaises(ValueError, t.rank, None)

def test_rank_key_None(self):
t = BST()
self.assertRaises(ValueError, t.rank, None)

def test_rank_key_not_found(self):
t = BST()
self.assertRaises(LookupError, t.rank, 19)

def test_rank_key_not_found(self):
t = BST()
self.assertRaises(LookupError, t.rank, 19)
Expand Down Expand Up @@ -540,7 +524,7 @@ def test_delete_no_children(self):
self.assertIsNone(deleted.parent)
self.assertEqual(t.size(), 4)

def test_delete_no_children(self):
def test_delete_one_child(self):
t = BST()

eight = BSTNode(8)
Expand Down

0 comments on commit b8c5d9b

Please sign in to comment.