File: test_mprof.py

package info (click to toggle)
python-memory-profiler 0.61-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 540 kB
  • sloc: python: 2,220; makefile: 33
file content (20 lines) | stat: -rw-r--r-- 463 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import unittest

import mprof

class Test_function_labels(unittest.TestCase):
    def test(self):
        expected = {
            "x.z": "z",
            "x.y": "y",
            "x.b": "x.b",
            "f.a.b": "f.a.b",
            "g.a.b": "g.a.b",
            "g.a.c": "a.c",
            "b.c": "b.c",
        }
        result = mprof.function_labels(expected.keys())
        self.assertEqual(expected,result)

if __name__ == "__main__":
    unittest.main()