def test():
    from spyderlib.utils.qthelpers import qapplication
    app = qapplication()
    widget = MemoryProfilerWidget(None)
    widget.resize(800, 600)
    widget.show()
    widget.analyze(osp.normpath(osp.join(osp.dirname(__file__), os.pardir,
                                         'tests/profiling_test_script.py')),
                   use_colors=True)
    sys.exit(app.exec_())
Run widget test
dataset/ETHPy150Open Nodd/spyder_line_profiler/widgets/memoryprofilergui.py/test