[Python-checkins] distutils2: Fix incorrect test.
eric.araujo
python-checkins at python.org
Thu Oct 6 13:20:51 CEST 2011
http://hg.python.org/distutils2/rev/61b0f35818a9
changeset: 1201:61b0f35818a9
user: Éric Araujo <merwok at netwok.org>
date: Thu Oct 06 05:35:54 2011 +0200
summary:
Fix incorrect test.
The distutils2.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.
files:
distutils2/tests/test_uninstall.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/distutils2/tests/test_uninstall.py b/distutils2/tests/test_uninstall.py
--- a/distutils2/tests/test_uninstall.py
+++ b/distutils2/tests/test_uninstall.py
@@ -89,9 +89,10 @@
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()
--
Repository URL: http://hg.python.org/distutils2
More information about the Python-checkins
mailing list