Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various docs fixes prior to 0.9 #77

Merged
merged 2 commits into from Aug 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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