def METHOD_NAME(self):
    for i in range(128):
        c = chr(i)
        testString = "string containing %s" % c
        if i >= 32 or c in "\r\n\t":
            # \r, \n and \t are the only legal control chars in XML
            plistlib.writePlistToString(testString)
        else:
            self.assertRaises(ValueError,
                              plistlib.writePlistToString,
                              testString)