diff options
author | Jon Bernard <jbernard@tuxion.com> | 2016-01-03 17:36:05 -0500 |
---|---|---|
committer | Jon Bernard <jbernard@tuxion.com> | 2016-01-03 22:39:43 -0500 |
commit | fce79366e1f1d48fd962dcb9d65a8ed4dc551643 (patch) | |
tree | 1c608d6064b2f3e5daef355666b0b7d963b974ae /conftest.py | |
parent | 5c3c91c43e12b40a618ad471ba24950d5b6d1ea0 (diff) | |
download | dotfiles-fce79366e1f1d48fd962dcb9d65a8ed4dc551643.tar.gz dotfiles-fce79366e1f1d48fd962dcb9d65a8ed4dc551643.tar.bz2 dotfiles-fce79366e1f1d48fd962dcb9d65a8ed4dc551643.zip |
Add custom fixtures for testing
Diffstat (limited to 'conftest.py')
-rw-r--r-- | conftest.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/conftest.py b/conftest.py new file mode 100644 index 0000000..a996e54 --- /dev/null +++ b/conftest.py @@ -0,0 +1,17 @@ +import pytest +from click.testing import CliRunner + + +@pytest.fixture(scope='function') +def home(request, tmpdir): + return tmpdir.ensure('home', dir=1) + + +@pytest.fixture(scope='function') +def repo(request, tmpdir): + return tmpdir.ensure('repo', dir=1) + + +@pytest.fixture(scope='function') +def runner(request): + return CliRunner() |