mirror of https://github.com/astral-sh/ruff
Add `use test_case::test_case;` to CONTRIBUTING.md
I previously tried adding the #[test_case()] attribute macro and got
confused because the Rust compilation suddenly failed with:
error[E0658]: use of unstable library feature 'custom_test_frameworks': custom test frameworks are an unstable feature
which is a quite confusing error message. The solution is to just add
`use test_case::test_case;`, so this commit adds that line to the
example in CONTRIBUTING.md to spare others this source of confusion.
This commit is contained in:
parent
b0bb75dc1c
commit
e9ec2a7b36
|
|
@ -71,6 +71,8 @@ output, codify the behavior as a snapshot test by adding a new `testcase` macro
|
||||||
section of `src/linter.rs`, like so:
|
section of `src/linter.rs`, like so:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
|
use test_case::test_case;
|
||||||
|
|
||||||
#[test_case(CheckCode::A001, Path::new("A001.py"); "A001")]
|
#[test_case(CheckCode::A001, Path::new("A001.py"); "A001")]
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue