def test_set_string_types(self):
        cf = self.fromstring("[sect]\n"
                             "option1=foo\n")
        # Check that we don't get an exception when setting values in
        # an existing section using strings:
        class mystr(str):
            pass
        cf.set("sect", "option1", "splat")
        cf.set("sect", "option1", mystr("splat"))
        cf.set("sect", "option2", "splat")
        cf.set("sect", "option2", mystr("splat"))
        try:
            unicode
        except __HOLE__:
            pass
        else:
            cf.set("sect", "option1", unicode("splat"))
            cf.set("sect", "option2", unicode("splat"))
dataset/ETHPy150Open babble/babble/include/jython/Lib/test/test_cfgparser.py/TestCaseBase.test_set_string_types