Placing conftest file in the project causes results in failure while using pytest
See original GitHub issueIssue Type: Bug Open the project in vscode. Download the dependencies mentioned in the pyproject.toml file. Run the test present in the tests folder.
Expected : Test should run and the status of the test should be reflected. Actual : Test runs but we get an error message saying “Error: TypeError: Cannot read property ‘testsuites’ of null”. Also below errors are observed.

This makes it difficult to know the status of any test.
Sample code to reproduce the issue. pytest-test-runner-check.zip
Please note : Removing the conftest.py file solves this issue. Issue persist even if we move the conftest.py file in the root of the project.
System Info
| Item | Value | 
|---|---|
| CPUs | Intel® Core™ i7-9750H CPU @ 2.60GHz (12 x 2592) | 
| GPU Status | 2d_canvas: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: enabled opengl: enabled_on protected_video_decode: unavailable_off rasterization: enabled skia_renderer: enabled_on video_decode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled  | 
| Load (avg) | undefined | 
| Memory (System) | 31.70GB (20.84GB free) | 
| Process Argv | C:\Users\raisau\ProjectSetup\PersonalProjects\pytest-test-runner-check --crash-reporter-id 37738ec1-7bb2-47bf-9c84-6f6b2d519645 | 
| Screen Reader | no | 
| VM | 0% | 
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstry244:30276681
pythonvspyt639:30291489
pythontb:30283811
vspre833cf:30267465
pythonptprofiler:30281270
vshan820:30294714
pythondataviewer:30285071
vscus158:30286553
vscgsv2ct:30294353
Issue Analytics
- State:
 - Created 2 years ago
 - Comments:5
 
Top Results From Across the Web
Version 7.1.0 seems like not picking up conftest.py · Issue #9767
When I run pytest refnx , all my tests get picked up, but the refnx/conftest.py file does not. Consequently all the tests that...
Read more >fixture with module scope in test file works, but in conftest.py ...
It's expected not to work because pytest won't scan some arbitrary directories, looking for conftest.py files in them. Either add src/tasks to ...
Read more >Writing plugins — pytest documentation
After the conftest.py file is loaded, load all plugins specified in its pytest_plugins variable if present. Note that pytest does not find conftest.py...
Read more >pytest Documentation - Read the Docs
The first test passed and the second failed. You can easily see the intermediate values in the assertion to help you under-.
Read more >Using Pytest Fixtures: A Step-by-Step Guide With Examples
Pytest is one of the most popular testing modules for Python. Pytest is used for Python API test cases, database projects, artificial ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@FrancescoValerio The fix you suggested worked. I am closing this issue. Thank you for your support.
Thanks for the bug report! We investigate issues in order based on priority and severity, which includes the impact it has on your ability to use the extension to do productive work, and the number of people affected. If other users come forward and leave a comment demonstrating they are seeing/reproducing the problem then we will raise this issue’s priority.
If you think your issue is more of a question or configuration problem rather than a bug, please ask on Stack Overflow with the
visual-studio-codeandpythonlabels for help.Thanks for your understanding and patience!