Magnolia's Blog

持续成长


  • Home

  • About

  • Tags

  • Categories

  • Archives

  • Search

Python中的类属性、类方法

Posted on 2019-08-18 | In 技术 , Python
类属性和实例属性,类方法和实例方法
Read more »

Python装饰器的理解和应用

Posted on 2019-08-17 | In 技术 , Python
装饰器的使用,是否包含参数,类装饰器,偏函数,偏函数结合类装饰器
Read more »

Python函数式编程之高阶函数

Posted on 2019-08-17 | In 技术 , Python
变量指向函数,map、reduce、filter高阶函数,匿名函数
Read more »

Python TypeError can't create a consistent method resolution

Posted on 2019-08-11 | In 技术 , Python
今天在学习使用Ctrl+H、Ctrl+Shift+H的用处时,随便写了几个类的继承举例来测试,结果运行一下出现报错了TypeError: Cannot create a consistent method resolution无法创建一致的方法解析 修正后代码截图如下:定位到报错的位置,改了一些继承 ...
Read more »

Python中的几种拷贝方式

Posted on 2019-08-03 | In 技术 , Python
拷贝的主要实现方式:赋值、copy模块、列表切片、字典copy()
Read more »

必不可少的Pycharm技能:极大提升效率的快捷键

Posted on 2019-08-03 | In 生产力 , 工具
掌握常用的快捷键,可以极大地提高工作效率。
Read more »

pytest06 MonkeyPatching/Mocking module/environment

Posted on 2019-07-28 | In 技术 , pytest
有时测试需要调用依赖于全局设置的功能,或者调用不容易测试的代码(如网络访问)。这个 monkeypatch fixture帮助您安全地设置/删除属性、字典项或环境变量,或修改 sys.path 用于导入。 这个 monkeypatch fixture为测试中的安全修补和模拟功能提供了以下帮 ...
Read more »

pytest05 Marking test functions with attributes

Posted on 2019-07-28 | In 技术 , pytest
通过使用 pytest.mark 可以帮助你轻松地在测试函数上设置元数据。一些内置标记,例如: skip - 总是跳过测试函数 skipif - 如果满足某个条件,则跳过测试函数 xfail - 如果满足某个条件,则产生“预期失败”结果 parametrize 对同一测试函数执行多个调用 很容易 ...
Read more »

pytest04 fixtures explicit, modular, scalable

Posted on 2019-06-23 | In 技术 , pytest
Pytest 固件:显式、模块化、可扩展 purpose of test fixtures 是提供一个固定的基线,在此基础上测试可以可靠地重复执行。Pytest 固件比传统的XUnit 的setup/teardown功能提供了显著的改进: 固件有明确的名称,通过声明它们在测试函数、模块、 ...
Read more »

pytest03 The writing and reporting of assertions in tests

Posted on 2019-06-16 | In 技术 , pytest
断言,pytest.raises,pytest.mark.xfail,pytest_assertrepr_compare,断言自省详细信息,禁用断言重写
Read more »
1…9101112
Magnolia

Magnolia

Python/测试开发

120 posts
24 categories
37 tags
CSDN Gitee GitHub E-Mail
© 2025 Magnolia
Powered by Hexo
|
Theme — NexT.Gemini v5.1.4
0%