Example #1
0
	def testMissingSection(self):
		i = icon_theme._ini_parser(StringIO("Hello"))
		try:
			i.next()
			assert 0
		except Exception:
			pass
Example #2
0
	def testParser(self):
		i = icon_theme._ini_parser(test_index)
		self.assertEquals(("Section", "a", "1"), i.next())
		self.assertEquals(("Section", "b", "2"), i.next())
		self.assertEquals(("Section", "c", "3"), i.next())
		self.assertEquals(("Another", "a", "Hello"), i.next())
		self.assertEquals(("Another", "b", "2"), i.next())
		for x in i: assert 0
Example #3
0
	def testLeadingComment(self):
		i = icon_theme._ini_parser(StringIO("#Hello"))
		for x in i: assert 0