def test_wrong_format_input_raises(self):
     with self.assertRaises(ValueError):
         _ew.decode('=?badone?=')
     with self.assertRaises(ValueError):
         _ew.decode('=?')
     with self.assertRaises(ValueError):
         _ew.decode('')
 def test_wrong_format_input_raises(self):
     with self.assertRaises(ValueError):
         _ew.decode('=?badone?=')
     with self.assertRaises(ValueError):
         _ew.decode('=?')
     with self.assertRaises(ValueError):
         _ew.decode('')
 def _test(self, source, ex_result, ex_defects=[]):
     result, defects = _ew.decode(source)
     self.assertEqual(result, ex_result)
     self.assertDefectsEqual(defects, ex_defects)
 def _test(self, source, ex_result, ex_defects=[]):
     result, defects = _ew.decode(source)
     self.assertEqual(result, ex_result)
     self.assertDefectsEqual(defects, ex_defects)