bpo-33204: IDLE - revise and extend colorizer test. (GH-6347) · python/cpython@fa91aff (original) (raw)
`@@ -262,9 +262,12 @@ def _color_delegator(parent): # htest #
`
262
262
`top.title("Test ColorDelegator")
`
263
263
`x, y = map(int, parent.geometry().split('+')[1:])
`
264
264
`top.geometry("700x250+%d+%d" % (x + 20, y + 175))
`
265
``
`-
source = ("# Following has syntax errors\n"
`
266
``
`-
"if True: then int 1\nelif False: print 0\nelse: float(None)\n"
`
267
``
`-
"if iF + If + IF: 'keywork matching must respect case'\n"
`
``
265
`+
source = (
`
``
266
`+
"if True: int ('1') # keyword, builtin, string, comment\n"
`
``
267
`+
"elif False: print(0)\n"
`
``
268
`+
"else: float(None)\n"
`
``
269
`+
"if iF + If + IF: 'keyword matching must respect case'\n"
`
``
270
`+
"if'': x or'' # valid string-keyword no-space combinations\n"
`
268
271
`"# All valid prefixes for unicode and byte strings should be colored.\n"
`
269
272
`"'x', '''x''', "x", """x"""\n"
`
270
273
`"r'x', u'x', R'x', U'x', f'x', F'x'\n"
`