(self)
| 792 | @unittest.expectedFailure # TODO: RUSTPYTHON |
| 793 | @support.requires_subprocess() |
| 794 | def test_underpth_dll_file(self): |
| 795 | libpath = test.support.STDLIB_DIR |
| 796 | exe_prefix = os.path.dirname(sys.executable) |
| 797 | exe_file = self._create_underpth_exe( |
| 798 | self._get_pth_lines(libpath, import_site=True), exe_pth=False) |
| 799 | sys_prefix = os.path.dirname(exe_file) |
| 800 | env = os.environ.copy() |
| 801 | env['PYTHONPATH'] = 'from-env' |
| 802 | env['PATH'] = '{};{}'.format(exe_prefix, os.getenv('PATH')) |
| 803 | rc = subprocess.call([exe_file, '-c', |
| 804 | 'import sys; sys.exit(not sys.flags.no_site and ' |
| 805 | '%r in sys.path and %r in sys.path and %r not in sys.path and ' |
| 806 | 'all("\\r" not in p and "\\n" not in p for p in sys.path))' % ( |
| 807 | os.path.join(sys_prefix, 'fake-path-name'), |
| 808 | libpath, |
| 809 | os.path.join(sys_prefix, 'from-env'), |
| 810 | )], env=env) |
| 811 | self.assertTrue(rc, "sys.path is incorrect") |
| 812 | |
| 813 | |
| 814 | class CommandLineTests(unittest.TestCase): |
nothing calls this directly
no test coverage detected