File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -354,6 +354,27 @@ def test_venv_posix(self):
354354 actual = getpath (ns , expected )
355355 self .assertEqual (expected , actual )
356356
357+ def test_venv_posix_without_home_key (self ):
358+ ns = MockPosixNamespace (
359+ argv0 = "/venv/bin/python3" ,
360+ PREFIX = "/usr" ,
361+ ENV_PATH = "/usr/bin" ,
362+ )
363+ # Setup the bare minimum venv
364+ ns .add_known_xfile ("/usr/bin/python3" )
365+ ns .add_known_xfile ("/venv/bin/python3" )
366+ ns .add_known_link ("/venv/bin/python3" , "/usr/bin/python3" )
367+ ns .add_known_file ("/venv/pyvenv.cfg" , [
368+ # home = key intentionally omitted
369+ ])
370+ expected = dict (
371+ executable = "/venv/bin/python3" ,
372+ prefix = "/venv" ,
373+ base_prefix = "/usr" ,
374+ )
375+ actual = getpath (ns , expected )
376+ self .assertEqual (expected , actual )
377+
357378 def test_venv_changed_name_posix (self ):
358379 "Test a venv layout on *nix."
359380 ns = MockPosixNamespace (
You can’t perform that action at this time.
0 commit comments