py3-test-datafiles-3.0.1
create a 'tmp_path' with predefined files/directories
Back to search · Project homepage
Description
pytest plugin to create a tmp_path containing a preconfigured set of files
and/or directories.
This plugin allows you to specify one or several files/directories that are
copied to a temporary directory (tmp_path) before the execution of the test.
This means the original files are not modified and every test runs on its own
version of the same files.
Files/directories can be specified either as strings or as pathlib.Path objects.
To take advantage of the datafiles fixture in a test function, add datafiles as
one of the test function parameters (per usual with pytest fixtures) and
decorate the test function with
@pytest.mark.datafiles(file1, file2, dir1, dir2, ...).
The datafiles variable in your test function is a pathlib.Path object (tmp_path)
where the copied files are located.
Under OpenBSD systems this will most likely be some subdirectory of /tmp/.
Package information
- Ports path
- devel/py-test-datafiles
- Package architecture
- amd64
- Maintainer
- The OpenBSD ports mailing-list <ports@openbsd.org>
- Categories
- devel, lang/python
- Available flavors
- None listed
- Only for architectures
- aarch64, amd64, arm, i386, mips64, mips64el, powerpc, powerpc64, riscv64, alpha, hppa, sparc64
These are ports metadata. Binary availability depends on the release, architecture and mirror. Build and test dependencies are not an installation checklist.
Direct dependencies
Runtime
Build
Test
Used by (1 dependency relationships)
Includes library, runtime, build and test relationships. Results load 100 at a time.