mirror of
https://github.com/python/cpython.git
synced 2025-08-29 13:15:11 +00:00
Increase code coverage in Python/structmember.c from 33% to 40%
(by forcing a call to the listmember() function).
This commit is contained in:
parent
690402ff17
commit
c85c74cd08
1 changed files with 8 additions and 0 deletions
|
@ -85,6 +85,14 @@ def test():
|
||||||
os.unlink(os.path.join(testdir, f))
|
os.unlink(os.path.join(testdir, f))
|
||||||
os.rmdir(testdir)
|
os.rmdir(testdir)
|
||||||
|
|
||||||
|
def test_members(self):
|
||||||
|
# Covers Python/structmember.c::listmembers()
|
||||||
|
try:
|
||||||
|
1/0
|
||||||
|
except:
|
||||||
|
import sys
|
||||||
|
sys.exc_traceback.__members__
|
||||||
|
|
||||||
def test_main():
|
def test_main():
|
||||||
run_unittest(TracebackCases)
|
run_unittest(TracebackCases)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue