summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2005-11-18 16:51:05 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2005-11-18 16:51:05 (GMT)
commitc85c74cd08f619b69a61a0290c660d642a15e9d3 (patch)
treed64d440074dc2fe1b3be383738d00689df665626 /Lib
parent690402ff170abfc9b24269aa7db923eddf60e607 (diff)
downloadcpython-c85c74cd08f619b69a61a0290c660d642a15e9d3.zip
cpython-c85c74cd08f619b69a61a0290c660d642a15e9d3.tar.gz
cpython-c85c74cd08f619b69a61a0290c660d642a15e9d3.tar.bz2
Increase code coverage in Python/structmember.c from 33% to 40%
(by forcing a call to the listmember() function).
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_traceback.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py
index 17ed022..29a120f 100644
--- a/Lib/test/test_traceback.py
+++ b/Lib/test/test_traceback.py
@@ -85,6 +85,14 @@ def test():
os.unlink(os.path.join(testdir, f))
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():
run_unittest(TracebackCases)