Removed unused files

This commit is contained in:
Shay Nehmad 2019-08-19 11:57:39 +03:00
parent aaab4a479c
commit d693b216a7
2 changed files with 0 additions and 27 deletions

View File

@ -1,9 +0,0 @@
from itertools import chain, combinations
def power_set(iterable):
"""
https://docs.python.org/3/library/itertools.html#itertools-recipes
"""
s = list(iterable)
return [list(x) for x in list(chain.from_iterable(combinations(s, r) for r in range(1, len(s) + 1)))]

View File

@ -1,18 +0,0 @@
from unittest import TestCase
class TestPower_set(TestCase):
def test_power_set(self):
before = ('a', 'b', 'c')
after_expected = [
['a'],
['b'],
['c'],
['a', 'b'],
['a', 'c'],
['b', 'c'],
['a', 'b', 'c'],
]
from common.utils.itertools_extensions import power_set
self.assertEquals(power_set(before), after_expected)