@mock_streams('stdout')
def test_puts_with_prefix():
    """
    puts() should prefix output with env.host_string if non-empty
    """
    s = "my output"
    h = "localhost"
    with settings(host_string=h):
        puts(s)
    eq_(sys.stdout.getvalue(), (h, s + "\n") % "[%s] %s")
dataset/ETHPy150Open fabric/fabric/tests/test_utils.py/test_puts_with_prefix/swapped operands of `%`