python 3.8 module docs_Python pytest-docs包_程序模块 - PyPI - Python中文网

功能

创建测试文档。转动此按钮:'''This is the module doc'''

import pytest

pytestmark = [

pytest.mark.module_mark,

pytest.mark.module_mark_2,

pytest.mark.pytest_doc(name="Test Docs"),

]

@pytest.mark.class_marker

@pytest.mark.pytest_doc(name="Test Class")

class TestClass:

'''This is the class doc'''

@pytest.mark.func_mark_a("foo")

def test_func_a(self):

'''This is the doc for test_func_a'''

assert 1

@pytest.mark.kwarg_mark(goo="bla")

def test_func_b(self):

'''This is the doc for test_func_b'''

assert 1

对此:# Test Docs

This is the module doc

**Markers:**

- module_mark

- module_mark_2

- pytest_doc (name=Test Docs)

## Test Class

This is the class doc

**Markers:**

- pytest_doc (name=Test Class)

- class_marker

### test_func_a

This is the doc for test_func_a

**Markers:**

- func_mark_a (foo)

### test_func_b

This is the doc for test_func_b

**Markers:**

- kwarg_mark (goo=bla)

当前支持的格式:降价

重新剪切的文本

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值