Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 18702

What does 'Got nothing' mean, after running a doctest?

$
0
0

I am making a method to find the largest value in a binary tree and I think I did it right but when i run my doctest on it, it says the expected value but then says 'Got nothing'. I'm not sure what that means or why it is happening.

def best_apartment(self) -> None:"""Return (one of) the apartment(s) with the best evaluation    score in the BSTTree.>>> apartments = read_apartment_data("apartments.csv")[0:300]>>> bst = BSTTree()>>> bst.build_tree(apartments)>>> bst.best_apartment()    PRIVATE: 80"""    if self.is_empty():        return None    current_node = self    while current_node.right is not None:        current_node = current_node.right    return current_node.apartment

this is the code I have for the method


Viewing all articles
Browse latest Browse all 18702

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>