示例#1
0
 def test_wrong_apidoc1(self):
     self.file.write(wrong_apidoc_data[1].encode('utf-8'))
     self.file.close()
     with self.assertRaises(ValueError):
         ret = parse_apidoc(self.file.name)
示例#2
0
 def setUp(self):
     self.file = tempfile.NamedTemporaryFile(delete=False)
     self.file.write(test_data.encode('utf-8'))
     self.file.close()
     self.ret = parse_apidoc(self.file.name)
     os.remove(self.file.name)
示例#3
0
 def test_read(self):
     self.file.write(test_data.encode('utf-8'))
     self.file.close()
     ret = parse_apidoc(self.file.name)
     self.assertEqual(len(ret), 3)