You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def pytest_load_initial_conftests(early_config, parser, args):
global TEST_RUN_PIPE
TEST_RUN_PIPE = os.getenv("TEST_RUN_PIPE")
error_string = (
"PYTEST ERROR: TEST_RUN_PIPE is not set at the time of pytest starting. "
"Please confirm this environment variable is not being changed or removed "
"as it is required for successful test discovery and execution."
f"TEST_RUN_PIPE = {TEST_RUN_PIPE}\n"
)
if not TEST_RUN_PIPE:
print(error_string, file=sys.stderr)
if "--collect-only" in args:
global IS_DISCOVERY
IS_DISCOVERY = True
# check if --rootdir is in the args
for arg in args:
if "--rootdir=" in arg:
rootdir = arg.split("--rootdir=")[1]
if not os.path.exists(rootdir):
raise VSCodePytestError(
f"The path set in the argument --rootdir={rootdir} does not exist."
)
# Check if the rootdir is a symlink or a child of a symlink to the current cwd.
isSymlink = False
if os.path.islink(rootdir):
isSymlink = True
print(
f"Plugin info[vscode-pytest]: rootdir argument, {rootdir}, is identified as a symlink."
)
elif pathlib.Path(os.path.realpath(rootdir)) != rootdir:
print("Plugin info[vscode-pytest]: Checking if rootdir is a child of a symlink.")
isSymlink = has_symlink_parent(rootdir)
if isSymlink:
print(
f"Plugin info[vscode-pytest]: rootdir argument, {rootdir}, is identified as a symlink or child of a symlink, adjusting pytest paths accordingly.",
)
global SYMLINK_PATH
SYMLINK_PATH = pathlib.Path(rootdir)
I have my cursor over print("Plugin info[vscode-pytest]: Checking if rootdir is a child of a symlink.") and instead it sends the whole function not just the print line. I would have expected it to send just the print line- is this an incorrect assumption?
The text was updated successfully, but these errors were encountered:
Testing #23676
I have code that looks like this:
I have my cursor over
print("Plugin info[vscode-pytest]: Checking if rootdir is a child of a symlink.")
and instead it sends the whole function not just the print line. I would have expected it to send just the print line- is this an incorrect assumption?The text was updated successfully, but these errors were encountered: