(self)
| 1878 | self.assertEqual(cp.returncode, 33) |
| 1879 | |
| 1880 | def test_run_with_pathlike_path(self): |
| 1881 | # bpo-31961: test run(pathlike_object) |
| 1882 | # the name of a command that can be run without |
| 1883 | # any arguments that exit fast |
| 1884 | prog = 'tree.com' if mswindows else 'ls' |
| 1885 | path = shutil.which(prog) |
| 1886 | if path is None: |
| 1887 | self.skipTest(f'{prog} required for this test') |
| 1888 | path = FakePath(path) |
| 1889 | res = subprocess.run(path, stdout=subprocess.DEVNULL) |
| 1890 | self.assertEqual(res.returncode, 0) |
| 1891 | with self.assertRaises(TypeError): |
| 1892 | subprocess.run(path, stdout=subprocess.DEVNULL, shell=True) |
| 1893 | |
| 1894 | def test_run_with_bytes_path_and_arguments(self): |
| 1895 | # bpo-31961: test run([bytes_object, b'additional arguments']) |
nothing calls this directly
no test coverage detected