From e7bf10727318be0209e058628288e3d3b48f5a8b Mon Sep 17 00:00:00 2001 From: Igor Gnatenko 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 --- src/lib.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 5e65ba3..aa050e2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -39,8 +39,8 @@ //! //! // Spawn a child that will just sleep for a long time, //! // and put it in an Arc to share between threads. -//! let mut command = Command::new("python"); -//! command.arg("-c").arg("import time; time.sleep(1000000000)"); +//! let mut command = Command::new("sleep"); +//! command.arg("infinity"); //! let shared_child = SharedChild::spawn(&mut command).unwrap(); //! let child_arc = Arc::new(shared_child); //! @@ -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