Giter Club home page Giter Club logo

pytest-tempdir's Introduction

pytest-tempdir

See Build Status on Travis CI See Build Status on AppVeyor

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

pytest-tempdir's People

Contributors

s0undt3ch avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.