(self)
| 726 | @unittest.expectedFailure # TODO: RUSTPYTHON |
| 727 | @support.requires_subprocess() |
| 728 | def test_underpth_basic(self): |
| 729 | pth_lines = ['#.', '# ..', *sys.path, '.', '..'] |
| 730 | exe_file = self._create_underpth_exe(pth_lines) |
| 731 | sys_path = self._calc_sys_path_for_underpth_nosite( |
| 732 | os.path.dirname(exe_file), |
| 733 | pth_lines) |
| 734 | |
| 735 | output = subprocess.check_output([exe_file, '-X', 'utf8', '-c', |
| 736 | 'import sys; print("\\n".join(sys.path) if sys.flags.no_site else "")' |
| 737 | ], encoding='utf-8', errors='surrogateescape') |
| 738 | actual_sys_path = output.rstrip().split('\n') |
| 739 | self.assertTrue(actual_sys_path, "sys.flags.no_site was False") |
| 740 | self.assertEqual( |
| 741 | actual_sys_path, |
| 742 | sys_path, |
| 743 | "sys.path is incorrect" |
| 744 | ) |
| 745 | |
| 746 | @unittest.expectedFailure # TODO: RUSTPYTHON |
| 747 | @support.requires_subprocess() |
nothing calls this directly
no test coverage detected