(self, cond, test, captured_output, error='')
@param cond: fail, error, ok
def report_cond(self, cond, test, captured_output, error=''):
        '''
        @param cond: fail, error, ok
        '''

        # test.address() is something as:
        # ('D:\\workspaces\\temp\\test_workspace\\pytesting1\\src\\mod1\\hello.py', 'mod1.hello', 'TestCase.testMet1')
        #
        # and we must pass: location, test
        #    E.g.: ['D:\\src\\mod1\\hello.py', 'TestCase.testMet1']
        try:
            if hasattr(test, 'address'):
                address = test.address()
                address = address[0], address[2]
            else:
                # multiprocess
                try:
                    address = test[0], test[1]
                except TypeError:
                    # It may be an error at setup, in which case it's not really a test, but a Context object.
                    f = test.context.__file__
                    if f.endswith('.pyc'):
                        f = f[:-1]
                    elif f.endswith('$py.class'):
                        f = f[:-len('$py.class')] + '.py'
                    address = f, '?'
        except:
            sys.stderr.write("PyDev: Internal pydev error getting test address. Please report at the pydev bug tracker\n")
            import traceback;traceback.print_exc()
            sys.stderr.write("\n\n\n")
            address = '?', '?'

        error_contents = self.get_io_from_error(error)
        try:
            time_str = '%.2f' % (time.time() - test._pydev_start_time)
        except:
            time_str = '?'

        pydev_runfiles_xml_rpc.notifyTest(cond, captured_output, error_contents, address[0], address[1], time_str)
def report_cond ( self , cond , test , captured_output , error = '' ) : # test.address() is something as: # ('D:\\workspaces\\temp\\test_workspace\\pytesting1\\src\\mod1\\hello.py', 'mod1.hello', 'TestCase.testMet1') # # and we must pass: location, test #    E.g.: ['D:\\src\\mod1\\hello.py', 'TestCase.testMet1'] try : if hasattr ( test , 'address' ) : address = test . address ( ) address = address [ 0 ] , address [ 2 ] else : # multiprocess try : address = test [ 0 ] , test [ 1 ] except TypeError : # It may be an error at setup, in which case it's not really a test, but a Context object. f = test . context . __file__ if f . endswith ( '.pyc' ) : f = f [ : - 1 ] elif f . endswith ( '$py.class' ) : f = f [ : - len ( '$py.class' ) ] + '.py' address = f , '?' except : sys . stderr . write ( "PyDev: Internal pydev error getting test address. Please report at the pydev bug tracker\n" ) import traceback traceback . print_exc ( ) sys . stderr . write ( "\n\n\n" ) address = '?' , '?' error_contents = self . get_io_from_error ( error ) try : time_str = '%.2f' % ( time . time ( ) - test . _pydev_start_time ) except : time_str = '?' pydev_runfiles_xml_rpc . notifyTest ( cond , captured_output , error_contents , address [ 0 ] , address [ 1 ] , time_str )