Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
1ad68c6f
Commit
1ad68c6f
authored
May 19, 2013
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try doctest with full exception name
parent
16e9ae36
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
tests/api_tests.txt
tests/api_tests.txt
+14
-14
No files found.
tests/api_tests.txt
View file @
1ad68c6f
...
@@ -211,8 +211,8 @@ working set triggers a ``pkg_resources.VersionConflict`` error:
...
@@ -211,8 +211,8 @@ working set triggers a ``pkg_resources.VersionConflict`` error:
>>> ws.find(Requirement.parse("Bar==1.0")) # doctest: +NORMALIZE_WHITESPACE
>>> ws.find(Requirement.parse("Bar==1.0")) # doctest: +NORMALIZE_WHITESPACE
Traceback (most recent call last):
Traceback (most recent call last):
...
...
VersionConflict: (Bar 0.9 (http://example.com/something),
pkg_resources.
VersionConflict: (Bar 0.9 (http://example.com/something),
Requirement.parse('Bar==1.0'))
Requirement.parse('Bar==1.0'))
You can subscribe a callback function to receive notifications whenever a new
You can subscribe a callback function to receive notifications whenever a new
distribution is added to a working set. The callback is immediately invoked
distribution is added to a working set. The callback is immediately invoked
...
@@ -222,14 +222,14 @@ again for new distributions added thereafter::
...
@@ -222,14 +222,14 @@ again for new distributions added thereafter::
>>> def added(dist): print "Added", dist
>>> def added(dist): print "Added", dist
>>> ws.subscribe(added)
>>> ws.subscribe(added)
Added Bar 0.9
Added Bar 0.9
>>> foo12 = Distribution(project_name="Foo", version="1.2", location="f12")
>>> foo12 = Distribution(project_name="Foo", version="1.2", location="f12")
>>> ws.add(foo12)
>>> ws.add(foo12)
Added Foo 1.2
Added Foo 1.2
Note, however, that only the first distribution added for a given project name
Note, however, that only the first distribution added for a given project name
will trigger a callback, even during the initial ``subscribe()`` callback::
will trigger a callback, even during the initial ``subscribe()`` callback::
>>> foo14 = Distribution(project_name="Foo", version="1.4", location="f14")
>>> foo14 = Distribution(project_name="Foo", version="1.4", location="f14")
>>> ws.add(foo14) # no callback, because Foo 1.2 is already active
>>> ws.add(foo14) # no callback, because Foo 1.2 is already active
>>> ws = WorkingSet([])
>>> ws = WorkingSet([])
...
@@ -237,7 +237,7 @@ will trigger a callback, even during the initial ``subscribe()`` callback::
...
@@ -237,7 +237,7 @@ will trigger a callback, even during the initial ``subscribe()`` callback::
>>> ws.add(foo14)
>>> ws.add(foo14)
>>> ws.subscribe(added)
>>> ws.subscribe(added)
Added Foo 1.2
Added Foo 1.2
And adding a callback more than once has no effect, either::
And adding a callback more than once has no effect, either::
>>> ws.subscribe(added) # no callbacks
>>> ws.subscribe(added) # no callbacks
...
@@ -260,7 +260,7 @@ Finding Plugins
...
@@ -260,7 +260,7 @@ Finding Plugins
>>> plugins.add(foo12)
>>> plugins.add(foo12)
>>> plugins.add(foo14)
>>> plugins.add(foo14)
>>> plugins.add(just_a_test)
>>> plugins.add(just_a_test)
In the simplest case, we just get the newest version of each distribution in
In the simplest case, we just get the newest version of each distribution in
the plugin environment::
the plugin environment::
...
@@ -318,7 +318,7 @@ number does not matter::
...
@@ -318,7 +318,7 @@ number does not matter::
>>> cp("macosx-9.5-ppc", reqd)
>>> cp("macosx-9.5-ppc", reqd)
False
False
Backwards compatibility for packages made via earlier versions of
Backwards compatibility for packages made via earlier versions of
setuptools is provided as well::
setuptools is provided as well::
>>> cp("darwin-8.2.0-Power_Macintosh", reqd)
>>> cp("darwin-8.2.0-Power_Macintosh", reqd)
...
@@ -340,7 +340,7 @@ Environment Markers
...
@@ -340,7 +340,7 @@ Environment Markers
>>> print(im("sys_platform=="))
>>> print(im("sys_platform=="))
unexpected EOF while parsing (line 1)
unexpected EOF while parsing (line 1)
>>> print(im("sys_platform=='win32'"))
>>> print(im("sys_platform=='win32'"))
False
False
...
@@ -355,7 +355,7 @@ Environment Markers
...
@@ -355,7 +355,7 @@ Environment Markers
>>> print(im("os.open('foo')=='y'"))
>>> print(im("os.open('foo')=='y'"))
Language feature not supported in environment markers
Language feature not supported in environment markers
>>> print(im("'x'=='y' and os.open('foo')=='y'")) # no short-circuit!
>>> print(im("'x'=='y' and os.open('foo')=='y'")) # no short-circuit!
Language feature not supported in environment markers
Language feature not supported in environment markers
...
@@ -364,25 +364,25 @@ Environment Markers
...
@@ -364,25 +364,25 @@ Environment Markers
>>> print(im("'x' < 'y'"))
>>> print(im("'x' < 'y'"))
'<' operator not allowed in environment markers
'<' operator not allowed in environment markers
>>> print(im("'x' < 'y' < 'z'"))
>>> print(im("'x' < 'y' < 'z'"))
Chained comparison not allowed in environment markers
Chained comparison not allowed in environment markers
>>> print(im("r'x'=='x'"))
>>> print(im("r'x'=='x'"))
Only plain strings allowed in environment markers
Only plain strings allowed in environment markers
>>> print(im("'''x'''=='x'"))
>>> print(im("'''x'''=='x'"))
Only plain strings allowed in environment markers
Only plain strings allowed in environment markers
>>> print(im('"""x"""=="x"'))
>>> print(im('"""x"""=="x"'))
Only plain strings allowed in environment markers
Only plain strings allowed in environment markers
>>> print(im(r"'x\n'=='x'"))
>>> print(im(r"'x\n'=='x'"))
Only plain strings allowed in environment markers
Only plain strings allowed in environment markers
>>> print(im("os.open=='y'"))
>>> print(im("os.open=='y'"))
Language feature not supported in environment markers
Language feature not supported in environment markers
>>> em('"x"=="x"')
>>> em('"x"=="x"')
True
True
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment