pytest-cpp icon indicating copy to clipboard operation
pytest-cpp copied to clipboard

Handle FileNotFoundError if no XML file

Open baraserg opened this issue 3 years ago • 2 comments

If a google test exits unexpectedly or using exit, the XML file will not be generated, this handles the FileNotFoundError exception and returns the output to the console

baraserg avatar Oct 05 '22 22:10 baraserg

Thanks! Any chance of writing a test for this, to ensure it does not regress?

nicoddemus avatar Oct 06 '22 00:10 nicoddemus

One idea might be to mock subprocess.check_output so it does nothing, which would then reach that code.

nicoddemus avatar Oct 06 '22 00:10 nicoddemus

Closing this for now, glad to reopen if we can get a test for this. 👍

nicoddemus avatar Jul 04 '23 20:07 nicoddemus