1 #!/usr/bin/env python2.3
4 from os
.path
import dirname
, abspath
, join
5 rox_lib
= dirname(dirname(dirname(abspath(sys
.argv
[0]))))
6 sys
.path
.insert(0, join(rox_lib
, 'python'))
8 from rox
import icon_theme
9 from StringIO
import StringIO
11 test_index
= StringIO("""[Section]
24 class TestIconTheme(unittest
.TestCase
):
26 i
= icon_theme
._ini
_parser
(test_index
)
27 self
.assertEquals(("Section", "a", "1"), i
.next())
28 self
.assertEquals(("Section", "b", "2"), i
.next())
29 self
.assertEquals(("Section", "c", "3"), i
.next())
30 self
.assertEquals(("Another", "a", "Hello"), i
.next())
31 self
.assertEquals(("Another", "b", "2"), i
.next())
34 def testLeadingComment(self
):
35 i
= icon_theme
._ini
_parser
(StringIO("#Hello"))
38 def testMissingSection(self
):
39 i
= icon_theme
._ini
_parser
(StringIO("Hello"))
46 suite
= unittest
.makeSuite(TestIconTheme
)
47 if __name__
== '__main__':