File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -872,6 +872,23 @@ def test_venv_same_path(self):
872
872
else :
873
873
self .assertFalse (same_path (path1 , path2 ))
874
874
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
+
875
892
@requireVenvCreate
876
893
class EnsurePipTest (BaseTest ):
877
894
"""Test venv module installation of pip."""
You can’t perform that action at this time.
0 commit comments