def test_to_from_dict(self): h = UnconvergedErrorHandler("random_name.xml") h2 = UnconvergedErrorHandler.from_dict(h.as_dict()) self.assertEqual(type(h2), UnconvergedErrorHandler) self.assertEqual(h2.output_filename, "random_name.xml")