pytest
PyTestの階層問題 以下のようなディレクトリ構成の時、 . ├── main.py └── tests └── test_main.py ルートディレクトリから pytest を行うためには、tests/に"init"ファイルを置いておくと 上記のコードを実行できる つまり、以下のようになる。 . ├── main.…
pip install pytest pip install pytest-cov
エラー usage: pytest [options] [file_or_dir] [file_or_dir] [...] pytest: error: unrecognized arguments: --cov=app --cov-report=html --cov-report=html 対処 以下のpytest-covをインストールしたら、エラーが解消された pip install pytest-cov