From fce79366e1f1d48fd962dcb9d65a8ed4dc551643 Mon Sep 17 00:00:00 2001 From: Jon Bernard Date: Sun, 3 Jan 2016 17:36:05 -0500 Subject: Add custom fixtures for testing --- conftest.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 conftest.py 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() -- cgit v1.2.3