Predictable and repeatable tempdir support.
Project description
Adds support for a predictable and repeatable temporary directory.
This Pytest plugin was generated with Cookiecutter along with @hackebrot’s Cookiecutter-pytest-plugin template.
Features
Adds support for a predictable and repeatable temporary directory through the tempdir fixture which gets cleaned up in the end of the test run session(this behaviour can be disabled).
Requirements
None!
Installation
You can install “pytest-tempdir” via pip from PyPI:
$ pip install pytest-tempdir
Usage
Simply define a pytest_tempdir_basename function on your conftest.py which returns a string to define the basename or pass --tempdir-basename.
If you wish to leave the temporary directory intact for further inspection after the tests suite ends, pass --tempdir-no-clean.
Contributing
Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.
License
Distributed under the terms of the Apache 2.0 license, “pytest-tempdir” is free and open source software
Issues
If you encounter any problems, please file an issue along with a detailed description.
Changelog
v2015.12.6
Each absolute path gets it’s own counter
v2015.11.29
Append a counter value to existing directory names
v2015.11.17
Fix more encoding issues when running setup and the system locale is not set
v2015.11.16
Fix encoding issue when running setup and the system locale is not set
v2015.11.8
Fix stale tempdir cleanup logic
v2015.11.6
Wipe the tempdir directory on test session start if it exists
v2015.11.4
First working release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pytest-tempdir-2015.12.6.tar.gz
.
File metadata
- Download URL: pytest-tempdir-2015.12.6.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 114bff806ddef1500e46d0347e894f93ce054f308744f7b8add2f1ecbbb1adbd |
|
MD5 | 263da9b518caef258decab85729833cf |
|
BLAKE2b-256 | 4d7259aee5c759988254ecb8166f48efb3ea4be74996dc8b2da1ce115eb925f0 |
File details
Details for the file pytest_tempdir-2015.12.6-py2.py3-none-any.whl
.
File metadata
- Download URL: pytest_tempdir-2015.12.6-py2.py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e0e330ff7382bfd70688788e11fa7c20686229caceec49bff43ad4a8ac06150 |
|
MD5 | 57f592c559a71c759abfec06cead4517 |
|
BLAKE2b-256 | 9379c193307d7ccaf6e5856723ebe4978ea0c27e141c04e58c200c71bcae30b0 |