aboutsummaryrefslogtreecommitdiffstats
path: root/tests/conftest.py
diff options
context:
space:
mode:
authorGravatar Jon Bernard <jbernard@tuxion.com> 2016-01-22 08:54:19 -0500
committerGravatar Jon Bernard <jbernard@tuxion.com> 2016-01-22 08:54:19 -0500
commit0eadef7f8034dc07d6322b7afb8c51a17472011e (patch)
treeb15b20f61c1cc617c88fa5fae8b82bd51caa7baa /tests/conftest.py
parent252d359d0c937a8ff9801a3079c865b4c7abe448 (diff)
downloaddotfiles-0eadef7f8034dc07d6322b7afb8c51a17472011e.tar.gz
dotfiles-0eadef7f8034dc07d6322b7afb8c51a17472011e.tar.bz2
dotfiles-0eadef7f8034dc07d6322b7afb8c51a17472011e.zip
Simplify test fixtures into a single repository
Diffstat (limited to 'tests/conftest.py')
-rw-r--r--tests/conftest.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/conftest.py b/tests/conftest.py
index 7d88ce5..f5beb21 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -1,15 +1,14 @@
import pytest
from click.testing import CliRunner
-
-@pytest.fixture(scope='function', params=['', 'home'])
-def home(request, tmpdir):
- return tmpdir.ensure_dir(request.param)
+from dotfiles.repository import Repository
-@pytest.fixture(scope='function')
-def repo(tmpdir):
- return tmpdir.ensure_dir('repo')
+@pytest.fixture(scope='function', params=['', 'home'])
+def repo(request, tmpdir):
+ path = tmpdir.ensure_dir('repo')
+ home = tmpdir.ensure_dir(request.param)
+ return Repository(path, home)
@pytest.fixture(scope='function')