Skip to main content

no_env

Attribute Macro no_env 

Source
#[no_env]
Expand description

Ignore test case when the environment variable is set.

#[cfg(test)]
mod tests {

    // The test will be ignored in GITHUB_ACTION
    #[test_with::no_env(GITHUB_ACTIONS)]
    #[test]
    fn test_ignore_in_github_action() {
        assert!(false);
    }
}