def test_pickle_complex(self): #http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=21908 self.assertEqual(copyreg.pickle_complex(1), (complex, (1, 0))) #negative tests self.assertRaises(AttributeError, copyreg.pickle_complex, "myargu") obj2 = myCustom2() self.assertRaises(AttributeError, copyreg.pickle_complex, obj2)
def test_pickle_complex(): #http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=21908 if not (is_cli or is_silverlight): AreEqual(copyreg.pickle_complex(1), (complex, (1, 0))) #negative tests AssertError(AttributeError,copyreg.pickle_complex,"myargu") obj2 = myCustom2() AssertError(AttributeError,copyreg.pickle_complex,obj2)
def update_event(self, inp=-1): self.set_output_val(0, copyreg.pickle_complex(self.input(0)))