Ai
3 Star 6 Fork 0

Gitee 极速下载/viztracer

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/gaogaotiantian/viztracer
克隆/下载
test_jupyter.py 812 Bytes
一键复制 编辑 原始数据 按行查看 历史
Tian Gao 提交于 2023-06-26 07:13 +08:00 . Some code cleanups and python 3 adjustments (#350)
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://github.com/gaogaotiantian/viztracer/blob/master/NOTICE.txt
import os
from .base_tmpl import BaseTmpl
class TestJupyter(BaseTmpl):
def setUp(self):
super().setUp()
try:
from IPython.terminal.interactiveshell import \
TerminalInteractiveShell
self.ip = TerminalInteractiveShell.instance()
except ImportError:
self.skipTest("No Jupyter, skip Jupyter test")
def test_cellmagic(self):
self.ip.run_line_magic("load_ext", "viztracer")
self.ip.run_cell_magic(magic_name="viztracer", line="", cell="print(1)")
self.assertFileExists("./viztracer_report.json")
os.remove("./viztracer_report.json")
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C/C++
1
https://gitee.com/mirrors/viztracer.git
git@gitee.com:mirrors/viztracer.git
mirrors
viztracer
viztracer
master

搜索帮助