# test cases
def test_test():
    assert False
def test_test2():
    assert False

def test_test_test():
    assert True

def mu_test():
    assert aoeu

import sys
import logging

# test cases
def test_test():
    assert False
def test_test2():
    assert False

def test_test_test():
    assert True

def mu_test():
    print "BANG BANG"

    sys.stderr.write("MU\n")
    logging.debug('DANG')
    assert aoeu

Expand dummy to test std/err/logging capture