(self)
| 3952 | self._test_keyboardinterrupt_no_kill(popen_via_context_manager) |
| 3953 | |
| 3954 | def test_getoutput(self): |
| 3955 | self.assertEqual(subprocess.getoutput('echo xyzzy'), 'xyzzy') |
| 3956 | self.assertEqual(subprocess.getstatusoutput('echo xyzzy'), |
| 3957 | (0, 'xyzzy')) |
| 3958 | |
| 3959 | # we use mkdtemp in the next line to create an empty directory |
| 3960 | # under our exclusive control; from that, we can invent a pathname |
| 3961 | # that we _know_ won't exist. This is guaranteed to fail. |
| 3962 | dir = None |
| 3963 | try: |
| 3964 | dir = tempfile.mkdtemp() |
| 3965 | name = os.path.join(dir, "foo") |
| 3966 | status, output = subprocess.getstatusoutput( |
| 3967 | ("type " if mswindows else "cat ") + name) |
| 3968 | self.assertNotEqual(status, 0) |
| 3969 | finally: |
| 3970 | if dir is not None: |
| 3971 | os.rmdir(dir) |
| 3972 | |
| 3973 | def test__all__(self): |
| 3974 | """Ensure that __all__ is populated properly.""" |
nothing calls this directly
no test coverage detected