| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Unittests for the core backends modules.""" |
| 7 |
| 6 import logging | 8 import logging |
| 7 import os | 9 import os |
| 8 import sys | 10 import sys |
| 9 import unittest | 11 import unittest |
| 10 | 12 |
| 11 sys.path.append(os.path.abspath(os.path.join(__file__, os.pardir, os.pardir))) | 13 sys.path.append(os.path.abspath(os.path.join(__file__, os.pardir, os.pardir))) |
| 12 | 14 |
| 13 from memory_inspector.core import backends | 15 from memory_inspector.core import backends |
| 14 from memory_inspector.core import memory_map | 16 from memory_inspector.core import memory_map |
| 15 from memory_inspector.core import stacktrace | 17 from memory_inspector.core import stacktrace |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 st.Add(frame_2) | 106 st.Add(frame_2) |
| 105 st.Add(frame_1) | 107 st.Add(frame_1) |
| 106 self.assertEqual(st.depth, 4) | 108 self.assertEqual(st.depth, 4) |
| 107 | 109 |
| 108 | 110 |
| 109 if __name__ == '__main__': | 111 if __name__ == '__main__': |
| 110 logging.basicConfig( | 112 logging.basicConfig( |
| 111 level=logging.DEBUG if '-v' in sys.argv else logging.ERROR, | 113 level=logging.DEBUG if '-v' in sys.argv else logging.ERROR, |
| 112 format='%(levelname)5s %(filename)15s(%(lineno)3d): %(message)s') | 114 format='%(levelname)5s %(filename)15s(%(lineno)3d): %(message)s') |
| 113 unittest.main() | 115 unittest.main() |
| OLD | NEW |