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

Can not run tests with global #22028

Closed
michael-tran opened this issue Sep 19, 2023 · 2 comments
Closed

Can not run tests with global #22028

michael-tran opened this issue Sep 19, 2023 · 2 comments
Assignees
Labels
area-testing info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team

Comments

@michael-tran
Copy link

We have written the needed data into your clipboard because
Type: Bug

Behaviour

Expected vs. Actual

Expected: All tests in project to run

Actual: The test "Ran" but report nothing back

Works on previous version
Works in command line python -m unittest tests/*test.py
VScode python is importing everything correctly and discoveries tests

Steps to reproduce:

  1. Run test with vscode
  2. fails

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.9.16
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Venv
  • Value of the python.languageServer setting: Default
Output for Python in the Debug Console panel (ViewDebug Console)

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/root/.vscode-server/extensions/ms-python.python-2023.16.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/__main__.py", line 39, in <module>
    cli.main()
  File "/root/.vscode-server/extensions/ms-python.python-2023.16.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main
    run()
  File "/root/.vscode-server/extensions/ms-python.python-2023.16.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file
    runpy.run_path(target, run_name="__main__")
  File "/root/.vscode-server/extensions/ms-python.python-2023.16.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 321, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "/root/.vscode-server/extensions/ms-python.python-2023.16.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 135, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/root/.vscode-server/extensions/ms-python.python-2023.16.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code
    exec(code, run_globals)
  File "/root/.vscode-server/extensions/ms-python.python-2023.16.0/pythonFiles/unittestadapter/execution.py", line 1, in <module>
    [KERBEROS]
NameError: name 'KERBEROS' is not defined

User Settings

Multiroot scenario, following user settings may not apply:

languageServer: "Pylance"

formatting
• provider: "none"

testing
• unittestArgs: "<placeholder>"
• unittestEnabled: true

Extension version: 2023.16.0
VS Code version: Code 1.82.2 (abd2f3db4bdb28f9e95536dfa84d8479f1eb312d, 2023-09-14T05:55:25.390Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Remote OS version: Linux x64 5.15.49-linuxkit

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i9-11950H @ 2.60GHz (16 x 2611)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 63.73GB (16.16GB free)
Process Argv --file-uri file:///c%3A/Users/MichaelTran/Documents/github/python/docker.code-workspace --crash-reporter-id 1db07c4a-84ba-4a5f-a8b7-ec35ef41f731
Screen Reader no
VM 0%
Item Value
Remote Dev Container
OS Linux x64 5.15.49-linuxkit
CPUs 11th Gen Intel(R) Core(TM) i9-11950H @ 2.60GHz (8 x 2611)
Memory (System) 32.05GB (28.41GB free)
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscorecescf:30445987
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30410667
py29gd2263:30792226
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
pynewext54:30695312
azure-dev_surveyone:30548225
vscccc:30803845
282f8724:30602487
89544117:30613380
vscrp:30673768
a9j8j154:30646983
showlangstatbar:30737416
0bi6i642:30835152
a2ce3375:30757347
24365598:30736109
pythonfmttext:30731395
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
pythonnosmt12:30797651
pythonidxpt:30805730
pythonnoceb:30805159
copilotsettingc:30839828
dsvsc013:30795093
dsvsc014:30804076
diffeditorv1:30821571
dsvsc015:30829745

it was too large to send. Please paste.
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Sep 19, 2023
@eleanorjboyd
Copy link
Member

Hello! Could you switch to using the new testing rewrite and give it a try? Add this setting to your users settings.json "python.experiments.optInto": ["pythonTestAdapter"] then reload the page and rerun the steps that cause the bug to occur.

You can confirm you have the rewrite enabled by setting "python.analysis.logLevel": "Trace", in your user settings then check for Experiment 'pythonTestAdapter' is active in your python logs.

Let me know if the rewrite fixes your issue. Thanks!

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Sep 19, 2023
@github-actions
Copy link

Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off.

Happy Coding!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-testing info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

2 participants