Skip to content

Binary tree test with inorder and postorder #298

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

HarsheetKakar
Copy link
Contributor

References to other Issues or PRs or Relevant literature

Fixes #294

Brief description of what is fixed or changed

instead of replacing I added them inside the already created test

@codecov
Copy link

codecov bot commented Aug 20, 2020

Codecov Report

Merging #298 into master will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master      #298   +/-   ##
=========================================
  Coverage   98.789%   98.789%           
=========================================
  Files           23        23           
  Lines         2809      2809           
=========================================
  Hits          2775      2775           
  Misses          34        34           

Impacted file tree graph

@czgdp1807
Copy link
Member

instead of replacing I added them inside the already created test

Replacing will be better since both types of tests are checking the same thing.

@@ -19,10 +19,24 @@ def test_BinarySearchTree():
b.insert(7, 7)
b.insert(14, 14)
b.insert(13, 13)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

assert ['(None, 1, 1, None)', '(None, 4, 4, None)',
'(None, 7, 7, None)', '(5, 6, 6, 6)', '(3, 3, 3, 4)', '(None, 13, 13, None)',
'(8, 14, 14, None)','(None, 10, 10, 7)','(1, 8, 8, 2)'] == [str(x) for x in postorder]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@czgdp1807 czgdp1807 added the Please take over PRs that can be continued by anyone. label Sep 27, 2020
@czgdp1807
Copy link
Member

Closing in favour of #304

@czgdp1807 czgdp1807 closed this Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Please take over PRs that can be continued by anyone. testing trees
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace tests of binary tree with in-order and pre-order
2 participants