5

假设我写了一个class类似于dict. 我希望它通过标准dict通过的相同单元测试,可能还有一些修改。

我在哪里可以找到该代码?

4

2 回答 2

4

Python 测试包含在 Python 源代码中,位于Lib/test

http://hg.python.org/releasing/2.7.4/file/9290822f2280/Lib/test/test_dict.py http://hg.python.org/releasing/3.3.1/file/8e5812b35480/Lib/test /test_dict.py

于 2013-04-07T23:29:40.167 回答
1

为了建立在 Pavel 的答案之上,看起来 python现在正在使用 mercurial

http://hg.python.org/releasing/2.7.3/file/7bb96963d067/Lib/test/test_dict.py

对于其他测试,请访问

http://hg.python.org/

单击releasing/<python version>> browse(在左侧菜单上)> 导航到相应的测试。hg.python.org 的结构类似于 svn.python.org。

于 2013-04-07T23:37:34.027 回答