def test_unpack_complex(self): raw = "(hello,hi|world)" result = unpack(raw) expected = ( "hello,hi", "world", ) self.assertEqual(expected, result)
def test_unpack(self): raw = "(hello|world)" result = unpack(raw) expected = ( "hello", "world", ) self.assertEqual(expected, result)
def load_dict(f): for l in f: yield set( map( lambda x: tuple(map(clean, x)), map( lambda x: set( [line for line in x.split(",") if len(line) > 0]), unpack(l))))
def test_unpack_complex(self): raw = "(hello,hi|world)" result = unpack(raw) expected = ("hello,hi", "world") self.assertEqual(expected, result)
def test_unpack_on_default(self): raw = "hello" result = unpack(raw) self.assertEqual(("hello",), result)
def test_unpack(self): raw = "(hello|world)" result = unpack(raw) expected = ("hello", "world") self.assertEqual(expected, result)
def load_dict(f): for l in f: yield set(map(lambda x: tuple(map(clean, x)), map(lambda x: set([line for line in x.split(",") if len(line) > 0]), unpack(l))))
def test_unpack_on_default(self): raw = "hello" result = unpack(raw) self.assertEqual(("hello", ), result)