(self)
| 342 | |
| 343 | @support.requires_resource('cpu') |
| 344 | def test_args_argument(self): |
| 345 | # bpo-45735: Using list or tuple as *args* in constructor could |
| 346 | # achieve the same effect. |
| 347 | args_cases = (1, "str", [1], (1,)) |
| 348 | args_types = (list, tuple) |
| 349 | |
| 350 | test_cases = itertools.product(args_cases, args_types) |
| 351 | |
| 352 | for args, args_type in test_cases: |
| 353 | with self.subTest(args=args, args_type=args_type): |
| 354 | q = self.Queue(1) |
| 355 | # pass a tuple or list as args |
| 356 | p = self.Process(target=self._test_args, args=args_type((q, args))) |
| 357 | p.daemon = True |
| 358 | p.start() |
| 359 | child_args = q.get() |
| 360 | self.assertEqual(child_args, args) |
| 361 | p.join() |
| 362 | close_queue(q) |
| 363 | |
| 364 | @classmethod |
| 365 | def _test_args(cls, q, arg): |
nothing calls this directly
no test coverage detected