Ejemplo n.º 1
0
 def _instantiate_runner(self) -> AbstractRunner:
     if self._runner_type == RunnerType.PYTEST:
         runner = PyTestRunner(
             self._project_name,
             self._repo_path,
             self._time_limit,
             self._junit_xml_file,
             self._venv_path,
         )
     elif self._runner_type == RunnerType.SETUP_PY:
         runner = SetupPyRunner(self._project_name, self._repo_path,
                                self._time_limit)
     elif self._runner_type == RunnerType.NOSE:
         runner = NoseRunner(self._project_name, self._repo_path,
                             self._time_limit)
     elif self._runner_type == RunnerType.NOSE2:
         runner = Nose2Runner(self._project_name, self._repo_path,
                              self._time_limit)
     else:
         raise IllegalStateException("Could not find a matching runner!")
     return runner
Ejemplo n.º 2
0
 def test_run_no_setup_py(self):
     runner = SetupPyRunner("test", "test")
     result = runner.run()
     self.assertIsNone(result)
Ejemplo n.º 3
0
 def setUp(self):
     self._tmp_dir = tempfile.mkdtemp()
     url = "https://github.com/audreyr/standardjson"
     self._repo = Repo.clone_from(url, self._tmp_dir)
     self._runner = SetupPyRunner("standardjson", self._tmp_dir)