bpo-44089: Allow subclassing of `csv.Error` (GH-26008) (GH-26066)

* fix subclass error

* Update 2021-05-09-22-52-34.bpo-44089.IoANsN.rst
(cherry picked from commit 2b458c1dba)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2021-05-12 07:02:46 -07:00 committed by GitHub
parent 48cb11bf5b
commit 3e44e9af9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View file

@ -1237,6 +1237,9 @@ class MiscTestCase(unittest.TestCase):
extra = {'__doc__', '__version__'}
support.check__all__(self, csv, ('csv', '_csv'), extra=extra)
def test_subclassable(self):
# issue 44089
class Foo(csv.Error): ...
if __name__ == '__main__':
unittest.main()