python / python/cpython

test_launcher fails if no Python is installed

Open
#121,090 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

OS-windows tests
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

If no Python is installed on a system, test_launcher fails with:

======================================================================
FAIL: test_shebang_command_in_venv (test.test_launcher.TestLauncher.test_shebang_command_in_venv)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\encukou\dev\cpython\Lib\test\test_launcher.py", line 765, in test_shebang_command_in_venv
    data = self.run_py([script], env=env)
  File "C:\Users\encukou\dev\cpython\Lib\test\test_launcher.py", line 254, in run_py
    self.assertEqual(expect_returncode, p.returncode)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 0 != 103

There's now a Buildbot that happens to have this config, see e.g. here

Linked PRs
  • gh-121091

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in Lib/test/test_launcher.py at TestLauncher.test_shebang_command_in_venv and review the failure from a system with no Python installed. Reproduce the test under that configuration and verify the test_launcher suite passes on the affected Buildbot setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.