def test_detect_runner_type_setup_py(self): with open(os.path.join(self._setup_py_dir, "setup.py"), "w") as f: f.write(" test_suite=foobar") runner = Runner("test", self._setup_py_dir, RunnerType.SETUP_PY) runner_type = runner._detect_runner_type() self.assertEqual(runner_type, RunnerType.SETUP_PY)
def test_detect_runner_type_pytest(self): with open(os.path.join(self._pytest_dir, "foo.txt"), "w") as f: f.write("foo pytest bar") runner = Runner("test", self._pytest_dir, RunnerType.AUTO_DETECT) runner_type = runner._detect_runner_type() self.assertEqual(runner_type, RunnerType.PYTEST)