diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2011-06-21 08:11:40 +0100 |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2011-06-21 08:11:40 +0100 |
commit | e65d621e1661512a4bcfb7d9a5320d3faa96aebe (patch) | |
tree | 4670ceebdcbdc773f851d6f117393abfb0cad588 /tests | |
parent | 58a658b26d1c95b31d02050dcccd648d2e4ce27b (diff) | |
download | python-setuptools-git-e65d621e1661512a4bcfb7d9a5320d3faa96aebe.tar.gz |
Fixed some bugs - tests now all pass under Python 3.3.
--HG--
branch : distribute
extra : rebase_source : 3498bfdc0d4c15e4276673b52e924c461ca353f0
Diffstat (limited to 'tests')
-rw-r--r-- | tests/api_tests.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/api_tests.txt b/tests/api_tests.txt index 6cf6e66f..c2e63b24 100644 --- a/tests/api_tests.txt +++ b/tests/api_tests.txt @@ -39,7 +39,7 @@ Distributions have various introspectable attributes:: >>> dist.py_version == sys.version[:3] True - >>> print dist.platform + >>> print(dist.platform) None Including various computed attributes:: @@ -199,7 +199,7 @@ shows up once when iterating the working set: You can ask a WorkingSet to ``find()`` a distribution matching a requirement:: >>> from pkg_resources import Requirement - >>> print ws.find(Requirement.parse("Foo==1.0")) # no match, return None + >>> print(ws.find(Requirement.parse("Foo==1.0"))) # no match, return None None >>> ws.find(Requirement.parse("Bar==0.9")) # match, return distribution @@ -211,7 +211,7 @@ working set triggers a ``pkg_resources.VersionConflict`` error: >>> try: ... ws.find(Requirement.parse("Bar==1.0")) ... except VersionConflict: - ... print 'ok' + ... print('ok') ok You can subscribe a callback function to receive notifications whenever a new @@ -219,7 +219,7 @@ distribution is added to a working set. The callback is immediately invoked once for each existing distribution in the working set, and then is called again for new distributions added thereafter:: - >>> def added(dist): print "Added", dist + >>> def added(dist): print("Added", dist) >>> ws.subscribe(added) Added Bar 0.9 >>> foo12 = Distribution(project_name="Foo", version="1.2", location="f12") |