Skip to content

Commit 45d82ea

Browse files
committed
-
1 parent cc1f5b1 commit 45d82ea

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

source_py3/test_python_toolbox/test_nifty_collections/test_bagging.py

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -365,30 +365,30 @@ def test_operations(self):
365365

366366

367367

368-
def test_get_contained_bags(self):
369-
bag = self.bag_type('abracadabra')
370-
contained_bags = bag.get_contained_bags()
371-
assert len(contained_bags) == 2 ** len('abracadabra')
372-
had_full_one = False
373-
for contained_bag in contained_bags:
374-
assert contained_bag <= bag
375-
if contained_bag == bag:
376-
assert had_full_one is False
377-
had_full_one = True
378-
else:
379-
assert contained_bag < bag
380-
if isinstance(bag, nifty_collections.Ordered):
381-
assert cute_iter_tools.is_sorted(
382-
tuple(contained_bag.items()),
383-
key=tuple(bag.items()).index
384-
)
385-
386-
contained_bags_tuple = tuple(contained_bags)
387-
assert self.bag_type('arcaba') in contained_bags_tuple
388-
assert self.bag_type('db') in contained_bags_tuple
389-
assert self.bag_type() in contained_bags_tuple
390-
assert self.bag_type('x') not in contained_bags_tuple
368+
def test_get_contained_bags(self):
369+
bag = self.bag_type('abracadabra')
370+
contained_bags = bag.get_contained_bags()
371+
assert len(contained_bags) == 6 * 3 * 2 * 2 * 3
372+
had_full_one = False
373+
for contained_bag in contained_bags:
374+
assert contained_bag <= bag
375+
if contained_bag == bag:
376+
assert had_full_one is False
377+
had_full_one = True
378+
else:
379+
assert contained_bag < bag
380+
if isinstance(bag, nifty_collections.Ordered):
381+
assert cute_iter_tools.is_sorted(
382+
tuple(contained_bag.keys()),
383+
key=tuple(bag.keys()).index
384+
)
391385

386+
contained_bags_tuple = tuple(contained_bags)
387+
assert self.bag_type('abraca') in contained_bags_tuple
388+
assert self.bag_type('bd') in contained_bags_tuple
389+
assert self.bag_type() in contained_bags_tuple
390+
assert self.bag_type('x') not in contained_bags_tuple
391+
392392

393393

394394
class BaseMutableBagTestCase(BaseBagTestCase):

0 commit comments

Comments
 (0)