~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Lib/test/test_sys.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-04-08 02:29:05 UTC
  • mto: (10.1.3 experimental)
  • mto: This revision was merged to the branch mainline in revision 23.
  • Revision ID: james.westby@ubuntu.com-20090408022905-xa5zbe8821m2o77o
Tags: upstream-2.6.2~rc1
ImportĀ upstreamĀ versionĀ 2.6.2~rc1

Show diffs side-by-side

added added

removed removed

Lines of Context:
221
221
            sys.setdlopenflags(oldflags)
222
222
 
223
223
    def test_refcount(self):
 
224
        # n here must be a global in order for this test to pass while
 
225
        # tracing with a python function.  Tracing calls PyFrame_FastToLocals
 
226
        # which will add a copy of any locals to the frame object, causing
 
227
        # the reference count to increase by 2 instead of 1.
 
228
        global n
224
229
        self.assertRaises(TypeError, sys.getrefcount)
225
230
        c = sys.getrefcount(None)
226
231
        n = None