Expand description
§Tari Test Utilities
This crate contains some commonly useful test utilities for testing Tari codebase.
§Modules
futures
- Contains utilities which make testing future-based code easierpaths
- Contains utilities which return and create paths which are useful for tests involving filesrandom
- Contains utilities to making generating random values easier
Modules§
Macros§
- Periodically check if a value becomes the expected value within a maximum number of attempts. The reason this has an ‘async’ in the name is because this doesn’t use
thread::sleep
, but rather tokio::timer::delay(…). Therefore, needs to be in an async context using tokio threadpool. - Collect $take items from a stream or timeout for Duration $timeout.
- Returns a HashMap of the number of occurrences of a particular item in a stream.
- Creates a test counter future Context.
- Creates a test counter future Context.
- Unpack the tuple or struct from an enum variant. Each extracted variable is decalred as mutable for maximum flexibility.