예제 #1
0
 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
예제 #2
0
 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