Lines Matching refs:tp
31 def check_getitem_with_type(self, tp):
32 b = tp(self._source)
53 for tp in self._types:
54 self.check_getitem_with_type(tp)
57 for tp in self._types:
58 b = tp(self._source)
79 tp = self.rw_type
84 self._check_contents(tp, b, b"1bcdef")
85 m[0:1] = tp(b"0")
86 self._check_contents(tp, b, b"0bcdef")
87 m[1:3] = tp(b"12")
88 self._check_contents(tp, b, b"012def")
89 m[1:1] = tp(b"")
90 self._check_contents(tp, b, b"012def")
91 m[:] = tp(b"abcdef")
92 self._check_contents(tp, b, b"abcdef")
96 self._check_contents(tp, b, b"cdedef")
97 m[:] = tp(b"abcdef")
99 self._check_contents(tp, b, b"ababcf")
102 m[key] = tp(value)
129 for tp in self._types:
130 b = tp(self._source)
138 for tp in self._types:
139 m = self._view(tp(self._source))
148 for tp in self._types:
149 m = self._view(tp(self._source))
156 for tp in self._types:
157 m = self._view(tp(self._source))
183 def check_attributes_with_type(self, tp):
184 m = self._view(tp(self._source))
208 for tp in self._types:
209 b = tp(self._source)
214 self._check_contents(tp, b, s.encode("utf-8"))
220 for tp in self._types:
221 if not isinstance(tp, type):
222 # If tp is a factory rather than a plain type, skip
228 class MySource(tp):
235 b = MySource(tp(b'abc'))
247 m = MyView(tp(b'abc'))
257 def _check_released(self, m, tp):
278 self.assertNotEqual(m, memoryview(tp(self._source)))
279 self.assertNotEqual(m, tp(self._source))
282 for tp in self._types:
283 b = tp(self._source)
287 self._check_released(m, tp)
294 for tp in self._types:
295 b = tp(self._source)
298 self._check_released(m, tp)
301 self._check_released(m, tp)
306 tp = self.ro_type
307 if tp is None:
309 b = tp(self._source)
320 tp = self.ro_type
321 if tp is None:
323 b = tp(self._source)
337 tp = self.rw_type
338 if tp is None:
340 b = tp(self._source)
346 for tp in self._types:
347 b = tp(self._source)
360 for tp in self._types:
361 b = tp(self._source)
368 for tp in self._types:
369 b = tp(self._source)
435 def _check_contents(self, tp, obj, contents):
436 self.assertEqual(obj, tp(contents))
445 def _check_contents(self, tp, obj, contents):
446 self.assertEqual(obj[1:7], tp(contents))
449 for tp in self._types:
450 m = memoryview(tp(self._source))
462 def _check_contents(self, tp, obj, contents):
463 self.assertEqual(obj[1:7], tp(contents))
472 for tp in self._types:
473 ob = tp(self._source)