Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def testMultipleArgumentsLongLineWrapped(self):
# A single long line with multiple variables is line wrapped.
val = '*' * int(ic.lineWrapWidth / 4)
valStr = ic.argToStringFunction(val)
v1 = v2 = v3 = v4 = val
with disableColoring(), captureStandardStreams() as (out, err):
ic(v1, v2, v3, v4)
pairs = parseOutputIntoPairs(out, err, 4)
assert pairs == [[(k, valStr)] for k in ['v1', 'v2', 'v3', 'v4']]
lines = err.getvalue().splitlines()
assert (
lines[0].startswith(ic.prefix) and
lines[1].startswith(' ' * len(ic.prefix)) and
lines[2].startswith(' ' * len(ic.prefix)) and
lines[3].startswith(' ' * len(ic.prefix)))