Skip to content

INTPYTHON-556 Fix expected exception in polars test #288

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions bindings/python/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
include README.md
include CHANGELOG.md
include CONTRIBUTING.md
include LICENSE
include THIRD-PARTY-NOTICES
include *.sh
include pyproject.toml
include tox.ini

exclude RELEASE.md
exclude asv.conf.json

graft pymongoarrow

recursive-include test *
recursive-exclude docs *
recursive-exclude benchmarks *

global-exclude *.cpp
global-exclude *.dylib
global-exclude *.so.*
global-exclude *.so
global-exclude *.dll
global-exclude *.pyd
global-exclude *.pyc
global-exclude .git*
global-exclude .DS_Store
Comment on lines +1 to +27
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

possible dumb question. What's all this for?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are rules to determine what's included in the distribution when it's made. https://setuptools.pypa.io/en/latest/userguide/miscellaneous.html

6 changes: 3 additions & 3 deletions bindings/python/test/test_polars.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,17 +255,17 @@ def test_exceptions_for_unsupported_polar_types(self):
Tracks future changes in any packages.
"""

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

# Polars has an Object Type, similar in concept to Pandas
# Polars has an Object Type, similar in concept to Pandas. PyMongoError does not support them.
class MyObject:
pass

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

Expand Down
Loading