Skip to content

Commit 9c523d5

Browse files
committed
make linter happy
Signed-off-by: Itay Dafna <[email protected]>
1 parent 4c4f633 commit 9c523d5

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

tests/test_datagrid.py

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
1-
import pytest
21
import pandas as pd
2+
33
from ipydatagrid import DataGrid
44

55

66
def test_selections():
7-
df = pd.DataFrame(data={"A":[1,2,3],"B":[4,5,6]})
8-
datagrid = DataGrid(df, selection_mode="cell", layout={"height":"100px"}, editable=True)
9-
datagrid.select(1,0,2,1) # Select 1A to 2B
7+
df = pd.DataFrame(data={"A": [1, 2, 3], "B": [4, 5, 6]})
8+
datagrid = DataGrid(
9+
df, selection_mode="cell", layout={"height": "100px"}, editable=True
10+
)
11+
datagrid.select(1, 0, 2, 1) # Select 1A to 2B
12+
13+
assert datagrid.selections == [{"r1": 1, "c1": 0, "r2": 2, "c2": 1}]
1014

11-
assert datagrid.selections == [{'r1': 1, 'c1': 0, 'r2': 2, 'c2': 1}]
1215

1316
def test_selection_clearing():
14-
df = pd.DataFrame(data={"A":[1,2,3],"B":[4,5,6]})
15-
datagrid = DataGrid(df, selection_mode="cell", layout={"height":"100px"}, editable=True)
16-
datagrid.select(1,0,2,1) # Select 1A to 2B
17+
df = pd.DataFrame(data={"A": [1, 2, 3], "B": [4, 5, 6]})
18+
datagrid = DataGrid(
19+
df, selection_mode="cell", layout={"height": "100px"}, editable=True
20+
)
21+
datagrid.select(1, 0, 2, 1) # Select 1A to 2B
1722
datagrid.clear_selection()
18-
assert datagrid.selections == []
23+
assert datagrid.selections == []

0 commit comments

Comments
 (0)