def doctest_for_module(module):

    class C(unittest.TestCase):
        def test_dummy(self): pass # Make the test case loader find us
        def run(self, result=None):
            # doctest doesn't like nose.result.TextTestResult objects,
            # so we try to determine if thats what we're dealing
            # with and use its internal result attribute instead
            if hasattr(result, 'result'):
                doctest.DocTestSuite(module).run(result.result)
            else:
                doctest.DocTestSuite(module).run(result)
    return C
Start the measurement
dataset/ETHPy150Open enthought/traits/traits/testing/doctest_tools.py/doctest_for_module--crossover with--dataset/ETHPy150Open mne-tools/mne-python/mne/realtime/client.py/RtClient.start_measurement