bpo-39019: Implement missing __class_getitem__ for subprocess classes (GH-17558)

This commit is contained in:
Batuhan Taşkaya 2019-12-30 19:02:04 +03:00 committed by Ivan Levkivskyi
parent 89aa7f0ede
commit 4dc5a9df59
3 changed files with 29 additions and 0 deletions

View file

@ -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):