10 releases
0.1.5 | Jun 26, 2024 |
---|---|
0.1.4 | Mar 22, 2023 |
0.1.1 | Feb 27, 2023 |
0.0.4 | Apr 11, 2021 |
0.0.2 | Jun 14, 2020 |
#523 in Filesystem
59 downloads per month
Used in 2 crates
19KB
357 lines
testfile for Rust unit tests
Library for creating automaticaly deleted test files for use in your Rust unit tests. Do not worry about manual temporary file cleanups.
Managed temporary files are created in system temporary directory with unique file names.
They can be dereferenced as ordinary File
and are automatically deleted during Drop
.
Functions do not return Result <T,E>
but panic!
allowing you to focus on your tests and not on error handling.
Nightly Rust is not required.
Implemented traits for TestFile
- Testfile can be dereferenced as File making it drop in replacement.
- implements
AsRef
/AsMut
for Read, Write, File, PathBuf, Path. - implements
From
String and PathBuf.
Dependencies
~310KB