コード例 #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
ファイル: detail.py プロジェクト: chadwhitacre/public
    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