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
v2019.9.16
Fix hookspec definition
v2019.9.15
Backwards compatible
v2019.9.14
Take into account long paths on darwin for the tempdir root
v2019.7.18
Lower log level
v2018.8.11
Lower log call logging level
v2016.8.20
Support pytest 2.x and 3.x
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-2019.10.12.tar.gz
.
File metadata
- Download URL: pytest-tempdir-2019.10.12.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7d91813a9aa991db87dacdef8cfd3f1657632d731d56d06238c5ffb63ab36d8 |
|
MD5 | 79b997d418fb85c2529ab50cd4333689 |
|
BLAKE2b-256 | c93c8dca670b288016e579097384bfc50944c83fe18d6731042ea836b2a88a76 |
File details
Details for the file pytest_tempdir-2019.10.12-py2.py3-none-any.whl
.
File metadata
- Download URL: pytest_tempdir-2019.10.12-py2.py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcb8e657ee0d3f576c5118120227010ed0ed99d5d0bfad23ee82f9f7b91710e1 |
|
MD5 | 31850d4ecfb4fbd355f9eba7e5409753 |
|
BLAKE2b-256 | 6d0feda4024eac0d579cabd8b2b7ce12a763d2ac0410e770aa561527cd821a3e |