提交 67898e2e authored 作者: Jeremiah Lowin's avatar Jeremiah Lowin

look one step later to account for one extra function call in dot; fixes unit test

上级 8ba7b59a
...@@ -244,7 +244,7 @@ class TestComputeTestValue(unittest.TestCase): ...@@ -244,7 +244,7 @@ class TestComputeTestValue(unittest.TestCase):
# Get traceback # Get traceback
tb = sys.exc_info()[2] tb = sys.exc_info()[2]
# Get frame info 3 layers up # Get frame info 3 layers up
frame_info = traceback.extract_tb(tb)[-4] frame_info = traceback.extract_tb(tb)[-5]
# We should be in the "fx" function defined above # We should be in the "fx" function defined above
assert os.path.split(frame_info[0])[1] == 'test_compute_test_value.py' assert os.path.split(frame_info[0])[1] == 'test_compute_test_value.py'
assert frame_info[2] == 'fx' assert frame_info[2] == 'fx'
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论