def test_id_readonly(self): rch = interpreters.RecvChannel(1) with self.assertRaises(AttributeError): rch.id = 2
def test_custom_id(self): rch = interpreters.RecvChannel(1) self.assertEqual(rch.id, 1) with self.assertRaises(TypeError): interpreters.RecvChannel('1')