Skip to content

suggestion: generate alternate noop test with SKIPPED appended to test name #1

@waynr

Description

@waynr

I encountered this crate while looking for an existing attribute macro that would do pretty much exactly what this does.

My preference would be to make it possible to see which test is skipped by creating a noop test case in its place if the environment variable isn't set. For example, the following:

#[needs_env_var(MYVAR)]
#[test]
fn mytest() {
  assert!(false);
}

would be expanded at compile time to something like

#[test]
fn mytest_SKIPPED_NEEDS_MYVAR() {
  assert!(true);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions