From 2431150d691f5ccdb3da204a46e346c156ea2523 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Mon, 16 Nov 2020 10:53:05 +0100
Subject: [PATCH] doctest: adjust __init__ TypeError formatting

Python3.10 includes the class name in the TypeError string for
__init__(), so the literal match does not work anymore.
---
 tables/atom.py    | 4 ++--
 tables/filters.py | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tables/atom.py b/tables/atom.py
index 81d37c54..9cfd8609 100644
--- a/tables/atom.py
+++ b/tables/atom.py
@@ -569,10 +569,10 @@ class Atom(metaclass=MetaAtom):
             >>> atom3 = atom1.copy(shape=(2, 2))
             >>> print(atom3)
             Int32Atom(shape=(2, 2), dflt=0)
-            >>> atom1.copy(foobar=42)
+            >>> atom1.copy(foobar=42) #doctest: +ELLIPSIS
             Traceback (most recent call last):
             ...
-            TypeError: __init__() got an unexpected keyword argument 'foobar'
+            TypeError: ...__init__() got an unexpected keyword argument 'foobar'
 
         """
         newargs = self._get_init_args()
diff --git a/tables/filters.py b/tables/filters.py
index f809ce77..7cb9b02d 100644
--- a/tables/filters.py
+++ b/tables/filters.py
@@ -432,10 +432,10 @@ class Filters:
             Filters(complevel=0, shuffle=False, bitshuffle=False, fletcher32=False, least_significant_digit=None)
             >>> print(filters3)
             Filters(complevel=1, complib='zlib', shuffle=False, bitshuffle=False, fletcher32=False, least_significant_digit=None)
-            >>> filters1.copy(foobar=42)
+            >>> filters1.copy(foobar=42) #doctest: +ELLIPSIS
             Traceback (most recent call last):
             ...
-            TypeError: __init__() got an unexpected keyword argument 'foobar'
+            TypeError: ...__init__() got an unexpected keyword argument 'foobar'
 
         """
 
-- 
2.32.0

