Example #1
0
 def test_with_generator(self):
     gen = (0 for i in range(3))
     # generators/iterators should not be modified.
     assert _typelist(gen) == gen
Example #2
0
 def test_with_single_type(self):
     assert _typelist(int) == [0]
Example #3
0
 def test_with_single_object(self):
     assert _typelist(0) == [0]
Example #4
0
 def test_with_list_of_types(self):
     assert _typelist([int, int, int]) == [0, 0, 0]
Example #5
0
 def test_with_list_of_objects(self):
     assert _typelist([0, 0, 0]) == [0, 0, 0]
Example #6
0
 def read(self, response_type):
     response = self._protocol.parse_response(self._protocol.get_response())
     return _load(_typelist(response_type), response)