Skip to content

Commit 577f38d

Browse files
authored
INTPYTHON-556 Fix expected exception in polars test (#288)
1 parent fe37121 commit 577f38d

File tree

2 files changed

+30
-3
lines changed

2 files changed

+30
-3
lines changed

bindings/python/MANIFEST.in

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
include README.md
2+
include CHANGELOG.md
3+
include CONTRIBUTING.md
4+
include LICENSE
5+
include THIRD-PARTY-NOTICES
6+
include *.sh
7+
include pyproject.toml
8+
include tox.ini
9+
10+
exclude RELEASE.md
11+
exclude asv.conf.json
12+
13+
graft pymongoarrow
14+
15+
recursive-include test *
16+
recursive-exclude docs *
17+
recursive-exclude benchmarks *
18+
19+
global-exclude *.cpp
20+
global-exclude *.dylib
21+
global-exclude *.so.*
22+
global-exclude *.so
23+
global-exclude *.dll
24+
global-exclude *.pyd
25+
global-exclude *.pyc
26+
global-exclude .git*
27+
global-exclude .DS_Store

bindings/python/test/test_polars.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,17 +255,17 @@ def test_exceptions_for_unsupported_polar_types(self):
255255
Tracks future changes in any packages.
256256
"""
257257

258-
# Series: PyMongoError does not support
258+
# Series: PyMongoError does not support.
259259
with self.assertRaises(ValueError) as exc:
260260
pls = pl.Series(values=range(2))
261261
write(self.coll, pls)
262262
self.assertTrue("Invalid tabular data object" in exc.exception.args[0])
263263

264-
# Polars has an Object Type, similar in concept to Pandas
264+
# Polars has an Object Type, similar in concept to Pandas. PyMongoError does not support them.
265265
class MyObject:
266266
pass
267267

268-
with self.assertRaises(pl.exceptions.PanicException) as exc:
268+
with self.assertRaises(ValueError) as exc:
269269
df_in = pl.DataFrame(data=[MyObject()] * 2)
270270
write(self.coll, df_in)
271271

0 commit comments

Comments
 (0)