mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
bpo-43988: Use check disallow instantiation helper (GH-26392)
This commit is contained in:
parent
3e7ee02327
commit
fbff5387c3
14 changed files with 37 additions and 51 deletions
|
@ -1549,9 +1549,7 @@ class StdPrinterTests(EmbeddingTestsMixin, unittest.TestCase):
|
|||
def test_disallow_instantiation(self):
|
||||
fd = self.get_stdout_fd()
|
||||
printer = self.create_printer(fd)
|
||||
PyStdPrinter_Type = type(printer)
|
||||
with self.assertRaises(TypeError):
|
||||
PyStdPrinter_Type(fd)
|
||||
support.check_disallow_instantiation(self, type(printer))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue