Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c85c74c

Browse files
committed
Increase code coverage in Python/structmember.c from 33% to 40%
(by forcing a call to the listmember() function).
1 parent 690402f commit c85c74c

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Lib/test/test_traceback.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@ def test():
8585
os.unlink(os.path.join(testdir, f))
8686
os.rmdir(testdir)
8787

88+
def test_members(self):
89+
# Covers Python/structmember.c::listmembers()
90+
try:
91+
1/0
92+
except:
93+
import sys
94+
sys.exc_traceback.__members__
95+
8896
def test_main():
8997
run_unittest(TracebackCases)
9098

0 commit comments

Comments
 (0)