- 博客(3)
- 收藏
- 关注
原创 防痴呆的:啤酒2元一瓶,四个瓶盖可换一瓶啤酒,2个空瓶也可换一瓶啤酒,10元最多可以喝多少瓶
#!/usr/bin/env python2 #-*- coding: utf-8 -*-def calculate_beer(money): total_beer = 0 first_round_num = money / 2 total_beer = +first_round_num bottle_num = first_round_num cap_num
2016-06-17 14:23:15 3535
原创 mock
Mock and MagicMock objects create all attributes and methods as you access them and store details of how they have been used. You can configure them, to specify return values or limit what attributes a
2016-06-14 18:12:35 278
原创 mock.patch.object方式写UT
### source code class L3PluginApi(object): """Agent side of the l3 agent RPC API. API version history: 1.0 - Initial version. 1.1 - Floating IP operational status updates """
2016-06-14 10:50:32 2682
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人