diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/conftest.py | 2 | ||||
-rw-r--r-- | tests/test_repository.py | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/conftest.py b/tests/conftest.py index f5beb21..9e1d16a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -8,7 +8,7 @@ from dotfiles.repository import Repository def repo(request, tmpdir): path = tmpdir.ensure_dir('repo') home = tmpdir.ensure_dir(request.param) - return Repository(path, home) + return Repository(path, homedir=home) @pytest.fixture(scope='function') diff --git a/tests/test_repository.py b/tests/test_repository.py index 73d5315..58e6cf9 100644 --- a/tests/test_repository.py +++ b/tests/test_repository.py @@ -25,20 +25,20 @@ def test_str(repo): @pytest.mark.parametrize('path', ['.foo', '.foo/bar/baz']) def test_dotfile_path(repo, path): - repo.preserve_leading_dot = True + repo.remove_leading_dot = False assert (repo._dotfile_path(repo.path.join(path)) == repo.homedir.join(path)) - repo.preserve_leading_dot = False + repo.remove_leading_dot = True assert (repo._dotfile_path(repo.path.join(path)) == repo.homedir.join('.%s' % path)) @pytest.mark.parametrize('path', ['.foo', '.foo/bar/baz']) def test_dotfile_target(repo, path): - repo.preserve_leading_dot = True + repo.remove_leading_dot = False assert (repo._dotfile_target(repo.homedir.join(path)) == repo.path.join(path)) - repo.preserve_leading_dot = False + repo.remove_leading_dot = True assert (repo._dotfile_target(repo.homedir.join(path)) == repo.path.join(path[1:])) @@ -48,7 +48,7 @@ def test_dotfile(repo): repo._dotfile(py.path.local('/tmp/foo')) with pytest.raises(TargetIgnored): repo.ignore_patterns = ['.foo'] - repo.preserve_leading_dot = True + repo.remove_leading_dot = False repo._dotfile(py.path.local(repo.homedir.join('.foo'))) with pytest.raises(TargetIgnored): repo.ignore_patterns = ['foo'] |