#273: Remove nose dependency for graphs_trees/ (#277)

This commit is contained in:
Donne Martin
2020-07-10 21:02:32 -04:00
committed by GitHub
parent 139e157250
commit abf7524c26
67 changed files with 860 additions and 1027 deletions

View File

@@ -1,9 +1,10 @@
from nose.tools import assert_equal
import unittest
class TestBfs(object):
class TestBfs(unittest.TestCase):
def __init__(self):
def __init__(self, *args, **kwargs):
super(TestBfs, self).__init__()
self.results = Results()
def test_bfs(self):
@@ -13,7 +14,7 @@ class TestBfs(object):
bst.insert(1)
bst.insert(3)
bst.bfs(self.results.add_result)
assert_equal(str(self.results), '[5, 2, 8, 1, 3]')
self.assertEqual(str(self.results), '[5, 2, 8, 1, 3]')
print('Success: test_bfs')
@@ -24,4 +25,4 @@ def main():
if __name__ == '__main__':
main()
main()