Beispiel #1
0
 def test_invalid_text(self):
     """Test parse_fatal_stacktrace with an invalid text."""
     text = INVALID_CRASH_TEXT.strip().replace('_', ' ')
     typ, func = crashdialog.parse_fatal_stacktrace(text)
     self.assertEqual(typ, '')
     self.assertEqual(func, '')
def test_parse_fatal_stacktrace(text, typ, func):
    text = text.strip().replace('_', ' ')
    assert crashdialog.parse_fatal_stacktrace(text) == (typ, func)
Beispiel #3
0
 def test_valid_text_thread(self):
     """Test parse_fatal_stacktrace with a valid text #2."""
     text = VALID_CRASH_TEXT_THREAD.strip().replace('_', ' ')
     typ, func = crashdialog.parse_fatal_stacktrace(text)
     self.assertEqual(typ, "Segmentation fault")
     self.assertEqual(func, 'testfunc')
Beispiel #4
0
 def test_valid_text_empty(self):
     """Test parse_fatal_stacktrace with a valid text but empty function."""
     text = VALID_CRASH_TEXT_EMPTY.strip().replace('_', ' ')
     typ, func = crashdialog.parse_fatal_stacktrace(text)
     self.assertEqual(typ, 'Aborted')
     self.assertEqual(func, '')
Beispiel #5
0
 def test_valid_text_empty(self):
     """Test parse_fatal_stacktrace with a valid text but empty function."""
     text = VALID_CRASH_TEXT_EMPTY.strip().replace('_', ' ')
     typ, func = crashdialog.parse_fatal_stacktrace(text)
     assert (typ, func) == ('Aborted', '')
Beispiel #6
0
 def test_invalid_text(self):
     """Test parse_fatal_stacktrace with an invalid text."""
     text = INVALID_CRASH_TEXT.strip().replace('_', ' ')
     typ, func = crashdialog.parse_fatal_stacktrace(text)
     assert (typ, func) == ('', '')
Beispiel #7
0
 def test_valid_text(self):
     """Test parse_fatal_stacktrace with a valid text."""
     text = VALID_CRASH_TEXT.strip().replace('_', ' ')
     typ, func = crashdialog.parse_fatal_stacktrace(text)
     self.assertEqual(typ, "Segmentation fault")
     self.assertEqual(func, 'testfunc')
Beispiel #8
0
 def test_valid_text_thread(self):
     """Test parse_fatal_stacktrace with a valid text #2."""
     text = VALID_CRASH_TEXT_THREAD.strip().replace('_', ' ')
     typ, func = crashdialog.parse_fatal_stacktrace(text)
     assert (typ, func) == ("Segmentation fault", 'testfunc')
Beispiel #9
0
 def test_valid_text(self):
     """Test parse_fatal_stacktrace with a valid text."""
     text = VALID_CRASH_TEXT.strip().replace('_', ' ')
     typ, func = crashdialog.parse_fatal_stacktrace(text)
     assert (typ, func) == ("Segmentation fault", 'testfunc')
def test_parse_fatal_stacktrace(text, typ, func):
    text = text.strip().replace('_', ' ')
    assert crashdialog.parse_fatal_stacktrace(text) == (typ, func)
 def test_invalid_text(self):
     """Test parse_fatal_stacktrace with an invalid text."""
     text = INVALID_CRASH_TEXT.strip().replace("_", " ")
     typ, func = crashdialog.parse_fatal_stacktrace(text)
     assert (typ, func) == ("", "")
 def test_valid_text_empty(self):
     """Test parse_fatal_stacktrace with a valid text but empty function."""
     text = VALID_CRASH_TEXT_EMPTY.strip().replace("_", " ")
     typ, func = crashdialog.parse_fatal_stacktrace(text)
     assert (typ, func) == ("Aborted", "")
 def test_valid_text_thread(self):
     """Test parse_fatal_stacktrace with a valid text #2."""
     text = VALID_CRASH_TEXT_THREAD.strip().replace("_", " ")
     typ, func = crashdialog.parse_fatal_stacktrace(text)
     assert (typ, func) == ("Segmentation fault", "testfunc")