aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authortarek <none@none>2009-09-20 14:48:47 +0200
committertarek <none@none>2009-09-20 14:48:47 +0200
commitba84419dfc63e5f535faead38ee9fb60306a079c (patch)
treec489fe218f0e43d14f3a9e8f8c14517439d4fde0 /tests
parent1219c326683905695fbdf60c22367129075d2f8d (diff)
parent95159c09e5bb2d1dc1f0ccf89ccbe90ecc6871a0 (diff)
downloadexternal_python_setuptools-ba84419dfc63e5f535faead38ee9fb60306a079c.tar.gz
external_python_setuptools-ba84419dfc63e5f535faead38ee9fb60306a079c.tar.bz2
external_python_setuptools-ba84419dfc63e5f535faead38ee9fb60306a079c.zip
merge dance
--HG-- branch : distribute extra : rebase_source : e0fc1e252a506a6a751f9557d4a01580e1cbbdfa
Diffstat (limited to 'tests')
-rw-r--r--tests/api_tests.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/api_tests.txt b/tests/api_tests.txt
index 823d815f..6cf6e66f 100644
--- a/tests/api_tests.txt
+++ b/tests/api_tests.txt
@@ -119,7 +119,7 @@ editing are also a Distribution. (And, with a little attention to the
directory names used, and including some additional metadata, such a
"development distribution" can be made pluggable as well.)
- >>> from pkg_resources import WorkingSet
+ >>> from pkg_resources import WorkingSet, VersionConflict
A working set's entries are the sys.path entries that correspond to the active
distributions. By default, the working set's entries are the items on
@@ -208,11 +208,11 @@ You can ask a WorkingSet to ``find()`` a distribution matching a requirement::
Note that asking for a conflicting version of a distribution already in a
working set triggers a ``pkg_resources.VersionConflict`` error:
- >>> ws.find(Requirement.parse("Bar==1.0")) # doctest: +NORMALIZE_WHITESPACE
- Traceback (most recent call last):
- ...
- VersionConflict: (Bar 0.9 (http://example.com/something),
- Requirement.parse('Bar==1.0'))
+ >>> try:
+ ... ws.find(Requirement.parse("Bar==1.0"))
+ ... except VersionConflict:
+ ... print 'ok'
+ ok
You can subscribe a callback function to receive notifications whenever a new
distribution is added to a working set. The callback is immediately invoked