Exemple #1
0
 def test_obviously_wrong_encoding_trigger_exception(self):
     doc = LaTeXDocument("f00")
     self.assertRaises(ValueError, doc.set_encoding, "latin1:")
     self.assertRaises(ValueError, doc.set_encoding, "utf66")
     # the following passes (assertRaisesNot)
     doc.set_encoding("utf-8")
Exemple #2
0
 def test_obviously_wrong_encoding_trigger_exception(self):
     doc = LaTeXDocument('f00')
     self.assertRaises(ValueError, doc.set_encoding, 'latin1:')
     self.assertRaises(ValueError, doc.set_encoding, 'utf66')
     # the following passes (assertRaisesNot)
     doc.set_encoding('utf-8')