[popexizhi: 直接转到unittest 的使用,配合最近在看的unittest之java,了解python的unittest 模块使用的]
[原]P198
Now that the unit tests are complete, it's time to start writing the code that the test cases are attempting to test. You're going to do this in stages, so you can see all the unit tests fail, then watch them pass one by one as you fill in the gaps in roman.py.
[pope改进译]
单元测试先已完整,是写被测代码之时了。君计划分段完成,此时所见全部单元测试之失效,将在roman.py分段完成中步步通过。
[pope译]
现在单元测试介绍完全了,是开始写测试用例的测试代码的时间了。你计划从这开始,开始时看到全部的单元测试的失败,当你在roman.py充填到对应的内容后,就可以看着它们一个个通过测试了。
[net 译:http://woodpecker.org.cn/diveintopython/unit_testing/stage_1.html ]
到目前为止,单元测试已经完成,是时候开始编写被单元测试测试的代码了。你将分阶段地完成这个工作,因此开始时所有的单元测试都是失败的,但在逐步完成 roman.py 的同时你会看到它们一个个地通过测试
[popexizhi]
now that the unit tests are complete
[pope译]现在单元测试介绍完全了
[net译]到目前为止,单元测试已经完成
[popexizhi] are complete 就是完成 ,没有介绍,pope臆断了。
writing code that the test cases are attempting to test
[pope译]写测试用例的测试代码
[net 译]编写被单元测试测试的代码
[popexizhi] that 从句说明 code ,就是被测试的代码,pope翻译中没有使用被动句读来很不流畅
you're going to do this in stages
[pope译]你计划从这开始
[net译]你将分阶段地完成这个工作
[popexizhi] in stages 就是分剧分段完成,这个pope没翻译
then watch them pass ono by one as you fill in the gaps in roman.py
[pope译]当你在roman.py充填到对应的内容后,就可以看着它们一个个通过测试了。
[net译]但在逐步完成 roman.py 的同时你会看到它们一个个地通过测试
[popexizhi]fill in the gaps 本就是在空白处充填的意思,但net 译中把形容pass 的one by one 互文翻译了一下“逐步”添加到fill in the gaps的内容中,让译文读来更为流畅,赞一个。
[原]P198
Now that the unit tests are complete, it's time to start writing the code that the test cases are attempting to test. You're going to do this in stages, so you can see all the unit tests fail, then watch them pass one by one as you fill in the gaps in roman.py.
[pope改进译]
单元测试先已完整,是写被测代码之时了。君计划分段完成,此时所见全部单元测试之失效,将在roman.py分段完成中步步通过。
[pope译]
现在单元测试介绍完全了,是开始写测试用例的测试代码的时间了。你计划从这开始,开始时看到全部的单元测试的失败,当你在roman.py充填到对应的内容后,就可以看着它们一个个通过测试了。
[net 译:http://woodpecker.org.cn/diveintopython/unit_testing/stage_1.html ]
到目前为止,单元测试已经完成,是时候开始编写被单元测试测试的代码了。你将分阶段地完成这个工作,因此开始时所有的单元测试都是失败的,但在逐步完成 roman.py 的同时你会看到它们一个个地通过测试
[popexizhi]
now that the unit tests are complete
[pope译]现在单元测试介绍完全了
[net译]到目前为止,单元测试已经完成
[popexizhi] are complete 就是完成 ,没有介绍,pope臆断了。
writing code that the test cases are attempting to test
[pope译]写测试用例的测试代码
[net 译]编写被单元测试测试的代码
[popexizhi] that 从句说明 code ,就是被测试的代码,pope翻译中没有使用被动句读来很不流畅
you're going to do this in stages
[pope译]你计划从这开始
[net译]你将分阶段地完成这个工作
[popexizhi] in stages 就是分剧分段完成,这个pope没翻译
then watch them pass ono by one as you fill in the gaps in roman.py
[pope译]当你在roman.py充填到对应的内容后,就可以看着它们一个个通过测试了。
[net译]但在逐步完成 roman.py 的同时你会看到它们一个个地通过测试
[popexizhi]fill in the gaps 本就是在空白处充填的意思,但net 译中把形容pass 的one by one 互文翻译了一下“逐步”添加到fill in the gaps的内容中,让译文读来更为流畅,赞一个。
没有评论:
发表评论