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 2b458c1dba4058c808fde25226bb2d91c5a909ca)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
diff --git a/Lib/test/test_csv.py b/Lib/test/test_csv.py
index 2411a91..a1e050a 100644
--- a/Lib/test/test_csv.py
+++ b/Lib/test/test_csv.py
@@ -1237,6 +1237,9 @@ def test__all__(self):
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()