diff options
author | Jon Bernard <jbernard@tuxion.com> | 2016-01-21 22:49:19 -0500 |
---|---|---|
committer | Jon Bernard <jbernard@tuxion.com> | 2016-01-21 22:49:19 -0500 |
commit | e6c935b715ce1fa385e33aa06375796e5e7980db (patch) | |
tree | a249fe237f0ce7f6fad42ecb20fe566968c1c4cf /tests | |
parent | ee75886843538f510f9e39fedae6a6f952193e83 (diff) | |
download | dotfiles-e6c935b715ce1fa385e33aa06375796e5e7980db.tar.gz dotfiles-e6c935b715ce1fa385e33aa06375796e5e7980db.tar.bz2 dotfiles-e6c935b715ce1fa385e33aa06375796e5e7980db.zip |
Allow globs in ignore patterns
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_dotfile.py | 2 | ||||
-rw-r--r-- | tests/test_repository.py | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/tests/test_dotfile.py b/tests/test_dotfile.py index a913743..ff19d9d 100644 --- a/tests/test_dotfile.py +++ b/tests/test_dotfile.py @@ -1,5 +1,5 @@ -import py import pytest +import py.path from dotfiles.dotfile import Dotfile from dotfiles.exceptions import IsSymlink, NotASymlink diff --git a/tests/test_repository.py b/tests/test_repository.py index 4cf694f..05328e6 100644 --- a/tests/test_repository.py +++ b/tests/test_repository.py @@ -1,5 +1,5 @@ -import py import pytest +import py.path from dotfiles.repository import Repository from dotfiles.exceptions import NotRootedInHome, InRepository, TargetIgnored, \ @@ -48,9 +48,11 @@ def test_dotfile(repo, home): with pytest.raises(NotRootedInHome): Repository(repo, home)._dotfile(py.path.local('/tmp/foo')) with pytest.raises(TargetIgnored): - Repository(repo, home, ignore=['.foo'])._dotfile(home.join('.foo')) + Repository(repo, home, + ignore_patterns=['.foo'])._dotfile(home.join('.foo')) with pytest.raises(TargetIgnored): - Repository(repo, home, ignore=['foo'])._dotfile(home.join('.bar/foo')) + Repository(repo, home, + ignore_patterns=['foo'])._dotfile(home.join('.bar/foo')) with pytest.raises(IsDirectory): Repository(repo, home)._dotfile(home.ensure_dir('.config')) |