Example #1
0
	def test_caesar_reads_metadata(self):
		#print("")
		tds = TEIDataSource(caesar_gallic)
		tds.read_doc_metadata()
		self.assertNotEqual(tds.source_desc, None)
		##print(tds.source_desc)
		i = 0
		for s in tds.sections:
			i += 1
			# #print(str(i) + "=" + s)
		self.assertEqual(i, 3)
		self.assertEqual(tds.delim, ".")
Example #2
0
	def test_sallust_reads_metadata(self):
		#print("")
		tds = TEIDataSource(sallust_cataline)
		tds.read_doc_metadata()
		self.assertNotEqual(tds.source_desc, None)
		# #print(tds.source_desc)
		i = 0
		for s in tds.sections:
			i += 1
			# #print(str(i) + "=" + s)
		self.assertEqual(i, 1)
		self.assertIsNotNone(tds.delim)
		self.assertEquals(',', tds.delim) #default
Example #3
0
	def test_cicero_derepublica_metadata(self):
		#print(cicero_derepublica)
		tds = TEIDataSource(cicero_derepublica)
		tds.read_doc_metadata()
		self.assertIsNotNone(tds.source_desc)
		##print(tds.source_desc)
		i = 0
		for s in tds.sections:
			i += 1
			##print(str(i) + "=" + s)
		self.assertEqual(i, 2)
		self.assertIsNotNone(tds.delim)
		self.assertEquals(',', tds.delim)