Пример #1
0
            PYDEV_NOSE_PLUGIN_SINGLETON = pydev_runfiles_nose.StartPydevNosePluginSingleton(
                configuration)
            argv.append('--with-pydevplugin')
            nose.run(argv=argv, addplugins=[PYDEV_NOSE_PLUGIN_SINGLETON])

        elif test_framework == PY_TEST_FRAMEWORK:
            if DEBUG:
                sys.stdout.write('Final test framework args: %s\n' % (argv, ))

            from pydev_runfiles_pytest import PydevPlugin
            pydev_plugin = PydevPlugin(py_test_accept_filter)

            pytest.main(argv, plugins=[pydev_plugin])

        else:
            raise AssertionError(
                'Cannot handle test framework: %s at this point.' %
                (test_framework, ))


if __name__ == '__main__':
    try:
        main()
    finally:
        try:
            #The server is not a daemon thread, so, we have to ask for it to be killed!
            import pydev_runfiles_xml_rpc
            pydev_runfiles_xml_rpc.forceServerKill()
        except:
            pass  #Ignore any errors here
Пример #2
0
            argv.append('-p')
            argv.append('pydev_runfiles_pytest2')
            pytest.main(argv)

        else:
            raise AssertionError('Cannot handle test framework: %s at this point.' % (test_framework,))


if __name__ == '__main__':
    try:
        main()
    finally:
        try:
            #The server is not a daemon thread, so, we have to ask for it to be killed!
            import pydev_runfiles_xml_rpc
            pydev_runfiles_xml_rpc.forceServerKill()
        except:
            pass #Ignore any errors here

    import sys
    import threading
    if hasattr(sys, '_current_frames') and hasattr(threading, 'enumerate'):
        import time
        import traceback

        class DumpThreads(threading.Thread):
            def run(self):
                time.sleep(10)

                thread_id_to_name = {}
                try: