python写单元大多数都会用到unittest和mock,测试代码覆盖率都会用到coverage,最后再用nose把所有的东西都串起来,这样每次出版本,都能把整个项目的单元测试都运行一遍。Unittestunittest就不详细介绍了,注意几点:测试类继承unittest.TestCase测试类、...
分类:
编程语言 时间:
2014-05-21 20:27:47
阅读次数:
413
本章涉及Selenium WebDriver的所有接口。 Recommended Import
Style 推荐的导入风格如下:from selenium import webdriver
然后,你可以这样访问所有的类:webdriver.Firefoxwebdriver.FirefoxP...
分类:
编程语言 时间:
2014-05-21 19:50:51
阅读次数:
435
2-2.程序输出。阅读下面的Python脚本。#!/usr/bin/env python1 + 2 *
4(a)你认为这段脚本是用来做什么的?(b)你认为这段脚本会输出什么?(c)输入以上代码,并保存为脚本,然后运行它,它所做的与你的预期一样吗?为什么一样/不一样?(d)这段代码单独执行和在交互解释...
分类:
编程语言 时间:
2014-05-21 19:43:18
阅读次数:
305
Reverse a linked list from positionmton. Do it
in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m=
2 andn= 4,return1->4->3->2->5->NULL.No...
分类:
其他好文 时间:
2014-05-21 19:08:08
阅读次数:
195
相信很多朋友都曾在windows上做过web开发,我们常用的Web应用程序平台是:Apache+Mysql+Perl/PHP/Python,在windows下集成称为WAMP。web开发新手有时候由于不太熟悉linux下的操作,总希望能在windows上做开发,wamp便是利器。
有了集成的we.....
什么是 self ? 它是类实例自身的引用。其他语言通常使用一个名为 this 的标识符
--《Python核心编程》如何定义类: class ClassName(base_class[es]): (1) "optional
documentation s...
分类:
编程语言 时间:
2014-05-21 18:50:01
阅读次数:
304
Collection├List│├LinkedList│├ArrayList│└Vector│ └Stack└SetMap├Hashtable├HashMap└WeakHashMapCollection接口
Collection是最基本的集合接口,一个Collection代表一组Object,即C....
分类:
其他好文 时间:
2014-05-21 18:21:04
阅读次数:
219
描述list layout item有上倒下依次显示的代码实现形式
LayoutAnimation2.java
/*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may no...
分类:
其他好文 时间:
2014-05-21 09:02:15
阅读次数:
250
介绍list item倒序显示
LayoutAnimation3.java
/*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file e...
分类:
其他好文 时间:
2014-05-21 08:25:44
阅读次数:
278