From d655eb0e7f6d454df9e2669143035db7fa6f38d4 Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Mon, 12 Dec 2011 14:16:00 +0000 Subject: Fix Cachedir to convert relative paths to absolute paths This also required a test to be changed as it assumed that the path it created the Cachedir with was the same one it stored. It also technically makes the new test redundant as testing if dirname is equal to an absolute path also tests if it retrieves values by absolute path. --- morphlib/cachedir_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'morphlib/cachedir_tests.py') diff --git a/morphlib/cachedir_tests.py b/morphlib/cachedir_tests.py index ef1fa2de..dec6358a 100644 --- a/morphlib/cachedir_tests.py +++ b/morphlib/cachedir_tests.py @@ -27,7 +27,7 @@ class CacheDirTests(unittest.TestCase): self.cachedir = morphlib.cachedir.CacheDir(self.dirname) def test_sets_dirname_attribute(self): - self.assertEqual(self.cachedir.dirname, self.dirname) + self.assertEqual(self.cachedir.dirname, os.path.abspath(self.dirname)) def test_uses_absolute_path(self): abspath = os.path.abspath(self.dirname) -- cgit v1.2.1