Ejemplo n.º 1
0
    def test_main(self):
        temp_dir = mkdtemp()
        try:
            dump_dir = os.path.join(temp_dir, "dump")

            try:
                raise Exception("foo")
            except Exception:
                dump_to_disk(dump_dir, sys.exc_info())

            assert len(os.listdir(dump_dir)) == 1
        finally:
            shutil.rmtree(temp_dir)
Ejemplo n.º 2
0
    def test_main(self):
        temp_dir = mkdtemp()
        try:
            dump_dir = os.path.join(temp_dir, "dump")

            try:
                raise Exception("foo")
            except Exception:
                dump_to_disk(dump_dir, sys.exc_info())

            assert len(os.listdir(dump_dir)) == 1
        finally:
            shutil.rmtree(temp_dir)