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
{{ message }}
Repository navigation
Class nodes missing for parameterized tests #21541
area-testingbugIssue identified by VS Code Team member as probable bugtriage-neededNeeds assignment to the proper sub-teamverifiedVerification succeeded
discover tests via the testing panel, do it for pytest
install pytest if you don't have it (python -m pip install pytest)
create a file with two classes or parameterized tests (or use example below)
confirm nodes for the two classes appear which the parameterized tests sit under (so a test_odd_even node with 1,2,3,4,5 under it)
import pytest
import time
# Testing pytest with parametrized tests. The first two pass, the third fails.
# The tests ids are parametrize_tests.py::test_adding[3+5-8] and so on.
@pytest.mark.parametrize(
"actual, expected",
[("3+3", 5), ("2+3", 6), ("6+9", 16)],
ids=["test adding", "2 +V", "\n ffda"],
)
def test_adding(actual, expected):
assert eval(actual) == expected
@pytest.mark.parametrize("num", range(1, 5))
def test_odd_even(num):
time.sleep(0.3)
assert num < 10
area-testingbugIssue identified by VS Code Team member as probable bugtriage-neededNeeds assignment to the proper sub-teamverifiedVerification succeeded
Activity
eleanorjboyd commentedon Jun 29, 2023
verification steps:
fix bug which merges all parametrize test classes (#21542)
Merged PR posit-dev/positron-python#151: Merge upstream as of 2023 Ju…
Merged PR posit-dev/positron-python#151: Merge upstream as of 2023 Ju…