From 4b5589e1bb73de8aa4226927f7dfe8cad14443b3 Mon Sep 17 00:00:00 2001 From: ziebam Date: Sat, 19 Feb 2022 22:53:05 +0100 Subject: [PATCH] Change wording from 'cmd' to 'cli' --- src/_pytest/logging.py | 4 ++-- testing/logging/test_reporting.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/_pytest/logging.py b/src/_pytest/logging.py index 29a7d6a73..e26991c76 100644 --- a/src/_pytest/logging.py +++ b/src/_pytest/logging.py @@ -560,8 +560,8 @@ class LoggingPlugin: if not os.path.isdir(directory): os.makedirs(directory) - # Log file should be relative to cwd when passed as a cmd argument and - # relative to the config file otherwise. + # Log file should be relative to invocation location when passed as a cli argument + # and relative to the config file otherwise. is_inifile_argument = "--log-file" not in config.invocation_params.args if config.inipath is not None and is_inifile_argument: log_file = os.path.join(config.inipath.parent, log_file) diff --git a/testing/logging/test_reporting.py b/testing/logging/test_reporting.py index e55a64f8c..736ec3a5b 100644 --- a/testing/logging/test_reporting.py +++ b/testing/logging/test_reporting.py @@ -1221,7 +1221,7 @@ def test_log_file_in_subdir_when_specified_and_pytest_invoked_in_subdir( assert "tox.ini" not in files_in_subdir -def test_log_file_relative_to_invocation_dir_when_passed_as_cmd_argument( +def test_log_file_relative_to_invocation_dir_when_passed_as_cli_argument( pytester, monkeypatch ): """PR #7350 comment related to issue #7350 (https://github.com/pytest-dev/pytest/pull/7350#pullrequestreview-429803796).