aboutsummaryrefslogtreecommitdiffstats
path: root/tests/conftest.py
blob: f5beb217902df3ada6e87b0b00f0530dbaf8fb18 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import pytest
from click.testing import CliRunner

from dotfiles.repository import Repository


@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')
def runner():
    return CliRunner()