def test_ssh_deployer_get_pid(self):
    """
    Test get_pid
    """
    self.trivial_deployer.deploy("unique_id0", {'hostname': "localhost"})
    #self.trivial_deployer.deploy("unique_id1", {'hostname': "localhost"})
    #self.trivial_deployer.deploy("unique_id2", {'hostname': "localhost"})
    #self.trivial_deployer.deploy("unique_id3", {'hostname': "localhost"})
    #self.trivial_deployer.deploy("unique_id4", {'hostname': "localhost"})
    pids = self.trivial_deployer.get_pid("unique_id0",
                                         {'pid_keyword': 'trivial_program'})
    assert len(pids) > 0
    pid_file = "/tmp/test_ssh_deployer_get_pid_file"
    with open(pid_file, 'w') as f:
      file_str = '\n'.join([str(pid) for pid in pids])
      f.write(file_str)
    assert pids == self.trivial_deployer.get_pid("unique_id0", {'pid_file': pid_file})
    self.trivial_deployer.undeploy("unique_id0")
    assert self.trivial_deployer.get_pid("unique_id0", {'pid_keyword': 'samples/trivial_program'})\
           == constants.PROCESS_NOT_RUNNING_PID
    os.remove(pid_file)
    self.trivial_deployer.undeploy("unique_id0")
dataset/ETHPy150Open linkedin/Zopkio/test/test_adhoc_deployer.py/TestAdhocDeployer.test_ssh_deployer_get_pid/original