diff options
author | Jon Bernard <jbernard@tuxion.com> | 2016-01-18 09:45:53 -0500 |
---|---|---|
committer | Jon Bernard <jbernard@tuxion.com> | 2016-01-18 09:45:53 -0500 |
commit | c59c97722bb2d5ec2b4c6cb052b7ac25a23f55b1 (patch) | |
tree | 4a9b27a1b333643846b911c6c9424777844e7a1d /tests | |
parent | 6e82526331551d66656c9fb5f47a14cfebe088fe (diff) | |
download | dotfiles-c59c97722bb2d5ec2b4c6cb052b7ac25a23f55b1.tar.gz dotfiles-c59c97722bb2d5ec2b4c6cb052b7ac25a23f55b1.tar.bz2 dotfiles-c59c97722bb2d5ec2b4c6cb052b7ac25a23f55b1.zip |
Fix unit tests to match recent changes
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_repository.py | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/tests/test_repository.py b/tests/test_repository.py index 591dee9..9af2aac 100644 --- a/tests/test_repository.py +++ b/tests/test_repository.py @@ -15,12 +15,15 @@ class TestRepository(object): assert repo.check(exists=1, dir=1) def test_str(self, repo, home): - repo.ensure('a') - repo.ensure('b') - repo.ensure('c') - assert str(Repository(repo, home)) == ('.a\n' - '.b\n' - '.c') + repo.ensure('.a') + repo.ensure('.b') + repo.ensure('.c') + + r = Repository(repo, home) + + assert str(r) == ('%s\n%s\n%s' % (home.join('.a'), + home.join('.b'), + home.join('.c'))) def test_repr(self, repo): actual = '%r' % Repository(repo, None) @@ -28,13 +31,13 @@ class TestRepository(object): assert actual == expected def test_target_to_name(self, repo, home): - actual = Repository(repo, home)._target_to_name(repo.join('foo')) + actual = Repository(repo, home)._target_to_name(repo.join('.foo')) expected = home.join('.foo') assert actual == expected def test_name_to_target(self, repo, home): actual = Repository(repo, home)._name_to_target(home.join('.foo')) - expected = repo.join('foo') + expected = repo.join('.foo') assert actual == expected @pytest.mark.xfail(reason='TODO') @@ -58,5 +61,5 @@ class TestRepository(object): r = Repository(repo, home) actual = r._name_to_target(home.join('.vim/.mrconfig')) - expected = repo.join('vim/.mrconfig') + expected = repo.join('.vim/.mrconfig') assert actual == expected |