Update completion tests, checking for printed message

This commit is contained in:
Sebastián Ramírez 2019-12-31 11:32:22 +01:00 committed by GitHub
commit 1a3db115de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,5 +45,7 @@ def test_install_completion():
env={**os.environ, "SHELL": "/bin/bash"},
)
new_text = bash_completion_path.read_text()
assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in new_text
bash_completion_path.write_text(text)
assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in new_text
assert "completion installed in" in result.stdout
assert "Completion will take effect once you restart the terminal." in result.stdout