diff options
author | Éric Araujo <merwok@netwok.org> | 2011-10-06 03:10:09 (GMT) |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2011-10-06 03:10:09 (GMT) |
commit | 9556a5bab277eff83b40236c58c3fb7d0233dc47 (patch) | |
tree | 022fbc0af88074df6ce6e8268b84eb29af7e61f7 /Lib/packaging/tests/test_uninstall.py | |
parent | 2c30e3999cb2a1c46d19d903b055cf4267a27f80 (diff) | |
download | cpython-9556a5bab277eff83b40236c58c3fb7d0233dc47.zip cpython-9556a5bab277eff83b40236c58c3fb7d0233dc47.tar.gz cpython-9556a5bab277eff83b40236c58c3fb7d0233dc47.tar.bz2 |
Fix incorrect test.
The packaging.install.remove function (a.k.a. the uninstall feature)
takes a path argument to allow client code to use custom directories
instead of sys.path. The test used to give self.root_dir as path, which
corresponds to a prefix option, but prefix is not on sys.path, it’s only
the base directory used to compute the stdlib and site-packages
directory paths. The test now gives a valid site-packages path to the
function.
Diffstat (limited to 'Lib/packaging/tests/test_uninstall.py')
-rw-r--r-- | Lib/packaging/tests/test_uninstall.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/packaging/tests/test_uninstall.py b/Lib/packaging/tests/test_uninstall.py index e42b48e..614b187 100644 --- a/Lib/packaging/tests/test_uninstall.py +++ b/Lib/packaging/tests/test_uninstall.py @@ -89,9 +89,10 @@ class UninstallTestCase(support.TempdirManager, site_packages = self.get_path(dist, 'purelib') return dist, site_packages - def test_uninstall_unknow_distribution(self): + def test_uninstall_unknown_distribution(self): + dist, site_packages = self.install_dist('Foospam') self.assertRaises(PackagingError, remove, 'Foo', - paths=[self.root_dir]) + paths=[site_packages]) def test_uninstall(self): dist, site_packages = self.install_dist() |