예제 #1
0
파일: summary.py 프로젝트: dbr/testosterone
    def _call(self):
        """Invoke a child process and return its output.

        We hand on our environment and any sys.path manipulations to the child,
        and we capture stderr as well as stdout so we can handle errors.

        """
        args = [ sys.executable
               , '-u' # unbuffered, so we can interact with it
               , sys.argv[0]
               , '--stopwords=%s' % ','.join(self.stopwords)
               , '--scripted'
               , self.module
                ]
        if self.find_only:
            args.insert(4, '--find-only')

        environ = os.environ.copy()
        environ['PYTHONPATH'] = ':'.join(sys.path)

        proc = Process(args=args, env=environ)

        raw = proc.communicate()
        if BANNER not in raw:
            raise RefreshError(raw)
        self.__raw = raw
예제 #2
0
    def _call(self):
        """Invoke a child process and return its output.

        We hand on our environment and any sys.path manipulations to the child,
        and we capture stderr as well as stdout so we can handle errors.

        """
        module, testcase = self.module.rsplit('.', 1)
        args = (
            sys.executable,
            '-u'  # unbuffered, so we can interact with it
            ,
            sys.argv[0],
            '--scripted',
            '--testcase=%s' % testcase,
            module)
        environ = os.environ.copy()
        environ['PYTHONPATH'] = ':'.join(sys.path)

        proc = Process(args=args, env=environ)

        raw = proc.communicate()
        if BANNER not in raw:
            raise RefreshError(raw)
        self.__raw = raw
예제 #3
0
    def _call(self):
        """Invoke a child process and return its output.

        We hand on our environment and any sys.path manipulations to the child,
        and we capture stderr as well as stdout so we can handle errors.

        """
        args = [
            sys.executable,
            '-u'  # unbuffered, so we can interact with it
            ,
            sys.argv[0],
            '--stopwords=%s' % ','.join(self.stopwords),
            '--scripted',
            self.module
        ]
        if self.find_only:
            args.insert(4, '--find-only')

        environ = os.environ.copy()
        environ['PYTHONPATH'] = ':'.join(sys.path)

        proc = Process(args=args, env=environ)

        raw = proc.communicate()
        if BANNER not in raw:
            raise RefreshError(raw)
        self.__raw = raw
예제 #4
0
파일: detail.py 프로젝트: dbr/testosterone
    def _call(self):
        """Invoke a child process and return its output.

        We hand on our environment and any sys.path manipulations to the child,
        and we capture stderr as well as stdout so we can handle errors.

        """
        module, testcase = self.module.rsplit('.', 1)
        args = ( sys.executable
               , '-u' # unbuffered, so we can interact with it
               , sys.argv[0]
               , '--scripted'
               , '--testcase=%s' % testcase
               , module
                )
        environ = os.environ.copy()
        environ['PYTHONPATH'] = ':'.join(sys.path)

        proc = Process(args=args, env=environ)

        raw = proc.communicate()
        if BANNER not in raw:
            raise RefreshError(raw)
        self.__raw = raw