diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2009-09-12 19:27:15 +0200 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2009-09-12 19:27:15 +0200 |
commit | 62b9ce70f7cab7d9b1be27c5ec47c8d06377c3dd (patch) | |
tree | 5dda7ce6a3d97240d31feadba6c8d17345f9f520 /tests | |
parent | 9290e81f1018c0c80e315958cb4b2977c38a4afb (diff) | |
download | external_python_setuptools-62b9ce70f7cab7d9b1be27c5ec47c8d06377c3dd.tar.gz external_python_setuptools-62b9ce70f7cab7d9b1be27c5ec47c8d06377c3dd.tar.bz2 external_python_setuptools-62b9ce70f7cab7d9b1be27c5ec47c8d06377c3dd.zip |
Fix tests to support 3.x.
--HG--
branch : distribute
extra : rebase_source : e3cf4ce257e2a7969753e386c2b4bd9f654cb7fc
Diffstat (limited to 'tests')
-rw-r--r-- | tests/api_tests.txt | 12 |
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 |