3 ms·
pytest-docker-pexpect: https://github.com/nvbn/pytest-docker-pexpect https://github.com/nvbn/pytest-docker-pexpect Pexpect: https://pexpect.readthedocs.io/en/s
by westurner 7y ago
pytest-docker-pexpect: https://github.com/nvbn/pytest-docker-pexpect https://github.com/nvbn/pytest-docker-pexpect
Pexpect: https://pexpect.readthedocs.io/en/stable/ https://pexpect.readthedocs.io/en/stable/
pytest with subprocess.popen (or Sarge) may be sufficient for checking return codes and checking stdout and stderr output streams. Pytest has tmp_path and tmpdir fixtures that provide less test isolation than Docker containers: http://doc.pytest.org/en/latest/tmpdir.html http://doc.pytest.org/en/latest/tmpdir.html
sarge.Capture.expect() takes a regex and returns None if there's no match: https://sarge.readthedocs.io/en/latest/tutorial.html#looking-for-specific-patterns-in-child-process-output https://sarge.readthedocs.io/en/latest/tutorial.html#looking...