html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/pull/4230#issuecomment-661877612,https://api.github.com/repos/pydata/xarray/issues/4230,661877612,MDEyOklzc3VlQ29tbWVudDY2MTg3NzYxMg==,4806877,2020-07-21T13:57:19Z,2020-07-21T13:57:29Z,CONTRIBUTOR,"> I'm looking at the relevant test function:
>
> ```python
> def test_repr_of_dataarray(dataarray):
> formatted = fh.array_repr(dataarray)
> assert ""dim_0"" in formatted
> # has an expanded data section
> assert formatted.count(""class='xr-array-in' type='checkbox' checked>"") == 1
> # coords and attrs don't have an items so they'll be be disabled and collapsed
> assert (
> formatted.count(""class='xr-section-summary-in' type='checkbox' disabled >"") == 2
> )
> ```
>
> does this only check on the number of collapsed sections?
Yes, that test counts expanded data sections and collapsed summary sections
> How could I check specifically if the data section is collapsed based on the OPTION setting?
Use `set_option` as a context manager and do a test much like the one above.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,657792526