Python Forum
Mock call to subprocess.Popen failing with StopIteration
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mock call to subprocess.Popen failing with StopIteration
#2
StopIteration is the normal exception sent by an iterator at the end of its iteration. For example
>>> L = [1, 2, 3]
>>> effect = iter(L)
>>> next(effect)
1
>>> next(effect)
2
>>> next(effect)
3
>>> next(effect)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
StopIteration
It means that the iterable 'effect' was exhausted.
Reply


Messages In This Thread
RE: subprocess.Popen failing with StopIteration - by Gribouillis - Nov-07-2019, 08:57 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Understanding subprocess.Popen Pedroski55 6 252 May-12-2024, 10:46 AM
Last Post: Pedroski55
  Failing to connect by 'net use' tester_V 1 235 Apr-20-2024, 06:31 AM
Last Post: tester_V
Information subprocess.Popen() suddenly giving me grief? davecotter 3 668 Dec-13-2023, 10:49 PM
Last Post: davecotter
  unittest.mock for an api key silver 3 1,429 Aug-29-2022, 03:52 PM
Last Post: ndc85430
  Failing regex tester_V 3 1,235 Aug-16-2022, 03:53 PM
Last Post: deanhystad
  Use subprocess.Popen and time.sleep chucky831 2 1,990 Aug-11-2022, 07:53 PM
Last Post: carecavoador
  Mock obj - How to call the side_effect every time during the run? pythonisbae 3 2,720 Mar-06-2022, 09:37 AM
Last Post: pythonisbae
  continue if 'subprocess.call' failes tester_V 11 5,333 Aug-26-2021, 12:16 AM
Last Post: tester_V
  Failing to connect to a host with WMI tester_V 6 4,485 Aug-10-2021, 06:25 PM
Last Post: tester_V
  printing out the contents aftre subprocess.call() Rakshan 3 2,826 Jul-30-2021, 08:27 AM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020