Skip to content

Commit efcc3d7

Browse files
authored
Make test_ids relative to workspace path not root dir (#21682)
makes sure all testIds that are returned to the extension are relative to the workspace (which will be the invocation directory) instead of to the root. This will stop testIds for not being recognized when using a config file or another parameter that changes the root directory during pytest. fixes #21640 and #21637
1 parent 06d62aa commit efcc3d7

File tree

9 files changed

+812
-250
lines changed

9 files changed

+812
-250
lines changed

pythonFiles/tests/pytestadapter/.data/root/tests/pytest.ini

Whitespace-only changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright (c) Microsoft Corporation. All rights reserved.
2+
# Licensed under the MIT License.
3+
4+
5+
def test_a_function(): # test_marker--test_a_function
6+
assert True
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright (c) Microsoft Corporation. All rights reserved.
2+
# Licensed under the MIT License.
3+
4+
5+
def test_b_function(): # test_marker--test_b_function
6+
assert True

pythonFiles/tests/pytestadapter/expected_discovery_test_output.py

Lines changed: 367 additions & 149 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)