diff options
author | Jon Bernard <jbernard@tuxion.com> | 2016-07-18 15:36:41 -0400 |
---|---|---|
committer | Jon Bernard <jbernard@tuxion.com> | 2016-07-18 15:36:41 -0400 |
commit | af991f612a54d347deb5449aec273012c2c059df (patch) | |
tree | 46bfed4f4892c8b8dca82f62e09f4c1bb1e29567 /tests/test_repository.py | |
parent | e09398c6ef5af049a28b88690911343ba5238e67 (diff) | |
download | dotfiles-af991f612a54d347deb5449aec273012c2c059df.tar.gz dotfiles-af991f612a54d347deb5449aec273012c2c059df.tar.bz2 dotfiles-af991f612a54d347deb5449aec273012c2c059df.zip |
Reverse leading dot logic
Diffstat (limited to 'tests/test_repository.py')
-rw-r--r-- | tests/test_repository.py | 10 |
1 files changed, 5 insertions, 5 deletions
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'] |