6 releases

0.2.4 Sep 11, 2022
0.1.4 Sep 3, 2022
0.1.3 Jun 15, 2022

#264 in Testing

Download history 1009/week @ 2023-12-07 972/week @ 2023-12-14 367/week @ 2023-12-21 257/week @ 2023-12-28 749/week @ 2024-01-04 951/week @ 2024-01-11 1065/week @ 2024-01-18 835/week @ 2024-01-25 1090/week @ 2024-02-01 750/week @ 2024-02-08 867/week @ 2024-02-15 1206/week @ 2024-02-22 1737/week @ 2024-02-29 2161/week @ 2024-03-07 1362/week @ 2024-03-14 639/week @ 2024-03-21

6,247 downloads per month
Used in image_thumbs

Apache-2.0

7KB
57 lines

sequential-test

Version Downloads Docs APACHE 2.0 license

Allows for the creation of sequential tests.

#[cfg(test)]
mod tests {
    #[test]
    #[sequential]
    fn test1() {
        // ...
    }
    #[test]
    #[sequential]
    fn test2() {
        // ...
    }
    #[test]
    #[parallel]
    fn test3() {
        // ...
    }
}
  • Tests with the sequential attribute are guaranteed to be executed sequentially.
  • Tests with the parallel attribute may run in parallel of each other but will not run at the same time as tests with the sequential attribute.
  • Tests with neither attributes may run in parallel with any tests.

Defining sequential or parallel attributes on non-tests or within scopes is considered UB.

This library is both faster[^speed] and smaller than serial_test however offers less functionality.

[^speed]: The current benchmark illustrate sequential-test covers the test set in an average of ~350ms while serial_test covers the test set in an average of ~550ms.

Dependencies