Exemplo n.º 1
0
 def run(self, result):
     with tempfile.NamedTemporaryFile() as test_list_file:
         for test_id in self._test_ids:
             test_list_file.write(test_id + '\n')
         test_list_file.flush()
         argv = self._args + ['--subunit', '--load-list', test_list_file.name]
         process = subprocess.Popen(argv, stdin=subprocess.PIPE,
             stdout=subprocess.PIPE, bufsize=1)
         try:
             # If it tries to read, give it EOF.
             process.stdin.close()
             ProtocolTestCase.__init__(self, process.stdout)
             ProtocolTestCase.run(self, result)
         finally:
             process.wait()
Exemplo n.º 2
0
 def run(self, result):
     with tempfile.NamedTemporaryFile() as test_list_file:
         for test_id in self._test_ids:
             test_list_file.write(test_id + '\n')
         test_list_file.flush()
         argv = self._args + [
             '--subunit', '--load-list', test_list_file.name
         ]
         process = subprocess.Popen(argv,
                                    stdin=subprocess.PIPE,
                                    stdout=subprocess.PIPE,
                                    bufsize=1)
         try:
             # If it tries to read, give it EOF.
             process.stdin.close()
             ProtocolTestCase.__init__(self, process.stdout)
             ProtocolTestCase.run(self, result)
         finally:
             process.wait()