home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 659135636

This data as json

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-659135636 https://api.github.com/repos/pydata/xarray/issues/4230 659135636 MDEyOklzc3VlQ29tbWVudDY1OTEzNTYzNg== 69774 2020-07-16T03:27:43Z 2020-07-16T03:27:43Z NONE

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 )

I'm not very good with HTML, does this only check on the number of collapsed sections? I am kinda guessing that this code is abusing checkbox code to make the display collapsible? How could I check specifically if the data section is collapsed based on the OPTION setting?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  657792526
Powered by Datasette · Queries took 0.533ms · About: xarray-datasette