Commits

Lennart Regebro committed 5a8b111

Adding patch from the Python 3.0 effort.

  • Participants
  • Parent commits b9ae1f7
  • Branches regebro-python3

Comments (0)

Files changed (17)

File api_tests.txt

 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'))
+    >>> from pkg_resources import VersionConflict
+    >>> try:
+    ...     ws.find(Requirement.parse("Bar==1.0")) # doctest: +NORMALIZE_WHITESPACE
+    ...     print "Expected VersionConflict, got nothing"
+    ... except VersionConflict, e:
+    ...     print e.args
+    (Bar 0.9 (http://example.com/something), Requirement.parse('Bar==1.0'))
 
 You can subscribe a callback function to receive notifications whenever a new
 distribution is added to a working set.  The callback is immediately invoked