I have some code like:
class HelloTest:
def foo(self, msg):
self.bar(msg.upper())
def bar(self, msg):
print(msg)
Using the unittest
standard library, we can use methods like assertEqual
, assertTrue
etc. to verify what is returned from a function.
Since foo
does not return a value explicitly, how can I test that it does the right thing?