In the arbitrary command testing in Conan 2, I cannot see the stderr output from Conan.
This is because of the patching in _patch_conan_output_initialiser
from conan.api.output import ConanOutput
conanoutput_old_init = ConanOutput.__init__
def new_init(self: ConanOutput, scope: str = "") -> None:
conanoutput_old_init(self, scope)
self.stream = QueuedStreamSix(queue, Stdout)
ConanOutput.__init__ = new_init
The code in src/cruizlib/workers/api/v2/arbitrary.py replaces the standard streams
temp_out = StringIO()
temp_err = StringIO()
sys.stdout = temp_out
sys.stderr = temp_err
but then the _patch_conan_output_initialiser replaces it again. So we never get to see it.
The long and short of this is that the tests cannot check expected message outputs in failure cases.
In the arbitrary command testing in Conan 2, I cannot see the stderr output from Conan.
This is because of the patching in _patch_conan_output_initialiser
The code in src/cruizlib/workers/api/v2/arbitrary.py replaces the standard streams
but then the _patch_conan_output_initialiser replaces it again. So we never get to see it.
The long and short of this is that the tests cannot check expected message outputs in failure cases.