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.

Source Distribution

pytest-toolbox-0.2.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_toolbox-0.2-py35-none-any.whl (6.4 kB view details)

Uploaded Python 3.5

File details

Details for the file pytest-toolbox-0.2.tar.gz.

File metadata

  • Download URL: pytest-toolbox-0.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pytest-toolbox-0.2.tar.gz
Algorithm Hash digest
SHA256 a799869c6657b60b90a029910c77b5c9c46d3d8a0705efe06d1f57c3de3da28d
MD5 9a492a4eb1a3894b6eddc25ec8f2bf27
BLAKE2b-256 984de3509dd475cffa2b045b812f73d95d5a48ae4a45270e7dc6165b83ea0db4

See more details on using hashes here.

File details

Details for the file pytest_toolbox-0.2-py35-none-any.whl.

File metadata

File hashes

Hashes for pytest_toolbox-0.2-py35-none-any.whl
Algorithm Hash digest
SHA256 115dd91443ef17fa430617932b7e8f04d10b9d42d2b81f8d2a8730e72da1e222
MD5 8ab42499f1909dfaff12e060bed999ae
BLAKE2b-256 23462d073eb23b2c80c2471d09122f7533bf9be5347efbea4981337ffd20d3df

See more details on using hashes here.

Supported by

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