PyTest output inconsistent with vscode

I’m running the same PyTest configuration in vscode and in cursor. My output used to be the same in both. Then I upgraded cursor and now the output in cursor is different, and worse!

In vscode, my output looks like this:

Running pytest with args: ['-p', 'vscode_pytest', '--envfile=e2e_pytest_playwright/.env.local.alon', '--rootdir=/home/alonb/ragmetrics-app', '/home/alonb/ragmetrics-app/e2e_pytest_playwright/tests/test_dataset.py::test_create_dataset_from_csv[chromium]', '/home/alonb/ragmetrics-app/e2e_pytest_playwright/tests/test_dataset.py::test_create_dataset_from_api[chromium]', '/home/alonb/ragmetrics-app/e2e_pytest_playwright/tests/test_dataset.py::test_download_dataset_jsonl[chromium]']
============================= test session starts ==============================
platform linux -- Python 3.11.11, pytest-8.3.4, pluggy-1.5.0 -- /home/alonb/ragmetrics-app/env/bin/python
cachedir: .pytest_cache
rootdir: /home/alonb/ragmetrics-app
configfile: e2e_pytest_playwright/pytest.ini
plugins: deepeval-2.3.7, dotenv-0.5.2, playwright-0.6.2, order-1.3.0, xdist-3.6.1, anyio-3.7.1, base-url-2.1.0, Faker-33.1.0, repeat-0.9.3, allure-pytest-2.13.5
collecting ... collected 3 items

e2e_pytest_playwright/tests/test_dataset.py::test_create_dataset_from_csv[chromium] ERROR
e2e_pytest_playwright/tests/test_dataset.py::test_create_dataset_from_api[chromium] ERROR
e2e_pytest_playwright/tests/test_dataset.py::test_download_dataset_jsonl[chromium] ERRORRunning teardown with pytest sessionfinish...


==================================== ERRORS ====================================
___________ ERROR at setup of test_create_dataset_from_csv[chromium] ___________
...and so on

In cursor, it looks like this:

Running tests (pytest): /home/alonb/ragmetrics-app/e2e_pytest_playwright/tests/test_dataset.py
Running test with arguments: --rootdir /home/alonb/ragmetrics-app --override-ini junit_family=xunit1 --junit-xml=/tmp/tmp-960141mH3caxRtseXs.xml --envfile=e2e_pytest_playwright/.env.local.alon ./e2e_pytest_playwright/tests/test_dataset.py
Current working directory: /home/alonb/ragmetrics-app
Workspace directory: /home/alonb/ragmetrics-app
Run completed, parsing output
./e2e_pytest_playwright/tests/test_dataset.py::test_create_dataset_from_api[chromium] Failed with Error:... and so on

Note that vscode

  • Shows all the options I’m running with
  • Shows how many tests were collected before they start running
  • Shows streaming output as each test passes or fails

Cursor doesn’t do any of those things. Instead it adds a bunch of xunit settings that I don’t quite follow, didn’t request and apparently can’t remove.

Please help!

3 Likes

Also encounter this problem.
Before I always add -v -s to show all logs and outputs for more information (even it passed). Now I can’t see anything. It will only show this:

Run completed, parsing output
./shared/vpin_ai_rag/tests/test_vpin_ai_rag.py::TestAIHighlightRAGSearchAndScroll::test_scroll Passed

Total number of tests expected to run: 1
Total number of tests run: 1
Total number of tests passed: 1
Total number of tests failed: 0
Total number of tests failed with errors: 0
Total number of tests skipped: 0
Total number of tests with no result data: 0
Finished running tests!

Same problem

me too

same for me, i switched back to vscode because of this

Same here. Looks like output that was meant for agents got into the regular test result. This causes me to have both vscode and curser open

1 Like

Same issue here. Pretty frustrating to have to have vscode open too

1 Like

mee too

same for me, i switched back to vscode !!