From cbe1662762508eccd811cf52b11a2c4157b72991 Mon Sep 17 00:00:00 2001 From: Jon Parise Date: Mon, 21 Aug 2023 20:11:57 -0700 Subject: [PATCH] Correct the spelling of Config.ArgsSource.INVOCATION_DIR Config.ArgsSource.INCOVATION_DIR remains as a backwards compatibility alias. --- changelog/11333.trivial.rst | 1 + src/_pytest/config/__init__.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 changelog/11333.trivial.rst diff --git a/changelog/11333.trivial.rst b/changelog/11333.trivial.rst new file mode 100644 index 000000000..273d77ce1 --- /dev/null +++ b/changelog/11333.trivial.rst @@ -0,0 +1 @@ +Corrected the spelling of ``Config.ArgsSource.INVOCATION_DIR``. diff --git a/src/_pytest/config/__init__.py b/src/_pytest/config/__init__.py index 8dbaf7c70..1d9c49aa1 100644 --- a/src/_pytest/config/__init__.py +++ b/src/_pytest/config/__init__.py @@ -953,7 +953,8 @@ class Config: #: Command line arguments. ARGS = enum.auto() #: Invocation directory. - INCOVATION_DIR = enum.auto() + INVOCATION_DIR = enum.auto() + INCOVATION_DIR = INVOCATION_DIR # backwards compatibility alias #: 'testpaths' configuration value. TESTPATHS = enum.auto() @@ -1278,7 +1279,7 @@ class Config: else: result = [] if not result: - source = Config.ArgsSource.INCOVATION_DIR + source = Config.ArgsSource.INVOCATION_DIR result = [str(invocation_dir)] return result, source