def test_num_discs(self): num_discs = 2 album = Album(num_discs=num_discs) self.assertEqual(album.num_discs, num_discs) with self.assertRaises(AttributeError): album.num_discs = None
def test_num_discs(self): num_discs = 2 album = Album(num_discs=num_discs) assert album.num_discs == num_discs with self.assertRaises(AttributeError): album.num_discs = None