{"id":13625674,"url":"https://github.com/luizyao/pytest-chinese-doc","last_synced_at":"2025-04-16T10:32:45.849Z","repository":{"id":46529329,"uuid":"211014806","full_name":"luizyao/pytest-chinese-doc","owner":"luizyao","description":"pytest 官方文档的中文翻译，但不仅仅是单纯的翻译，也包含自己的理解和实践。","archived":false,"fork":false,"pushed_at":"2021-09-25T09:25:00.000Z","size":7171,"stargazers_count":345,"open_issues_count":0,"forks_count":90,"subscribers_count":9,"default_branch":"5.1.3","last_synced_at":"2024-11-08T15:44:33.291Z","etag":null,"topics":["pytest","pytest-zh"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luizyao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-26T06:21:08.000Z","updated_at":"2024-10-31T03:47:04.000Z","dependencies_parsed_at":"2022-07-19T22:34:01.307Z","dependency_job_id":null,"html_url":"https://github.com/luizyao/pytest-chinese-doc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luizyao%2Fpytest-chinese-doc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luizyao%2Fpytest-chinese-doc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luizyao%2Fpytest-chinese-doc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luizyao%2Fpytest-chinese-doc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luizyao","download_url":"https://codeload.github.com/luizyao/pytest-chinese-doc/tar.gz/refs/heads/5.1.3","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249228274,"owners_count":21233852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pytest","pytest-zh"],"created_at":"2024-08-01T21:01:59.286Z","updated_at":"2025-04-16T10:32:45.565Z","avatar_url":"https://github.com/luizyao.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# pytest-chinese-doc\n`pytest`[官方文档（5.1.3版本）](https://docs.pytest.org/en/5.1.3/contents.html)的中文翻译，但不仅仅是简单的翻译：\n\n- 更多的例子，尽量做到每一知识点都有例子；\n- 更多的拓展阅读，部分章节添加了作者学习时，所查阅的资料；\n\n所以这也是作者自身学习`pytest`的历程，希望能有更多的人了解这款优秀的测试框架；\n\n\n# 环境\n\n- `pytest`版本：5.1.3\n- `python`版本：3.7.3\n\n\n# 使用\n\n- `git clone git@github.com:luizyao/pytest-chinese-doc.git`仓库：\n\n    `docs/`目录下包含所有的文章，以[markdown](https://daringfireball.net/projects/markdown/)格式编写；\n\n    `src/`目录下包含所有的示例源码，以章节划分；\n\n- 进入项目的根目录下，执行以下命令：\n\n    ```bash\n    $ python3 -m venv .venv-5.1.3  # 使用虚拟环境\n    $ source .venv-5.1.3/bin/activate  # 激活虚拟环境，不同的操作系统命令可能不一样\n    $ pip install -r requirements.txt  # 安装依赖\n    $ pytest --version  # 查看当前pytest的版本\n    ```\n\n\n\n# 目录\n\n- [1、安装和入门](docs/1、安装和入门.md)\n- [2、使用和调用](docs/2、使用和调用.md)\n- [3、编写断言](docs/3、编写断言.md)\n- [4、fixtures：明确的、模块化的和可扩展的](docs/4、fixtures：明确的、模块化的和可扩展的.md)\n- [5、猴子补丁](docs/5、猴子补丁.md)\n- [6、临时目录和文件](docs/6、临时目录和文件.md)\n- [7、捕获标准输出和标准错误输出](docs/7、捕获标准输出和标准错误输出.md)\n- [8、捕获告警信息](docs/8、捕获告警信息.md)\n- [9、集成文档测试](docs/9、集成文档测试.md)\n- [10、skip和xfail标记](docs/10、skip和xfail标记.md)\n- [11、测试的参数化](docs/11、测试的参数化.md)\n- [12、缓存：记录执行的状态](docs/12、缓存：记录执行的状态.md)\n\n\n# TODO\n\n- [ ] 阅读`pytest`源码\n- [x] 基于`pytest`，实践一个WEB自动化框架\n\n  [pytest-pyppeteer](https://github.com/luizyao/pytest-pyppeteer): Test with pyppeteer in pytest.\n\n\n# LICENSE\n\n[MIT LICENSE](LICENSE)\n\n\n# 其它获取途径\n\n- 关注微信公众号【小鹿的先森】，回复【pytest】：\n\n    ![小鹿的先森](wechat.jpg)\n\n- 博客园：\u003chttps://www.cnblogs.com/luizyao/p/11771740.html\u003e\n\n\n# Breaking Changes\n\n## (2020-02-03)\n\n- 使用requirements.txt代替pipenv管理虚拟环境 ([0b0bb24](https://github.com/luizyao/pytest-chinese-doc/commit/0b0bb24))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluizyao%2Fpytest-chinese-doc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluizyao%2Fpytest-chinese-doc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluizyao%2Fpytest-chinese-doc/lists"}