Closed prabi closed 5 years ago
Great! Can you think of a test that would verify this?
Sure. My favorite is pypass --PASSWORD_STORE_DIR a_test_vault git log -1 --pretty=%B
which shows the last commit message (and two newlines) in a_test_vault
if it's a git repo. It works when I use it in the terminal.
On the other hand, when I automate it with self.run_cli(['git', 'log', '-1', '--pretty=%B'])
I get
WARNING: terminal is not fully functional
- (press RETURN)
in the console. I think this is a limitation of click.testing.CliRunner.invoke
. Do you have any idea how to overcome this?
Maybe that is because git log
requires a terminal for the scrolling function.
Maybe another command would work?
Thank you for your great suggestion. I switched from the previous test case to git commit --amend -m sth
which works flawlessly. I also used a slightly different implementation straight from click's advanced documentation.
Awesome! Thanks :tada:
Coverage increased (+0.2%) to 91.452% when pulling c4205697819896c6a429d83eeac930fc235aa8e9 on prabi:git_pass_opts into f437cf75a8806c59cf337755cfc0efa572d696cd on aviau:master.