Skip to main content
Participant
November 3, 2021
Question

Unittests logged as errors even when passing

  • November 3, 2021
  • 1 reply
  • 202 views

Hello, 
We are trying to implement our own unittest within designer and are using the sample test runner that comes with Designer as a template. However, when running unittests, the results are logged as errors and are red even when the test technically passes. Is there a way to have the unittest output instead be logged as info when passing? Attached is the code ran and the console output. 

 

import designer
runner = designer.TestRunner()
runner.runAllTests()

 

 

This topic has been closed for replies.

1 reply

Participating Frequently
November 4, 2021

Hi,

 

When using Python we log strings printed to stdout as messages in the console and strings printed to stderr as errors.

I believe the issue with Python's unittest happens because it outputs test results to stderr.

I am not sure if you can tell somehow unittest to use stdout instead of stderr.

 

Est.