The Linux process mock code in the MockProcess class generates strings that are to be used as the contents of the /proc/<PID>/cmdline and /proc/<PID>/status files. These strings are passed to the io.BytesIO() constructor in the mock of open(). This works in Python 2.7 but not in Python 3.x.
The Linux process mock code in the MockProcess class generates strings that are to be used as the contents of the
/proc/<PID>/cmdline
and/proc/<PID>/status
files. These strings are passed to theio.BytesIO()
constructor in the mock ofopen()
. This works in Python 2.7 but not in Python 3.x.