Skip to main content

Predictable and repeatable tempdir support.

Project description

See Build Status on Travis CI See Build Status on AppVeyor http://img.shields.io/pypi/v/pytest-tempdir.svg

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.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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest-tempdir-2015.11.16.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

pytest_tempdir-2015.11.16-py2.py3-none-any.whl (7.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pytest-tempdir-2015.11.16.tar.gz.

File metadata

File hashes

Hashes for pytest-tempdir-2015.11.16.tar.gz
Algorithm Hash digest
SHA256 7e2bc7266e7473d5d6e5857e2b9f1e80c7a155d33a899ac888d2f1474123b648
MD5 b5f5eb665b42fd279934466230f3262c
BLAKE2b-256 abd767a6ee09885134f0dd02f13a246c76415638829b482cf57f392f487c74b2

See more details on using hashes here.

File details

Details for the file pytest_tempdir-2015.11.16-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_tempdir-2015.11.16-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 356180fd091abadcfea7aef6430efb7f57654dc5355dccac87e7abb6bf2c7dc0
MD5 81f03e836b102f02208f08ac576f2d49
BLAKE2b-256 946a4562d05f37fc1b6d141f87896ff97729e0fcae8dad0ef228a05eeabc214a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page