From 0eadef7f8034dc07d6322b7afb8c51a17472011e Mon Sep 17 00:00:00 2001 From: Jon Bernard Date: Fri, 22 Jan 2016 08:54:19 -0500 Subject: Simplify test fixtures into a single repository --- tests/conftest.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'tests/conftest.py') 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') -- cgit v1.2.3