import unittest

from simpleflow.utils import format_exc


class MyTestCase(unittest.TestCase):
    def test_format_final_exc_line(self):
        line = None
        try:
            1/0
        except Exception as e:
            line = format_exc(e)
        self.assertEqual("ZeroDivisionError: division by zero", line)

        try:
            {}[1]
        except Exception as e:
            line = format_exc(e)
        self.assertEqual("KeyError: 1", line)


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

import unittest

from simpleflow.utils import format_exc


class MyTestCase(unittest.TestCase):
    def test_format_final_exc_line(self):
        line = None
        try:
            {}[1]
        except Exception as e:
            line = format_exc(e)
        self.assertEqual("KeyError: 1", line)


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

Remove version-specific exception text test
Remove version-specific exception text test

Signed-off-by: Yves Bastide <3b1fe340dba76bf37270abad774f327f50b5e1d8@botify.com>
