Skip to main content

Numerous useful plugins for pytest.

Project description

Build Status codecov.io PyPI Status license

Copyright (C) 2016 Samuel Colvin

Numerous useful plugins for pytest.

Fixtures

tmpworkdir
Run the test with the working directory set to a temporary directory. Similar to the pytest plugin tmpdir except working directory is changed.
caplog
capture logs.
debug
print all logs.
loop
asyncio loop.

Methods

(See below for usage examples).

mktree
Create a tree of files from a dictionary.
gettree
Return a dictionary depicting a directory tree.

Usage

from pytest_toolbox import gettree, mktree

def test_whatever(tmpworkdir):
    mktree(tmpworkdir, {
        'foobar.txt': 'has this content'
    })
    assert gettree(tmpworkdir) = {'foobar.txt': 'has this content'}

TODO

Project details


Download files

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

Files for pytest-toolbox, version 0.2
Filename, size File type Python version Upload date Hashes
Filename, size pytest_toolbox-0.2-py35-none-any.whl (6.4 kB) File type Wheel Python version py35 Upload date Hashes View
Filename, size pytest-toolbox-0.2.tar.gz (4.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page