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
f"Tests tree does not match expected value. \n Expected: {json.dumps(expected_discovery_test_output.project_root_unittest_folder_expected_output, indent=4)}. \n Actual: {json.dumps(actual_item.get('tests'), indent=4)}"
430
430
)
431
+
432
+
433
+
@pytest.mark.skipif(
434
+
sys.platform=="win32",
435
+
)
436
+
deftest_symlink_with_project_root_path():
437
+
"""Test pytest discovery with both symlink and PROJECT_ROOT_PATH set.
438
+
439
+
This tests the combination of:
440
+
1. A symlinked test directory (--rootdir points to symlink)
441
+
2. PROJECT_ROOT_PATH set to the symlink path
442
+
443
+
This simulates project-based testing where the project root is a symlink,
444
+
ensuring test IDs and paths are correctly resolved through the symlink.
445
+
"""
446
+
withhelpers.create_symlink(helpers.TEST_DATA_PATH, "root", "symlink_folder") as (
447
+
source,
448
+
destination,
449
+
):
450
+
assertdestination.is_symlink()
451
+
452
+
# Run pytest with:
453
+
# - cwd being the resolved symlink path (simulating subprocess from node)
454
+
# - PROJECT_ROOT_PATH set to the symlink destination
0 commit comments