working on manual tests for the Python Ternary Search Tree
Hello peoples! This one will be about how I prepare to write a unittest/pytest. I know there's the whole 'test first' approach, but this works best for me so far. If it's not your thing, groovy. TODO: 1) make unittest (started: see below) 2) compare pytest (started: see below) So far it looks like there is no advantage, other than some extra typing practice, to doing Unittest over pytest Update: adding the started unittest and pytest The Ternary search tree for this exercise in the LMPTHW book may be protected by Zed's copyright, so I shall instead share some testing techniques I am working on. I want to do a unittest for this exercise, because well.... Most testing libraries are built on top of the already built in unittest that python has. Instead of fumbling to write out the tests for pytest / unittest; I first write out the different print calls I'd like to see; Then I'll write the unittest or pytest around what I would like to see ...