(self)
| 771 | @unittest.expectedFailure # TODO: RUSTPYTHON |
| 772 | @support.requires_subprocess() |
| 773 | def test_underpth_file(self): |
| 774 | libpath = test.support.STDLIB_DIR |
| 775 | exe_prefix = os.path.dirname(sys.executable) |
| 776 | exe_file = self._create_underpth_exe( |
| 777 | self._get_pth_lines(libpath, import_site=True)) |
| 778 | sys_prefix = os.path.dirname(exe_file) |
| 779 | env = os.environ.copy() |
| 780 | env['PYTHONPATH'] = 'from-env' |
| 781 | env['PATH'] = '{};{}'.format(exe_prefix, os.getenv('PATH')) |
| 782 | rc = subprocess.call([exe_file, '-c', |
| 783 | 'import sys; sys.exit(not sys.flags.no_site and ' |
| 784 | '%r in sys.path and %r in sys.path and %r not in sys.path and ' |
| 785 | 'all("\\r" not in p and "\\n" not in p for p in sys.path))' % ( |
| 786 | os.path.join(sys_prefix, 'fake-path-name'), |
| 787 | libpath, |
| 788 | os.path.join(sys_prefix, 'from-env'), |
| 789 | )], env=env) |
| 790 | self.assertTrue(rc, "sys.path is incorrect") |
| 791 | |
| 792 | @unittest.expectedFailure # TODO: RUSTPYTHON |
| 793 | @support.requires_subprocess() |
nothing calls this directly
no test coverage detected