Numerous useful plugins for pytest.
Project description
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
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
pytest-toolbox-0.1.tar.gz
(4.3 kB
view hashes)
Built Distribution
Close
Hashes for pytest_toolbox-0.1-py35-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d418e42f7f66834a710076ea7b9273334ffa2d5110f15ffe1065480b8e336c6c |
|
MD5 | ff33ab91b6841ff66b9b80b366849642 |
|
BLAKE2b-256 | 3896d4419bb034333908c88ef5b82ce5dbb2b6a92827edb4011d8356d2b5e82a |