Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我使用其中任何一个时:
inspect.getsource(someObj)
或者
__file__
这两个在没有 pytest 的情况下可以正常工作,但是当使用 pytest 运行相同的代码时会失败。有任何想法吗?
谢谢!