diff options
author | Jon Bernard <jbernard@tuxion.com> | 2016-01-22 08:54:19 -0500 |
---|---|---|
committer | Jon Bernard <jbernard@tuxion.com> | 2016-01-22 08:54:19 -0500 |
commit | 0eadef7f8034dc07d6322b7afb8c51a17472011e (patch) | |
tree | b15b20f61c1cc617c88fa5fae8b82bd51caa7baa /tests/conftest.py | |
parent | 252d359d0c937a8ff9801a3079c865b4c7abe448 (diff) | |
download | dotfiles-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.py | 13 |
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') |