diff options
author | Remco Wendt <remco@maykinmedia.nl> | 2011-10-23 22:55:34 +0200 |
---|---|---|
committer | Remco Wendt <remco@maykinmedia.nl> | 2011-10-23 22:55:34 +0200 |
commit | e64ac4043d6a6d0b4d3921a88e6aa2c53436da29 (patch) | |
tree | 4d5ecccf8eed33abfe53a40c3da2dee020825494 /test_dotfiles.py | |
parent | a8feb6ad1bc6252d4e5752c2463576438ea8dc95 (diff) | |
download | dotfiles-e64ac4043d6a6d0b4d3921a88e6aa2c53436da29.tar.gz dotfiles-e64ac4043d6a6d0b4d3921a88e6aa2c53436da29.tar.bz2 dotfiles-e64ac4043d6a6d0b4d3921a88e6aa2c53436da29.zip |
Fixed unit tests for use on mac, since /tmp is a symlink to /private/tmp
Diffstat (limited to 'test_dotfiles.py')
-rwxr-xr-x | test_dotfiles.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test_dotfiles.py b/test_dotfiles.py index bb54578..f82f3ae 100755 --- a/test_dotfiles.py +++ b/test_dotfiles.py @@ -49,7 +49,8 @@ class DotfilesTestCase(unittest.TestCase): dotfiles.sync(force=True) self.assertEqual( - os.path.realpath(os.path.join(self.home, '.lastpass')), '/tmp') + os.path.realpath(os.path.join(self.home, '.lastpass')), + os.path.realpath('/tmp')) def test_move_repository(self): """Test the move() method for a Dotfiles repository.""" @@ -65,7 +66,7 @@ class DotfilesTestCase(unittest.TestCase): # Make sure sync() did the right thing. self.assertEqual( os.path.realpath(os.path.join(self.home, '.bashrc')), - os.path.join(self.repo, 'bashrc')) + os.path.realpath(os.path.join(self.repo, 'bashrc'))) target = os.path.join(self.home, 'MyDotfiles') @@ -74,7 +75,7 @@ class DotfilesTestCase(unittest.TestCase): self.assertTrue(os.path.exists(os.path.join(target, 'bashrc'))) self.assertEqual( os.path.realpath(os.path.join(self.home, '.bashrc')), - os.path.join(target, 'bashrc')) + os.path.realpath(os.path.join(target, 'bashrc'))) def test_sync_unmanaged_directory_symlink(self): """Test a forced sync on a directory symlink. @@ -98,7 +99,7 @@ class DotfilesTestCase(unittest.TestCase): # Make sure the symlink points to the correct location. self.assertEqual( os.path.realpath(os.path.join(self.home, '.vim')), - os.path.join(self.home, 'vim')) + os.path.realpath(os.path.join(self.home, 'vim'))) dotfiles = core.Dotfiles( home=self.home, repo=self.repo, prefix='', @@ -109,7 +110,7 @@ class DotfilesTestCase(unittest.TestCase): # The symlink should now point to the directory in the repository. self.assertEqual( os.path.realpath(os.path.join(self.home, '.vim')), - os.path.join(self.repo, 'vim')) + os.path.realpath(os.path.join(self.repo, 'vim'))) def suite(): |