Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Lib/test/test_pstats.py

    r2 r391  
    1111        """pstats.add_callers should combine the call results of both target
    1212        and source by adding the call time. See issue1269."""
     13        # new format: used by the cProfile module
    1314        target = {"a": (1, 2, 3, 4)}
    1415        source = {"a": (1, 2, 3, 4), "b": (5, 6, 7, 8)}
    1516        new_callers = pstats.add_callers(target, source)
    1617        self.assertEqual(new_callers, {'a': (2, 4, 6, 8), 'b': (5, 6, 7, 8)})
     18        # old format: used by the profile module
     19        target = {"a": 1}
     20        source = {"a": 1, "b": 5}
     21        new_callers = pstats.add_callers(target, source)
     22        self.assertEqual(new_callers, {'a': 2, 'b': 5})
    1723
    1824
Note: See TracChangeset for help on using the changeset viewer.