Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new pytest runner mixes test classes #21578

Closed
lmgarret opened this issue Jul 7, 2023 · 2 comments · Fixed by #21601
Closed

new pytest runner mixes test classes #21578

lmgarret opened this issue Jul 7, 2023 · 2 comments · Fixed by #21601
Assignees
Labels
area-testing bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@lmgarret
Copy link

lmgarret commented Jul 7, 2023

Type: Bug

Behaviour

Expected vs. Actual

I have enabled the experiment pythonTestAdapter to use the new test runner. If two test files have identically named test classes, their test methods are mixed

Steps to reproduce:

  1. Create these two files:
# tests/test_a.py

class TestSomething:
    def test_a(self):
        assert True
# tests/test_b.py

class TestSomething:
    def test_b(self):
        assert True
  1. Refresh the test suites
  2. You should get the following test structure:
test_a.py
    > TestSomething
        > test_a
        > test_b
test_b.py
    > TestSomething
        > test_a
        > test_b

instead of the expected

test_a.py
    > TestSomething
        > test_a
test_b.py
    > TestSomething
        > test_b

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.9.2
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Venv
  • Value of the python.languageServer setting: Default
Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX

User Settings

Multiroot scenario, following user settings may not apply:

languageServer: "Pylance"

formatting
• provider: "yapf"

experiments
• optInto: ["pythonTestAdapter"]

Extension version: 2023.12.0
VS Code version: Code 1.80.0 (660393deaaa6d1996740ff4880f1bad43768c814, 2023-07-04T13:39:48.236Z)
OS version: Linux x64 5.15.0-75-generic
Modes:
Remote OS version: Linux x64 5.15.0-75-generic

A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30410667
py29gd2263:30776702
vscaat:30438848
vsclangdc:30486549
c4g48928:30535728
dsvsc012:30540252
pynewext54:30695312
azure-dev_surveyone:30548225
vsccc:30610678
2e4cg342:30602488
pyind779:30671433
89544117:30613380
pythonsymbol12:30671437
2i9eh265:30646982
showlangstatbar:30737416
vsctsb:30748421
pythonms35:30701012
03d35959:30757346
pythonfmttext:30731395
pythoncmvfstrcf:30756944
fixshowwlkth:30771522
hideindicator:30766889
pythongtdpath:30769146
bgfeh915:30780428
pythonnosmt12:30779714
pythonidxpt:30784022
pythonnoceb:30776495
e537b577:30772215

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jul 7, 2023
@eleanorjboyd
Copy link
Member

Hello! Thank you for trying out the new rewrite and finding this bug! We appreciate users like you who help make our new features bug-free as we roll them out! I am able to repro this issue and will fix it now. Thanks!

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Jul 10, 2023
@eleanorjboyd eleanorjboyd added bug Issue identified by VS Code Team member as probable bug area-testing needs PR Ready to be worked on and removed info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team labels Jul 10, 2023
@eleanorjboyd eleanorjboyd added this to the July 2023 milestone Jul 10, 2023
@github-actions github-actions bot removed the needs PR Ready to be worked on label Jul 10, 2023
@lmgarret
Copy link
Author

I just tested it, and it seems fixed to me, thanks for the quick action! Can't wait to use this new runner as my daily driver :)

@eleanorjboyd eleanorjboyd added the verified Verification succeeded label Jul 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-testing bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
2 participants