Skip to content

Commit

Permalink
Attempt module: make traits used in tests only conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
jherbel committed Sep 18, 2023
1 parent 57a1a00 commit f4414b7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions v2/rust/src/attempt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ use std::process::Command;

const PYTHON_EXECUTABLE: &str = "python";

#[derive(Clone, PartialEq, Debug)]
#[derive(Clone, PartialEq)]
#[cfg_attr(test, derive(Debug))]
enum RetryStrategy {
Incremental,
Complete,
Expand All @@ -15,7 +16,8 @@ struct Variant {
argument_file: Option<PathBuf>,
}

#[derive(Clone, PartialEq, Debug)]
#[derive(Clone)]
#[cfg_attr(test, derive(Debug, PartialEq))]
pub struct Identifier {
name: String,
timestamp: String,
Expand All @@ -38,7 +40,7 @@ impl RetrySpec {
}
}

#[derive(PartialEq, Debug)]
#[cfg_attr(test, derive(Debug, PartialEq))]
pub struct Attempt {
output_directory: PathBuf,
identifier: Identifier,
Expand Down

0 comments on commit f4414b7

Please sign in to comment.