0
1

More than 1 year has passed since last update.

pytestでprint()の出力結果をコンソールに出力する

Last updated at Posted at 2023-07-21

コマンドでpytestを実行する場合は、-sオプションを指定する。

pytest -s

VSCodeを使用している場合、.vscode/settings.jsonに--capture=noを指定する。

settings.json
{
    "python.testing.pytestArgs": [
        ".",
        "--capture=no"
    ],
    "python.testing.unittestEnabled": false,
    "python.testing.pytestEnabled": true
}
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1