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
Test with a function in the parameter (input parameter in this case) causes test to be skipped with the message:
ERROR: not found: /Users/przemekl/tmp/interview/openx/test_substring.py::test_invalid_substring[DdbrDiwhdn]
(no match in any of [<Module test_substring.py>])
Steps to reproduce:
function find_substring raises ValuError if input string length i 0 or bigger than 1024
function gen_str(n) returns string with n-number of characters
parametrized tests that verifies if a ValueError is rised:
2025-03-18 09:10:18.912 [info] ========================== 2 tests collected in 0.00s ==========================
2025-03-18 09:10:20.664 [info] arg: --rootdir already exists in args, not adding.
2025-03-18 09:10:20.665 [info] Attempting to use temp directory for test ids file, file name: test-ids-a2abf64184c60d4c7a21.txt
2025-03-18 09:10:20.668 [info] All environment variables set for pytest execution, PYTHONPATH: "/Users/przemekl/.vscode/extensions/ms-python.python-2025.2.0-darwin-arm64/python_files"
2025-03-18 09:10:20.668 [info] Running pytest with arguments: /Users/przemekl/.vscode/extensions/ms-python.python-2025.2.0-darwin-arm64/python_files/vscode_pytest/run_pytest_script.py --rootdir=/Users/przemekl/tmp/interview/openx for workspace /Users/przemekl/tmp/interview/openx
2025-03-18 09:10:20.668 [info] > ./.venv/bin/python ~/.vscode/extensions/ms-python.python-2025.2.0-darwin-arm64/python_files/vscode_pytest/run_pytest_script.py --rootdir=.
2025-03-18 09:10:20.668 [info] cwd: .
2025-03-18 09:10:20.866 [error] Test Results named pipe /var/folders/q0/0phts9vd25z7s5k7kmq20qzm0000gn/T/python-test-results-2217f2645cd571722487 error: [TypeError: Cannot convert undefined or null to object
at Function.keys ()
at t.PythonResultResolver._resolveExecution (/Users/przemekl/.vscode/extensions/ms-python.python-2025.2.0-darwin-arm64/out/client/extension.js:2:917078)
at t.PythonResultResolver.resolveExecution (/Users/przemekl/.vscode/extensions/ms-python.python-2025.2.0-darwin-arm64/out/client/extension.js:2:916387)
at /Users/przemekl/.vscode/extensions/ms-python.python-2025.2.0-darwin-arm64/out/client/extension.js:2:960049
at b.callback (/Users/przemekl/.vscode/extensions/ms-python.python-2025.2.0-darwin-arm64/out/client/extension.js:2:930145)
at Object.thunk (/Users/przemekl/.vscode/extensions/ms-python.python-2025.2.0-darwin-arm64/out/client/extension.js:2:1994360)]
2025-03-18 09:10:20.883 [info] Test Result named pipe /var/folders/q0/0phts9vd25z7s5k7kmq20qzm0000gn/T/python-test-results-2217f2645cd571722487 cancelled
<summary>Output for <code>Python</code> in the <code>Output</code> panel (<code>View</code>→<code>Output</code>, change the drop-down the upper-right of the <code>Output</code> panel to <code>Python</code>)
</summary>
<p>
No test is run if parameterized test is triggered from test explorer.
If you try to run tets separately then test with empty string passess, and the one with generated string is skipped with the response below (generatred string reduced to 10 characters tor testing)
If tests are triggered from CLI, everything works properly.
Running pytest with args: ['-p', 'vscode_pytest', '--rootdir=/Users/przemekl/tmp/interview/openx', '/Users/przemekl/tmp/interview/openx/test_substring.py::test_invalid_substring[]', '/Users/przemekl/tmp/interview/openx/test_substring.py::test_invalid_substring[gKmSDbxzEB]']
============================= test session starts ==============================
platform darwin -- Python 3.12.9, pytest-8.3.5, pluggy-1.5.0
rootdir: /Users/przemekl/tmp/interview/openx
configfile: pyproject.toml
collected 1 item
============================ no tests ran in 0.00s =============================
ERROR: not found: /Users/przemekl/tmp/interview/openx/test_substring.py::test_invalid_substring[gKmSDbxzEB]
(no match in any of [])
Finished running tests!
</p>
</details>
Extension version: 2025.2.0
VS Code version: Code 1.98.2 (Universal) (ddc367ed5c8936efe395cffeec279b04ffd7db78, 2025-03-12T13:32:45.399Z)
OS version: Darwin arm64 24.3.0
Modes:
- Python version (& distribution if applicable, e.g. Anaconda): 3.12.9
- Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Poetry
- Value of the `python.languageServer` setting: Pylance
<details>
<summary>User Settings</summary>
<p>
PrzemyslawLukasik
changed the title
function in parameter in parameterized test cause cause test to be skipped with 'ERROR: Not found' message.
function in parameter in parameterized test cause test to be skipped with 'ERROR: Not found' message.
Mar 18, 2025
Type: Bug
Behaviour
Test with a function in the parameter (input parameter in this case) causes test to be skipped with the message:
Steps to reproduce:
find_substring
raises ValuError if input string length i 0 or bigger than 1024executted from cli:
Diagnostic data
2025-03-18 09:10:18.908 [info] platform darwin -- Python 3.12.9, pytest-8.3.5, pluggy-1.5.0
2025-03-18 09:10:18.909 [info] rootdir: /Users/przemekl/tmp/interview/openx
configfile: pyproject.toml
2025-03-18 09:10:18.911 [info] collected 2 items
2025-03-18 09:10:18.911 [info]
2025-03-18 09:10:18.912 [info]
2025-03-18 09:10:18.912 [info] ========================== 2 tests collected in 0.00s ==========================
2025-03-18 09:10:20.664 [info] arg: --rootdir already exists in args, not adding.
2025-03-18 09:10:20.665 [info] Attempting to use temp directory for test ids file, file name: test-ids-a2abf64184c60d4c7a21.txt
2025-03-18 09:10:20.668 [info] All environment variables set for pytest execution, PYTHONPATH: "/Users/przemekl/.vscode/extensions/ms-python.python-2025.2.0-darwin-arm64/python_files"
2025-03-18 09:10:20.668 [info] Running pytest with arguments: /Users/przemekl/.vscode/extensions/ms-python.python-2025.2.0-darwin-arm64/python_files/vscode_pytest/run_pytest_script.py --rootdir=/Users/przemekl/tmp/interview/openx for workspace /Users/przemekl/tmp/interview/openx
2025-03-18 09:10:20.668 [info] > ./.venv/bin/python ~/.vscode/extensions/ms-python.python-2025.2.0-darwin-arm64/python_files/vscode_pytest/run_pytest_script.py --rootdir=.
2025-03-18 09:10:20.668 [info] cwd: .
2025-03-18 09:10:20.866 [error] Test Results named pipe /var/folders/q0/0phts9vd25z7s5k7kmq20qzm0000gn/T/python-test-results-2217f2645cd571722487 error: [TypeError: Cannot convert undefined or null to object
at Function.keys ()
at t.PythonResultResolver._resolveExecution (/Users/przemekl/.vscode/extensions/ms-python.python-2025.2.0-darwin-arm64/out/client/extension.js:2:917078)
at t.PythonResultResolver.resolveExecution (/Users/przemekl/.vscode/extensions/ms-python.python-2025.2.0-darwin-arm64/out/client/extension.js:2:916387)
at /Users/przemekl/.vscode/extensions/ms-python.python-2025.2.0-darwin-arm64/out/client/extension.js:2:960049
at b.callback (/Users/przemekl/.vscode/extensions/ms-python.python-2025.2.0-darwin-arm64/out/client/extension.js:2:930145)
at Object.thunk (/Users/przemekl/.vscode/extensions/ms-python.python-2025.2.0-darwin-arm64/out/client/extension.js:2:1994360)]
2025-03-18 09:10:20.883 [info] Test Result named pipe /var/folders/q0/0phts9vd25z7s5k7kmq20qzm0000gn/T/python-test-results-2217f2645cd571722487 cancelled
Running pytest with args: ['-p', 'vscode_pytest', '--rootdir=/Users/przemekl/tmp/interview/openx', '/Users/przemekl/tmp/interview/openx/test_substring.py::test_invalid_substring[]', '/Users/przemekl/tmp/interview/openx/test_substring.py::test_invalid_substring[gKmSDbxzEB]']
============================= test session starts ==============================
platform darwin -- Python 3.12.9, pytest-8.3.5, pluggy-1.5.0
rootdir: /Users/przemekl/tmp/interview/openx
configfile: pyproject.toml
collected 1 item
============================ no tests ran in 0.00s =============================
ERROR: not found: /Users/przemekl/tmp/interview/openx/test_substring.py::test_invalid_substring[gKmSDbxzEB]
(no match in any of [])
Finished running tests!
venvPath: ""
venvFolders: ""
languageServer: "Pylance"
testing
• cwd: ""
• promptToConfigure: false
• pytestArgs: ""
• pytestEnabled: true
• pytestPath: ""
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
py29gd2263:31024239
vscaac:30438847
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
2e7ec940:31000449
pythontbext0:30879054
cppperfnew:31000557
dwnewjupyter:31046869
nativerepl2:31139839
pythonrstrctxt:31112756
nativeloc2:31192216
iacca1:31171482
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
5a9hg449:31230677
hdaa2157:31222309
copilot_t_ci:31222730
968h8231:31259996
jda6j935:31233686
fh1c7952:31258891
4gafe986:31257590
31787653:31256342
The text was updated successfully, but these errors were encountered: