def test_smile(): from awesome import smile assert smile() == ':)'
def test_add(self): self.assertEqual(awesome.smile(), ":)") self.assertEqual(awesome.frown(), ":(") self.assertEqual(awesome.some_other_func(), ":/") self.assertEqual(awesome.yet_other_func(), ":/")
def test_add(self): # call to function changing some "global" data structure # assert function is checking that the change you expected happens properly. self.assertEqual(awesome.smile(), ":)")
def test_transformation(self): # call to function changing some "global" data structure # assert function is checking that the change you expected happens properly. result = transformFoo() self.assertEqual("foo", result) self.assertEqual(awesome.smile(), ":)")
def test_add(): assert awesome.smile() == ":)"
def test_add(self): self.assertEqual(awesome.smile(), ":)")