@@ -366,30 +366,30 @@ def test_operations(self):
366366
367367
368368
369- def test_get_contained_bags (self ):
370- bag = self .bag_type ('abracadabra' )
371- contained_bags = bag .get_contained_bags ()
372- assert len (contained_bags ) == 2 ** len ('abracadabra' )
373- had_full_one = False
374- for contained_bag in contained_bags :
375- assert contained_bag <= bag
376- if contained_bag == bag :
377- assert had_full_one is False
378- had_full_one = True
379- else :
380- assert contained_bag < bag
381- if isinstance (bag , nifty_collections .Ordered ):
382- assert cute_iter_tools .is_sorted (
383- tuple (contained_bag .items ()),
384- key = tuple (bag .items ()).index
385- )
386-
387- contained_bags_tuple = tuple (contained_bags )
388- assert self .bag_type ('arcaba' ) in contained_bags_tuple
389- assert self .bag_type ('db' ) in contained_bags_tuple
390- assert self .bag_type () in contained_bags_tuple
391- assert self .bag_type ('x' ) not in contained_bags_tuple
369+ def test_get_contained_bags (self ):
370+ bag = self .bag_type ('abracadabra' )
371+ contained_bags = bag .get_contained_bags ()
372+ assert len (contained_bags ) == 6 * 3 * 2 * 2 * 3
373+ had_full_one = False
374+ for contained_bag in contained_bags :
375+ assert contained_bag <= bag
376+ if contained_bag == bag :
377+ assert had_full_one is False
378+ had_full_one = True
379+ else :
380+ assert contained_bag < bag
381+ if isinstance (bag , nifty_collections .Ordered ):
382+ assert cute_iter_tools .is_sorted (
383+ tuple (contained_bag .keys ()),
384+ key = tuple (bag .keys ()).index
385+ )
392386
387+ contained_bags_tuple = tuple (contained_bags )
388+ assert self .bag_type ('abraca' ) in contained_bags_tuple
389+ assert self .bag_type ('bd' ) in contained_bags_tuple
390+ assert self .bag_type () in contained_bags_tuple
391+ assert self .bag_type ('x' ) not in contained_bags_tuple
392+
393393
394394
395395class BaseMutableBagTestCase (BaseBagTestCase ):
@@ -552,8 +552,8 @@ def test_mutating(self):
552552 assert bag == self .bag_type ('brcdbr' )
553553
554554 bag = bag_reference = self .bag_type ('abracadabra' )
555- bag .update (bag )
556- assert bag == self .bag_type ('abracadabra ' )
555+ bag .update (self . bag_type ( 'axy' ) )
556+ assert bag == self .bag_type ('abrcdbrxy ' )
557557 assert bag is bag_reference
558558
559559 def test_clear (self ):
0 commit comments