def test_listify(self):
     """Other objects should just result in a single item list."""
     self.assertEqual(aslist(dict()), [{}])
 def test_None(self):
     self.assertEqual(aslist(None), [])
 def test_listy_noops(self):
     """Lists and tuples should come back unchanged."""
     x = [1, 2, 3]
     self.assertEqual(aslist(x), x)
     y = ("z", "y", "x")
     self.assertEqual(aslist(y), y)
 def test_string(self):
     self.assertEqual(aslist("abc"), ["abc"])
     self.assertEqual(aslist("1a2a3", "a"), ["1", "2", "3"])
Beispiel #5
0
 def test_listify(self):
     """Other objects should just result in a single item list."""
     self.assertEqual(aslist(dict()), [{}])
Beispiel #6
0
 def test_listy_noops(self):
     """Lists and tuples should come back unchanged."""
     x = [1, 2, 3]
     self.assertEqual(aslist(x), x)
     y = ('z', 'y', 'x')
     self.assertEqual(aslist(y), y)
Beispiel #7
0
 def test_None(self):
     self.assertEqual(aslist(None), [])
Beispiel #8
0
 def test_string(self):
     self.assertEqual(aslist('abc'), ['abc'])
     self.assertEqual(aslist('1a2a3', 'a'), ['1', '2', '3'])