推荐学习书目
› 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
ChiangDi
V2EX  ›  Python

调查:大家都在用 Python 的什么单元测试框架

  •  
  •   ChiangDi · Apr 7, 2015 · 5079 views
    This topic created in 4233 days ago, the information mentioned may be changed or developed.

    我在看 kennethreitz 大神写的 http://docs.python-guide.org/en/latest/writing/tests/

    上面介绍了一些测试框架,比如 pytest, nose, tox, unittest2 等等。。

    调查一下大家都在用 Python 的什么单元测试框架?

    18 replies  •  2015-04-08 22:32:38 +08:00
    est
    est
    Apr 7, 2015
    1
    我打赌至少一半的人用了一个叫 null 测试的框架。
    ChiangDi
    ChiangDi
    OP
    Apr 7, 2015
    2
    @est 就是不写测试?

    好像 Ruby 社区更加鼓励单元测试,很多人用 Rspec 或者自带的 Minitest。写 Node.js 的很多都用的是 mocha。话说人肉测试真的很痛苦啊。
    messense
    messense
    Apr 7, 2015
    3
    按 unittest 写,然后用 nose 跑。
    ChiangDi
    ChiangDi
    OP
    Apr 7, 2015
    4
    @messense 我自己目前也是这个方案。
    hahastudio
    hahastudio
    Apr 7, 2015❤️3
    5
    @est 我用的是一个叫 None 测试的框架= =
    jun4rui
    jun4rui
    Apr 7, 2015❤️1
    6
    另一半里面还有一半是用一个叫print的命令进行测试
    ca1n
    ca1n
    Apr 7, 2015
    7
    @jun4rui = = 中枪
    wuchizhitu1988
    wuchizhitu1988
    Apr 7, 2015
    8
    pytest应该是目前其中最好的了
    grzhan
    grzhan
    Apr 7, 2015
    9
    pytest,文档也写得蛮好的来着
    9hills
    9hills
    Apr 7, 2015
    10
    None: 50%
    print: 25%
    logging: 15%

    其他:10%
    zeayes
    zeayes
    Apr 7, 2015
    11
    nose
    ChiangDi
    ChiangDi
    OP
    Apr 7, 2015
    12
    看来很多人都只是用 python 写写小脚本。严肃的大型项目不写单元测试真是无法想象的。
    Tink
    Tink
    Apr 7, 2015 via iPhone
    13
    @jun4rui 中枪
    FanAndXinran
    FanAndXinran
    Apr 7, 2015
    14
    unittest
    enotx
    enotx
    Apr 7, 2015 via Android
    15
    @jun4rui
    中枪成狗。。。
    libo26
    libo26
    Apr 7, 2015
    16
    同10楼
    kchum
    kchum
    Apr 8, 2015
    17
    @jun4rui 捂脸逃。。。
    ming2281
    ming2281
    Apr 8, 2015
    18
    unittest
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   547 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 59ms · UTC 19:28 · PVG 03:28 · LAX 11:28 · JFK 14:28
    ♥ Do have faith in what you're doing.