Python con ... en cuanto al administrador de contexto personalizado

Escribí un administrador de contexto simple en Python para manejar pruebas unitarias (y para tratar de aprender administradores de contexto):

class TestContext(object):
    test_count=1
    def __init__(self):
        self.test_number = TestContext.test_count
        TestContext.test_count += 1

    def __enter__(self):
        pass

    def __exit__(self, exc_type, exc_value, exc_traceback):
        if exc_value == None:
            print 'Test %d passed' %self.test_number
        else:
            print 'Test %d failed: %s' %(self.test_number, exc_value)
        return True

Si escribo una prueba de la siguiente manera, todo funciona bien.

test = TestContext()
with test:
   print 'running test %d....' %test.test_number
   raise Exception('this test failed')

Sin embargo, si intento usar con ... como, no obtengo una referencia al objeto TestContext (). Ejecutando esto:

with TestContext() as t:
    print t.test_number

Plantea la excepción'NoneType' object has no attribute 'test_number'.

¿A dónde voy mal?