Пример #1
0
 def test_extract_frame_info_frames_missing(self):
     info = ['4', '12', 'msvcr100.dll', '_callthreadstartex',
             'f:\\src\\threadex.c', '314', '0x6']
     d = DotDict()
     bpj._extract_frame_info(info, d)
     assert 'threads' in d
     assert len(d.threads) == 5
     expected = {
         "frame_count": 1,
         "frames": [
             {
                 "frame": 12,
                 "module": 'msvcr100.dll',
                 "function": '_callthreadstartex',
                 "file": 'f:\\src\\threadex.c',
                 "line": 314,
             }
         ]
     }
     assert d.threads[4] == expected
 def test_extract_frame_info_frames_missing(self):
     info = ["4", "12", "msvcr100.dll", "_callthreadstartex", "f:\\src\\threadex.c", "314", "0x6"]
     d = DotDict()
     bpj._extract_frame_info(info, d)
     self.assertTrue("threads" in d)
     self.assertEqual(len(d.threads), 5)
     self.assertEqual(
         d.threads[4],
         {
             "frame_count": 1,
             "frames": [
                 {
                     "frame": 12,
                     "module": "msvcr100.dll",
                     "function": "_callthreadstartex",
                     "file": "f:\\src\\threadex.c",
                     "line": 314,
                 }
             ],
         },
     )
Пример #3
0
 def test_extract_frame_info_frames_missing(self):
     info = ['4', '12', 'msvcr100.dll', '_callthreadstartex',
             'f:\\src\\threadex.c', '314', '0x6']
     d = DotDict()
     bpj._extract_frame_info(info, d)
     ok_('threads' in d)
     eq_(len(d.threads), 5)
     eq_(
         d.threads[4],
         {
             "frame_count": 1,
             "frames": [
                 {
                     "frame": 12,
                     "module": 'msvcr100.dll',
                     "function": '_callthreadstartex',
                     "file": 'f:\\src\\threadex.c',
                     "line": 314,
                 }
             ]
         }
     )
Пример #4
0
 def test_extract_frame_inf(self):
     info = ['0', '12', 'msvcr100.dll', '_callthreadstartex',
             'f:\\src\\threadex.c', '314', '0x6']
     d = DotDict()
     bpj._extract_frame_info(info, d)
     self.assertTrue('threads' in d)
     self.assertEqual(len(d.threads), 1)
     self.assertEqual(
         d.threads[0],
         {
             "frame_count": 1,
             "frames": [
                 {
                     "frame": 12,
                     "module": 'msvcr100.dll',
                     "function": '_callthreadstartex',
                     "file": 'f:\\src\\threadex.c',
                     "line": 314,
                 }
             ]
         }
     )