How would I go about testing for a function that does not return anything?
For example, say I have this function:
def is_in(char):
my_list = []
my_list.append(char)
and then if I were to test it:
class TestIsIn(unittest.TestCase):
def test_one(self):
''' Test if one character was added to the list'''
self.assertEqual(self.is_in('a'), # And this is where I am lost)
I don't know what to assert the function is equal to, since there isn't any return value that I could compare it to.
Would assertIn work?