Skip to content

Commit

Permalink
fix: doctests fussiness and pyarrow dep
Browse files Browse the repository at this point in the history
  • Loading branch information
thorwhalen committed Dec 17, 2024
1 parent df7a2b6 commit b241718
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ install_requires =
dol
i2
charset_normalizer
pyarrow

[options.extras_require]
test =
Expand Down
8 changes: 4 additions & 4 deletions tabled/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ def _ensure_table_filter(filt: TableFilter) -> Callable:
>>> filt_func = _ensure_table_filter('foo')
>>> bool(filt_func(pd.DataFrame({'foo': [1, 2]})))
True
>>> filt_func(pd.DataFrame({'bar': [1, 2]}))
>>> bool(filt_func(pd.DataFrame({'bar': [1, 2]})))
False
>>> filt_func = _ensure_table_filter(['foo', 'bar'])
>>> filt_func(pd.DataFrame({'football': [1, 2], 'baring': [3, 4]}))
>>> bool(filt_func(pd.DataFrame({'football': [1, 2], 'baring': [3, 4]})))
True
>>> filt_func(pd.DataFrame({'football': [1, 2], 'neither': [3, 4]}))
>>> bool(filt_func(pd.DataFrame({'football': [1, 2], 'neither': [3, 4]})))
False
But if a same column name matches both regexes, it should return True:
>>> filt_func(pd.DataFrame({'foobar': [1, 2], 'huh': [3, 4]}))
>>> bool(filt_func(pd.DataFrame({'foobar': [1, 2], 'huh': [3, 4]})))
True
"""
Expand Down

0 comments on commit b241718

Please sign in to comment.