File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -872,6 +872,23 @@ def test_venv_same_path(self):
872872 else :
873873 self .assertFalse (same_path (path1 , path2 ))
874874
875+ # gh-126084: venvwlauncher should run pythonw, not python
876+ @requireVenvCreate
877+ @unittest .skipUnless (os .name == 'nt' , 'only relevant on Windows' )
878+ def test_venvwlauncher (self ):
879+ """
880+ Test that the GUI launcher runs the GUI python.
881+ """
882+ rmtree (self .env_dir )
883+ venv .create (self .env_dir )
884+ pythonw = os .path .join (self .env_dir , self .bindir , "pythonw.exe" )
885+ try :
886+ subprocess .check_call ([pythonw , "-c" , "import _winapi; "
887+ "assert _winapi.GetModuleFileName(0).endswith('pythonw.exe')" ])
888+ except subprocess .CalledProcessError :
889+ self .fail ("venvwlauncher.exe did not run pythonw.exe" )
890+
891+
875892@requireVenvCreate
876893class EnsurePipTest (BaseTest ):
877894 """Test venv module installation of pip."""
You can’t perform that action at this time.
0 commit comments