PTVS icon indicating copy to clipboard operation
PTVS copied to clipboard

Test Explorer is not displaying the tests with :: correctly

Open StellaHuang95 opened this issue 7 months ago • 1 comments

Steps to Reproduce

  1. Install the python workload.
  2. Create a python project.
  3. Set up the python environment, install pytest to the environment.
  4. Go to project properties and set the test framework to pytest
  5. Add a new python file test_1.py and add the code below to it.
def ischildnode(baseid, nodeid):
    return nodeid.startswith(baseid)

import pytest
@pytest.mark.parametrize(
    "baseid, nodeid, expected",
    [
        ("foo/bar::TestBaz", "foo/bar::TestBop", True),
    ],
)
def test_ischildnode(baseid, nodeid, expected):
    result = ischildnode(baseid, nodeid)
    assert result == expected
  1. Open Test Explorer

Current behavior image

Expected behavior -PythonApplication8 -test_1.py -test_ischildnode[foo/bar::TestBaz-foo/bar::TestBop-True]

StellaHuang95 avatar Jul 25 '24 18:07 StellaHuang95