aboutsummaryrefslogtreecommitdiffstats
path: root/conftest.py
diff options
context:
space:
mode:
authorGravatar Jon Bernard <jbernard@tuxion.com> 2016-01-03 17:36:05 -0500
committerGravatar Jon Bernard <jbernard@tuxion.com> 2016-01-03 22:39:43 -0500
commitfce79366e1f1d48fd962dcb9d65a8ed4dc551643 (patch)
tree1c608d6064b2f3e5daef355666b0b7d963b974ae /conftest.py
parent5c3c91c43e12b40a618ad471ba24950d5b6d1ea0 (diff)
downloaddotfiles-fce79366e1f1d48fd962dcb9d65a8ed4dc551643.tar.gz
dotfiles-fce79366e1f1d48fd962dcb9d65a8ed4dc551643.tar.bz2
dotfiles-fce79366e1f1d48fd962dcb9d65a8ed4dc551643.zip
Add custom fixtures for testing
Diffstat (limited to 'conftest.py')
-rw-r--r--conftest.py17
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()