Skip to content

Commit

Permalink
skip serializing pip check
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv committed Jan 4, 2024
1 parent b633093 commit 310ca70
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/recipe/parser/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,20 @@ impl CommandsTestFiles {
}
}

fn default_pip_check() -> bool {
true
}

fn is_true(value: &bool) -> bool {
*value
}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct PythonTest {
/// List of imports to test
pub imports: Vec<String>,
/// Wether to run `pip check` or not
/// Wether to run `pip check` or not (default to true)
#[serde(default = "default_pip_check", skip_serializing_if = "is_true")]
pub pip_check: bool,
}

Expand Down

0 comments on commit 310ca70

Please sign in to comment.