Skip to content

Commit

Permalink
tests: Update dataset __repr__ tests [1/2]
Browse files Browse the repository at this point in the history
Updates the dataset `__repr__` test to assure that the dataset output
honours the `display_max_rows` setting, not the `data_vars` output.

Discussed in pydata#5545
  • Loading branch information
st-bender committed Jul 5, 2021
1 parent aef4435 commit 6a8ca19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xarray/tests/test_formatting.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ def test__mapping_repr(display_max_rows, n_vars, n_attr):
with xr.set_options(display_max_rows=display_max_rows):

# Parse the data_vars print and show only data_vars rows:
summary = formatting.data_vars_repr(ds.data_vars).split("\n")
summary = formatting.dataset_repr(ds).split("\n")
summary = [v for v in summary if long_name in v]

# The length should be less than or equal to display_max_rows:
Expand Down

0 comments on commit 6a8ca19

Please sign in to comment.