File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 55def test_to_dict ():
66 obj = BiocFrame ({"A" : [1 , 2 ], "B" : [3 , 4 ]})
77 d = obj .to_dict ()
8-
8+
99 assert isinstance (d , dict )
1010 assert d ["A" ] == [1 , 2 ]
1111 assert d ["B" ] == [3 , 4 ]
1212 assert d is obj .get_data ()
1313
1414def test_to_NamedList ():
1515 obj = BiocFrame ({"A" : [1 , 2 ], "B" : [3 , 4 ]})
16-
16+
1717 nl = obj .to_NamedList ()
1818 assert isinstance (nl , ut .NamedList )
1919 assert len (nl ) == 2
2020 assert nl .get_names ().as_list () == ["A" , "B" ]
2121 assert nl [0 ] == [1 , 2 ]
22-
22+
2323 # Test order
2424 obj = BiocFrame ({"B" : [3 , 4 ], "A" : [1 , 2 ]})
2525 obj = obj .set_column_names (["B" , "A" ])
26-
26+
2727 obj2 = BiocFrame ({}, column_names = [])
2828 obj2 ["Z" ] = [1 ]
2929 obj2 ["X" ] = [2 ]
30-
30+
3131 nl2 = obj2 .to_NamedList ()
3232 assert nl2 .get_names ().as_list () == ["Z" , "X" ]
3333 assert nl2 [0 ] == [1 ]
34- assert nl2 [1 ] == [2 ]
34+ assert nl2 [1 ] == [2 ]
You can’t perform that action at this time.
0 commit comments