~ubuntu-branches/debian/sid/meliae/sid

« back to all changes in this revision

Viewing changes to meliae/tests/test__scanner.py

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij
  • Date: 2010-07-20 18:26:22 UTC
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20100720182622-b0ks0nu34mify1lj
Tags: upstream-0.2.1
ImportĀ upstreamĀ versionĀ 0.2.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2009 Canonical Ltd
 
1
# Copyright (C) 2009, 2010 Canonical Ltd
2
2
3
3
# This program is free software: you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License version 3 as
267
267
        content.append(', "value": "False"')
268
268
    elif isinstance(obj, int):
269
269
        content.append(', "value": %d' % (obj,))
 
270
    elif isinstance(obj, types.FrameType):
 
271
        content.append(', "value": "%s"' % (obj.f_code.co_name,))
270
272
    first = True
271
273
    content.append(', "refs": [')
272
274
    ref_strs = []
475
477
        self.assertDumpInfo(True)
476
478
        self.assertDumpInfo(False)
477
479
 
 
480
    def test_frame(self):
 
481
        def local_frame():
 
482
            f = sys._getframe()
 
483
            return f
 
484
        f = local_frame()
 
485
        self.assertDumpInfo(f)
 
486
 
478
487
 
479
488
class TestGetReferents(tests.TestCase):
480
489