Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-17741

pytest extra chatty on failed tests due to fonts and matplotlib

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: log
    • Labels:
    • Templates:
    • Story Points:
      1
    • Sprint:
      DB_S19_02
    • Team:
      Data Access and Database

      Description

      The new changes that forward python log messages to lsst.log have resulted in pytest dumping a giant list of DEBUG messages related to matplotlib and/or font_manager after failed tests. This can require scrolling up through several pages of useless messages before you get to the actual pytest output.

      Tim Jenness suggests either changing the default logging level we use when running pytest, or to configure our logger to ignore debug matplotlib messages.

      Portion of an example "Captured log call" from a failed fgcm test:

      ------------------------------ Captured log call -------------------------------
      font_manager.py           1343 DEBUG    findfont: Matching :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=14.0 to DejaVu Sans ('/home/parejkoj/lsst/lsstsw/miniconda/envs/lsst-scipipe/lib/python3.6/site-packages/matplotlib/mpl-data/fonts/ttf/DejaVuSans.ttf') with score of 0.050000
      font_manager.py           1343 DEBUG    findfont: Matching :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=16.0 to DejaVu Sans ('/home/parejkoj/lsst/lsstsw/miniconda/envs/lsst-scipipe/lib/python3.6/site-packages/matplotlib/mpl-data/fonts/ttf/DejaVuSans.ttf') with score of 0.050000
      font_manager.py           1343 DEBUG    findfont: Matching :family=STIXGeneral:style=normal:variant=normal:weight=normal:stretch=normal:size=10.0 to STIXGeneral ('/home/parejkoj/lsst/lsstsw/miniconda/envs/lsst-scipipe/lib/python3.6/site-packages/matplotlib/mpl-data/fonts/ttf/STIXGeneral.ttf') with score of 0.050000
      font_manager.py           1343 DEBUG    findfont: Matching :family=STIXGeneral:style=italic:variant=normal:weight=normal:stretch=normal:size=10.0 to STIXGeneral ('/home/parejkoj/lsst/lsstsw/miniconda/envs/lsst-scipipe/lib/python3.6/site-packages/matplotlib/mpl-data/fonts/ttf/STIXGeneralItalic.ttf') with score of 0.050000
      ...
      and more
      ...
      

        Attachments

          Activity

            People

            • Assignee:
              salnikov Andy Salnikov
              Reporter:
              Parejkoj John Parejko
              Reviewers:
              Tim Jenness
              Watchers:
              Andy Salnikov, John Parejko, John Swinbank, Paul Price, Tim Jenness
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel