Hide transient command windows
This commit is contained in:
@@ -43,6 +43,8 @@ class DeployerTests(unittest.TestCase):
|
||||
self.assertEqual(output, ["npm ERR! ⚠ dependency failed", "安装失败"])
|
||||
self.assertNotIn("text", popen_options)
|
||||
self.assertEqual(popen_options["env"]["JAVA_HOME"], str(Path.cwd() / "fake-jdk"))
|
||||
expected_flags = getattr(subprocess, "CREATE_NO_WINDOW", 0) if os.name == "nt" else 0
|
||||
self.assertEqual(popen_options["creationflags"], expected_flags)
|
||||
self.assertEqual(
|
||||
Path(popen_options["env"]["PATH"].split(os.pathsep)[0]),
|
||||
npm.parent,
|
||||
|
||||
@@ -100,6 +100,8 @@ class EnvironmentTests(unittest.TestCase):
|
||||
self.assertTrue(results[0].installed)
|
||||
self.assertEqual(run.call_args.kwargs["env"]["JAVA_HOME"], str(java.parent.parent))
|
||||
self.assertTrue(run.call_args.kwargs["env"]["PATH"].startswith(str(java.parent)))
|
||||
expected_flags = getattr(subprocess, "CREATE_NO_WINDOW", 0) if environment_module.os.name == "nt" else 0
|
||||
self.assertEqual(run.call_args.kwargs["creationflags"], expected_flags)
|
||||
|
||||
def test_manual_maven_failure_is_not_hidden_by_path_failure(self):
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
|
||||
Reference in New Issue
Block a user