mirror of
https://github.com/python/cpython.git
synced 2025-11-24 20:30:18 +00:00
bpo-39019: Implement missing __class_getitem__ for subprocess classes (GH-17558)
This commit is contained in:
parent
89aa7f0ede
commit
4dc5a9df59
3 changed files with 29 additions and 0 deletions
|
|
@ -1435,6 +1435,9 @@ class ProcessTestCase(BaseTestCase):
|
|||
subprocess.Popen(['exit', '0'], cwd='/some/nonexistent/directory')
|
||||
self.assertEqual(c.exception.filename, '/some/nonexistent/directory')
|
||||
|
||||
def test_class_getitems(self):
|
||||
self.assertIs(subprocess.Popen[bytes], subprocess.Popen)
|
||||
self.assertIs(subprocess.CompletedProcess[str], subprocess.CompletedProcess)
|
||||
|
||||
class RunFuncTestCase(BaseTestCase):
|
||||
def run_python(self, code, **kwargs):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue