Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Unittests logged as errors even when passing

New Here ,
Nov 03, 2021 Nov 03, 2021

Copy link to clipboard

Copied

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()

 

image (6).png

 

TOPICS
Scripting

Views

33

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Nov 04, 2021 Nov 04, 2021

Copy link to clipboard

Copied

LATEST

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.

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines