项目
在 GitHub 查看
noahgift/pytest-tips-tricks
关于
A primer on pytest
数据实测星标增长
- 24小时
- 0
- 7天
- 正在收集历史
- 15天
- 正在收集历史
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文pytest-tips-tricks
A primer on pytest
Introduction to Testing with pytest
- Why Test?
- Does anything work?
- Why PyTest?
- Setup Cloud Development Environments with Local CI and Compare:
- Github Codespaces
- AWS Cloud9
- AWS Cloudshell
- CI Systems with PyTest
- Github Actions: https://docs.github.com/actions/automating-builds-and-tests/building-and-testing-nodejs-or-python?langId=py
- AWS Code Build
Invoking pytest
- Overview of pytest invocation
- Simple version:
make testviapython -m pytest -vv test_hello.py - Adding Code Coverage:
pytest-covpython -m pytest -vv --cov=hello test_hello.py - Adding Jupyter Notebook testing:
- Debugging Code with PDB
- What is PDB and how does it work?
- Alternative IPDB[https://pypi.org/project/ipdb/]
- Invoke pytest with
--pdb: https://github.com/paiml/testing-in-python/blob/master/chapter6/Makefile#L2
- Stop on fail:
pytest -xpytest --maxfail=2
- Specify Tests: https://docs.pytest.org/en/6.2.x/usage.html?highlight=pdb#specifying-tests-selecting-tests
- dir
- keyword
- Build a report: https://docs.pytest.org/en/6.2.x/usage.html?highlight=pdb#detailed-summary-report
Advanced pytest
- Setup and Teardown
- Testing Click CLI
- Testing Flask API
- Testing FastAPI
References
- To use caching use this option: https://github.com/actions/cache/blob/main/examples.md#python---pip
Watch the pytest master class
Learn Python for data and AI engineering: AI Debugging and Test-Driven Fixes (Coursera) · Applied Python Data Engineering, Duke (Coursera) · Data Engineering with Python and Linux program (edX)
More courses from Noah Gift and Pragmatic AI Labs.
探索相关项目
加载中…