Show each warning only once when running tests

Summary

We often get loads of warnings when running tests. This bloats the output and makes looking at the results difficult.

I would suggest to only show every warning once, which would be enough to tell us that warnings are there.

Steps to reproduce

  • Run tests
  • Scroll thousands of lines due to deprecation warnings in ruamel.yaml

What is the current bug behavior?

Loads of output concerning warnings

What is the expected correct behavior?

Each warning is only shown once, which is enough to know they exist.

Possible fixes

Only show the first time a warning is thrown


Edited by Benjamin Schubert