Closed
Description
Because ExitStatus
has a private field it is impossible to create one in user code, one must actually execute a process. This prevents testing/mocking. My use case is that I have some function which runs a process and generates data, however, for testing I want to mock the test run and just return a success exit status and some data. I can't do that because I can't create my own ExitStatus
objects.
At the least there should be a way to create a success ExitStatus
. Preferably, there would be a way to create various fail statuses too.