Skip to content

Commit ed4be31

Browse files
committed
fix: fix more doctests with print trick
1 parent c9471c7 commit ed4be31

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

bigframes/operations/ai.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -612,8 +612,11 @@ def sim_join(
612612
>>> df1 = bpd.DataFrame({'animal': ['monkey', 'spider']})
613613
>>> df2 = bpd.DataFrame({'animal': ['scorpion', 'baboon']})
614614
615-
>>> df1.ai.sim_join(df2, left_on='animal', right_on='animal', model=model, top_k=1)
616-
animal animal_1
615+
>>> print("START_OF_OUTPUT"); df1.ai.sim_join(df2, left_on='animal', right_on='animal', model=model, top_k=1) # doctest: +ELLIPSIS,+NORMALIZE_WHITESPACE
616+
START_OF_OUTPUT
617+
...
618+
animal animal_1
619+
...
617620
0 monkey baboon
618621
1 spider scorpion
619622
<BLANKLINE>

bigframes/session/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -664,9 +664,11 @@ def read_gbq_query(
664664
... WHERE year = 2016
665665
... GROUP BY pitcherFirstName, pitcherLastName
666666
... ''', index_col="rowindex")
667-
>>> df.head(2)
667+
>>> print("START_OF_OUTPUT"); df.head(2) # doctest: +ELLIPSIS,+NORMALIZE_WHITESPACE
668+
START_OF_OUTPUT
669+
...
668670
pitcherFirstName pitcherLastName averagePitchSpeed
669-
rowindex
671+
...
670672
1 Albertin Chapman 96.514113
671673
2 Zachary Britton 94.591039
672674
<BLANKLINE>

0 commit comments

Comments
 (0)