We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dda42be commit f54510dCopy full SHA for f54510d
pandas/tests/frame/methods/test_to_dict.py
@@ -132,9 +132,11 @@ def test_to_dict(self, mapping):
132
def test_to_dict_errors(self, mapping):
133
# GH#16122
134
df = DataFrame(np.random.randn(3, 3))
135
- msg = (
136
- r"(:?unsupported type: <class 'list'\>)"
137
- r"|(:?to_dict\(\) only accepts initialized defaultdicts)"
+ msg = "|".join(
+ [
+ "unsupported type: <class 'list'>",
138
+ r"to_dict\(\) only accepts initialized defaultdicts",
139
+ ]
140
)
141
with pytest.raises(TypeError, match=msg):
142
df.to_dict(into=mapping)
0 commit comments