Beispiel #1
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
Beispiel #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
Beispiel #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
Beispiel #4
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