Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
9b676022
Commit
9b676022
authored
Aug 21, 2008
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move test to a better location
parent
f9aefce6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
21 deletions
+22
-21
Lib/test/test_exceptions.py
Lib/test/test_exceptions.py
+0
-21
Lib/test/test_raise.py
Lib/test/test_raise.py
+22
-0
No files found.
Lib/test/test_exceptions.py
View file @
9b676022
...
...
@@ -564,27 +564,6 @@ class ExceptionTests(unittest.TestCase):
pass
self
.
assertEquals
(
e
,
(
None
,
None
,
None
))
def
test_3118
(
self
):
def
gen
():
try
:
yield
1
finally
:
pass
def
f
():
g
=
gen
()
next
(
g
)
try
:
try
:
raise
ValueError
except
:
del
g
raise
KeyError
except
Exception
as
e
:
self
.
assert_
(
isinstance
(
e
.
__context__
,
ValueError
))
f
()
def
test_badisinstance
(
self
):
# Bug #2542: if issubclass(e, MyException) raises an exception,
...
...
Lib/test/test_raise.py
View file @
9b676022
...
...
@@ -302,6 +302,28 @@ class TestContext(unittest.TestCase):
except
NameError
as
e
:
self
.
failUnless
(
e
.
__context__
.
__context__
is
None
)
def
test_3118
(
self
):
# deleting the generator caused the __context__ to be cleared
def
gen
():
try
:
yield
1
finally
:
pass
def
f
():
g
=
gen
()
next
(
g
)
try
:
try
:
raise
ValueError
except
:
del
g
raise
KeyError
except
Exception
as
e
:
self
.
assert_
(
isinstance
(
e
.
__context__
,
ValueError
))
f
()
class
TestRemovedFunctionality
(
unittest
.
TestCase
):
def
test_tuples
(
self
):
...
...
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