• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Unittests logged as errors even when passing

Community Beginner ,
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

106

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.

 

Votes

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