@@ -373,6 +373,13 @@ def setUp(self):
373
373
self .value = Axis ('value' , ':10' )
374
374
self .collection = AxisCollection ((self .lipro , self .sex , self .age ))
375
375
376
+ def test_eq (self ):
377
+ col = self .collection
378
+ self .assertEqual (col , col )
379
+ self .assertEqual (col , AxisCollection ((self .lipro , self .sex , self .age )))
380
+ self .assertEqual (col , (self .lipro , self .sex , self .age ))
381
+ self .assertNotEqual (col , (self .lipro , self .age , self .sex ))
382
+
376
383
def test_getitem_name (self ):
377
384
col = self .collection
378
385
self .assertEqual (col ['lipro' ], self .lipro )
@@ -600,7 +607,10 @@ def test_getitem(self):
600
607
lipro159 = lipro ['P01,P05,P09' ]
601
608
602
609
# ValueGroup at "correct" place
603
- self ._assert_equal_raw (la [age159 ], raw [[1 , 5 , 9 ]])
610
+ subset = la [age159 ]
611
+ self .assertEqual (subset .axes [1 :], (geo , sex , lipro ))
612
+ self .assertEqual (subset .axes [0 ], Axis ('age' , ['1' , '5' , '9' ]))
613
+ self ._assert_equal_raw (subset , raw [[1 , 5 , 9 ]])
604
614
605
615
# ValueGroup at "incorrect" place
606
616
self ._assert_equal_raw (la [lipro159 ], raw [..., [0 , 4 , 8 ]])
0 commit comments