(self)
| 1322 | run_async(IgnoreGeneratorExit().aclose()) |
| 1323 | |
| 1324 | def test_Sized(self): |
| 1325 | non_samples = [None, 42, 3.14, 1j, |
| 1326 | _test_gen(), |
| 1327 | (x for x in []), |
| 1328 | ] |
| 1329 | for x in non_samples: |
| 1330 | self.assertNotIsInstance(x, Sized) |
| 1331 | self.assertNotIsSubclass(type(x), Sized) |
| 1332 | samples = [bytes(), str(), |
| 1333 | tuple(), list(), set(), frozenset(), dict(), |
| 1334 | dict().keys(), dict().items(), dict().values(), |
| 1335 | ] |
| 1336 | for x in samples: |
| 1337 | self.assertIsInstance(x, Sized) |
| 1338 | self.assertIsSubclass(type(x), Sized) |
| 1339 | self.validate_abstract_methods(Sized, '__len__') |
| 1340 | self.validate_isinstance(Sized, '__len__') |
| 1341 | |
| 1342 | def test_Container(self): |
| 1343 | non_samples = [None, 42, 3.14, 1j, |
nothing calls this directly
no test coverage detected