You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rust-shared_child/0001-Avoid-using-python-in-...

37 lines
1010 B

From 30d2f1dc44a0c08ef59f07e4a261c9027682ec7d Mon Sep 17 00:00:00 2001
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Date: Sun, 7 Jul 2019 16:36:34 +0200
Subject: [PATCH] Avoid using python in the tests
References: https://github.com/oconnor663/shared_child.rs/issues/16
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
---
src/lib.rs | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/lib.rs b/src/lib.rs
index 5e65ba3..5509b26 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -230,14 +230,12 @@ mod tests {
use std::sync::Arc;
pub fn true_cmd() -> Command {
- let mut cmd = Command::new("python");
- cmd.arg("-c").arg("");
- cmd
+ Command::new("true")
}
pub fn sleep_forever_cmd() -> Command {
- let mut cmd = Command::new("python");
- cmd.arg("-c").arg("import time; time.sleep(1000000000)");
+ let mut cmd = Command::new("sleep");
+ cmd.arg("infinity");
cmd
}
--
2.22.0