()
| 97 | |
| 98 | |
| 99 | def test_series_repr(): |
| 100 | s = pd.Series([1, 2, 3, 4, 5, 6, 7, 8], index=list("ABCDEFGH")) |
| 101 | dtype = "string" if pyarrow_strings_enabled() else "object" |
| 102 | ds = from_pandas(s, 3) |
| 103 | |
| 104 | exp = dedent("""\ |
| 105 | Dask Series Structure: |
| 106 | npartitions=3 |
| 107 | A int64 |
| 108 | D ... |
| 109 | G ... |
| 110 | H ... |
| 111 | Dask Name: frompandas, 1 expression |
| 112 | Expr=df""") |
| 113 | assert repr(ds) == exp |
| 114 | |
| 115 | # Not a cheap way to determine if series is empty |
| 116 | # so does not prefix with "Empty" as we do w/ empty DataFrame |
| 117 | s = pd.Series([]) |
| 118 | ds = from_pandas(s, 3) |
| 119 | |
| 120 | exp = dedent(f"""\ |
| 121 | Dask Series Structure: |
| 122 | npartitions=3 |
| 123 | {dtype} |
| 124 | ... |
| 125 | ... |
| 126 | ... |
| 127 | Dask Name: frompandas, 1 expression |
| 128 | Expr=df""") |
| 129 | assert repr(ds) == exp |
| 130 | |
| 131 | |
| 132 | def test_df_repr(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…