diff options
author | Jon Bernard <jbernard@tuxion.com> | 2016-01-03 15:01:40 -0500 |
---|---|---|
committer | Jon Bernard <jbernard@tuxion.com> | 2016-01-03 22:39:43 -0500 |
commit | 5c3c91c43e12b40a618ad471ba24950d5b6d1ea0 (patch) | |
tree | e738fdd7e322f86cc609b630f2e19e4eff7f71e6 /tests/test_repository.py | |
parent | 48e781a75c8b5d20c1e9c54c92dd31e641dfd121 (diff) | |
download | dotfiles-5c3c91c43e12b40a618ad471ba24950d5b6d1ea0.tar.gz dotfiles-5c3c91c43e12b40a618ad471ba24950d5b6d1ea0.tar.bz2 dotfiles-5c3c91c43e12b40a618ad471ba24950d5b6d1ea0.zip |
Consolidate tests into a single file
Diffstat (limited to 'tests/test_repository.py')
-rw-r--r-- | tests/test_repository.py | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/tests/test_repository.py b/tests/test_repository.py deleted file mode 100644 index 2825b66..0000000 --- a/tests/test_repository.py +++ /dev/null @@ -1,72 +0,0 @@ -import os -import py -import pytest - -from dotfiles.repository import Repository - - -def test_getters(): - - repo = Repository('/a', '/b') - - assert isinstance(repo.homedir, str) - assert isinstance(repo.repodir, str) - - assert '/a' == repo.repodir - assert '/b' == repo.homedir - - -def test_setters(): - - repodir = py.path.local('/foo/bar') - homedir = py.path.local('/fizz/buzz') - - repo = Repository('/a', '/b') - - repo.repodir = repodir - repo.homedir = homedir - - assert repodir == repo.repodir - assert homedir == repo.homedir - - -def test_path_expansion(): - - repo = Repository('~/foo', '~/bar') - - assert os.path.expanduser('~/foo') == repo.repodir - assert os.path.expanduser('~/bar') == repo.homedir - - -def test_repodir_create(tmpdir): - - repodir = tmpdir.join('test_create_repo') - repo = Repository(repodir) - - assert True == repodir.check(exists=0) - contents = repo.contents() - assert [] == contents - assert True == repodir.check(exists=1, dir=1) - - -def test_contents_empty(tmpdir): - assert [] == Repository(tmpdir.join('Dotfiles')).contents() - - -def test_contents_nonempty(tmpdir): - - repodir = tmpdir.ensure('test_create_repo', dir=1) - target_a = repodir.ensure('a') - target_b = repodir.ensure('b') - target_c = repodir.ensure('c') - - contents = Repository(repodir).contents() - - assert target_a == contents[0].target - assert target_b == contents[1].target - assert target_c == contents[2].target - - -@pytest.mark.xfail(reason='not implemented yet') -def test_rename(): - raise NotImplementedError |