V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
chenqh
V2EX  ›  Python

关于 py 单元测试 测试案例的继承问题

  •  
  •   chenqh · 2020-12-18 23:54:04 +08:00 · 1368 次点击
    这是一个创建于 1221 天前的主题,其中的信息可能已经有所发展或是发生改变。

    现在又 TestA 和 TestB 两个类,两个都继承自 TestMixin,其中, TestMixin 大概有 test_case_a, 和 test_case_b, 但是怎么跑起来的时候感觉好像 TestA 没有运行 TestMixin 里面的 test_case_a 呢?

    3 条回复    2020-12-19 11:16:43 +08:00
    abersheeran
        1
    abersheeran  
       2020-12-18 23:59:59 +08:00
    说框架、完整的继承链。还有,别自己感觉,到底是运行了还是没有。你感觉没运行,解释器不一定这么想。

    你这么简单一说,谁能知道到底什么问题?学学提问的艺术。
    chenqh
        2
    chenqh  
    OP
       2020-12-19 00:50:54 +08:00
    @abersheeran 确实是可以的,但是我怎么记得之前不行呢
    oahebky
        3
    oahebky  
       2020-12-19 11:16:43 +08:00 via Android
    劝退
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5331 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 07:04 · PVG 15:04 · LAX 00:04 · JFK 03:04
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.