Skip to content

Commit

Permalink
Merge pull request #77 from palfrey/docs-0.9
Browse files Browse the repository at this point in the history
Various docs fixes prior to 0.9
  • Loading branch information
palfrey committed Aug 10, 2022
2 parents 1b00867 + 5390ed6 commit 5bee99d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
7 changes: 1 addition & 6 deletions README.md
Expand Up @@ -56,16 +56,11 @@ You can then either add `#[serial]` or `#[serial(some_text)]` to tests as requir

For each test, a timeout can be specified with the `timeout_ms` parameter to the [serial](macro@serial) attribute. Note that
the timeout is counted from the first invocation of the test, not from the time the previous test was completed. This can
lead to some unpredictable behavior based on the number of parallel tests run on the system.
lead to [some unpredictable behavior](https://github.com/palfrey/serial_test/issues/76) based on the number of parallel tests run on the system.
```rust
#[test]
#[serial(timeout_ms = 1000)]
fn test_serial_one() {
// Do things
}
#[test]
#[serial(test_name, timeout_ms = 1000)]
fn test_serial_another() {
// Do things
}
```
4 changes: 2 additions & 2 deletions serial_test/Cargo.toml
Expand Up @@ -32,10 +32,10 @@ default = ["logging", "async"]
## Switches on debug logging (and requires the `log` package)
logging = ["log"]

## Enables async features
## Enables async features (and requires the `futures` package)
async = ["futures"]

## The file_locks feature unlocks the `file_serial`/`file_parallel` macros
## The file_locks feature unlocks the `file_serial`/`file_parallel` macros (and requires the `fslock` package)
file_locks = ["fslock"]

docsrs = ["document-features"]
Expand Down
12 changes: 12 additions & 0 deletions serial_test/src/lib.rs
Expand Up @@ -46,6 +46,18 @@
//! }
//! ````
//!
//!
//! For each test, a timeout can be specified with the `timeout_ms` parameter to the [serial](macro@serial) attribute. Note that
//! the timeout is counted from the first invocation of the test, not from the time the previous test was completed. This can
//! lead to [some unpredictable behavior](https://github.com/palfrey/serial_test/issues/76) based on the number of parallel tests run on the system.
//! ```rust
//! #[test]
//! #[serial(timeout_ms = 1000)]
//! fn test_serial_one() {
//! // Do things
//! }
//! ```
//!
//! ## Feature flags
#![cfg_attr(
feature = "docsrs",
Expand Down
8 changes: 1 addition & 7 deletions serial_test_derive/src/lib.rs
Expand Up @@ -64,20 +64,14 @@ use std::ops::Deref;
///
/// For each test, a timeout can be specified with the `timeout_ms` parameter to the [serial](macro@serial) attribute. Note that
/// the timeout is counted from the first invocation of the test, not from the time the previous test was completed. This can
/// lead to some unpredictable behavior based on the number of parallel tests run on the system.
/// lead to [some unpredictable behavior](https://github.com/palfrey/serial_test/issues/76) based on the number of parallel tests run on the system.
///
/// ````
/// #[test]
/// #[serial(timeout_ms = 1000)]
/// fn test_serial_one() {
/// // Do things
/// }
///
/// #[test]
/// #[serial(timeout_ms = 1000)]
/// fn test_serial_another() {
/// // Do things
/// }
/// ````
///
/// Nested serialised tests (i.e. a [serial](macro@serial) tagged test calling another) are supported
Expand Down

0 comments on commit 5bee99d

Please sign in to comment.