GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Return an empty result from the pytest adapter if no tests found. (#5… · gaurav131/pythonVSCode@c315cc5

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • pythonFiles
    • testing_tools/adapter
      • pytest.py
    • tests/testing_tools/adapter
      • .data/notests/tests
        • __init__.py
      • test_functional.py
      • test_pytest.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎pythonFiles/testing_tools/adapter/pytest.py‎

Copy file name to clipboardExpand all lines: pythonFiles/testing_tools/adapter/pytest.py
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ def discover(pytestargs=None, hidestdio=False,
3535
# platform-dependent issues.
3636
with util.hide_stdio() if hidestdio else util.noop_cm():
3737
ec = _pytest_main(pytestargs, [_plugin])
38-
if ec != 0:
38+
# See: https://docs.pytest.org/en/latest/usage.html#possible-exit-codes
39+
if ec == 5:
40+
# No tests were discovered.
41+
pass
42+
elif ec != 0:
3943
raise Exception('pytest discovery failed (exit code {})'.format(ec))
4044
if not _plugin._started:
4145
raise Exception('pytest discovery did not start')
Collapse file

‎pythonFiles/tests/testing_tools/adapter/.data/notests/tests/__init__.py‎

Copy file name to clipboardExpand all lines: pythonFiles/tests/testing_tools/adapter/.data/notests/tests/__init__.py
Whitespace-only changes.

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.