CLI test coverage

I am interested in having pytest test the CLI of yaml2ics. I think you can use tools like click to do that. Is click the right tool for something like that? If so, does anyone have any recommendations or examples for how to do it? If not, what do folks recommend?

I think click.testing.CliRunner is specific to testing click interfaces and I had success with creating a pytest fixture with it in the past. However, it doesn’t look like yaml2ics is using click, so it is probably not immediately applicable. Otherwise I’m not aware of an existing approach except for building something with subprocess.

1 Like