Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"-j",
]
proc = subprocess.Popen(
cli_cmd,
stdin=subprocess.PIPE,
stderr=subprocess.PIPE,
stdout=subprocess.PIPE,
)
stdout, stderr = proc.communicate(input=watchman_cmd)
self.assertEqual(proc.poll(), 0, stderr)
# the response should be bser to match our input
result = bser.loads(stdout)
result_sockname = result["sockname"]
if compat.PYTHON3:
result_sockname = encoding.decode_local(result_sockname)
self.assertEqual(
result_sockname, sockname, binascii.hexlify(stdout).decode("ascii")
)