Commit d8b7da37 authored by Andreas Fischer's avatar Andreas Fischer
Browse files

Added value to BinTreeNode

parent 6db1c292
......@@ -5,8 +5,12 @@ import unittest
from bintree import BinTree, BinTreeNode
class TestBinTreeNode(unittest.TestCase):
def test_creation(self):
node = BinTreeNode(5)
self.assertEqual(node.value, 5)
def test_has_left_and_right(self):
node = BinTreeNode()
node = BinTreeNode(0)
self.assertIn("left", node.__dict__)
self.assertIn("right", node.__dict__)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment