Skip to content

youqu3 一个文件能包含多个测试用例吗? #147

Closed

Description

@Lewis456

创建了一个文件 test_user_001.py,如果我想有两个函数,比如 test_user_001, test_user_002 会报错ID不符

Activity

  1. Lewis456 commented on Oct 21, 2025

    @Lewis456
    Author

    已解决:官方文档中“本地执行”这一模块有暗示:
    示例:test_xxx_001.py

     def test_xxx_001_1(self):
        ...
     def test_xxx_001_2(self):
        ...
    

    在编号后面继续添加id即可。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions