これは、TDDBCのPythonista向け Pytest プロジェクトです
- Python 3.8+
- uv (最新版)
- pytest 9.0.2+
※Python2は2020年1月にサポート終了(EOL)していますので、Python3をご利用ください。
このプロジェクトでは、Pythonパッケージマネージャー uv を使用します。
以下のように実行して、環境を構築してください。
$ git clone https://github.com/yattom/python_pytest.git
$ cd python_pytest
$ uv syncテストを実行するには uv run pytest コマンドを使います。
$ uv run pytest pytest
...
# Output sample
======================================= test session starts =======================================
platform darwin -- Python 3.12.8, pytest-9.0.2, pluggy-1.6.0 -- /Users/.../python_pytest/.venv/bin/python
cachedir: .pytest_cache
rootdir: /Users/.../python_pytest, configfile: pyproject.toml
testpaths: tests
plugins: xdist-3.8.0, cov-7.0.0
collected 5 items
tests/acme/test_snake.py::test_python_hisses PASSED [ 20%]
tests/acme/test_snake.py::TestMontyPython::test_say_name_guido PASSED [ 40%]
tests/acme/test_snake.py::TestMontyPython::test_say_name_kent PASSED [ 60%]
tests/acme/test_snake.py::TestMontyPython::test_say_name[Terry-Hello Terry] PASSED [ 80%]
tests/acme/test_snake.py::TestMontyPython::test_say_name[John-Hello John] PASSED [100%]
======================================== 5 passed in 0.02s ========================================のように正常終了すればOKです
MIT ライセンスです (詳しくはプロジェクト直下の LICENSE をご覧ください)