Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def testEnableDisable(self):
with disableColoring(), captureStandardStreams() as (out, err):
assert ic(a) == 1
assert ic.enabled
ic.disable()
assert not ic.enabled
assert ic(b) == 2
ic.enable()
assert ic.enabled
assert ic(c) == 3
pairs = parseOutputIntoPairs(out, err, 2)
assert pairs == [[('a', '1')], [('c', '3')]]