摘要: python在安装时,默认的编码是ascii,当程序中出现非ascii编码时,python的处理常常会报这样的错UnicodeDecodeError: 'ascii' codec can't decode byte 0x?? in position 1: ordinal not in range(128),python没办法处理非ascii编码的,此时需要自己设置将python的默认编码,一般设置为utf8的编码格式。查询系统默认编码可以在解释器中输入以下命令: sys.getdefaultencoding() 设置默认编码时使用: sys.setdefaultenco 阅读全文
posted @ 2012-11-09 16:55 rilley 阅读(821) 评论(0) 推荐(0) 编辑
摘要: TestNG annotaion:@DataProvider@ExpectedExceptions@Factory@Test@Parameters<suite name="ParametersTest"> <test name="Regression1"> <classes> <class name="com.example.ParameterSample" /> <class name="com.example.ParameterTest"> <m 阅读全文
posted @ 2012-11-09 16:09 rilley 阅读(4371) 评论(0) 推荐(0) 编辑