In general it’s a good idea to see warnings your code generates while you are testing, but if you are anything like me, you usually don’t need to see warnings generated by third party code. I was plagued by this today as I was testing a function that utilized NLTK, one of, if not the most, popular natural language processing software libraries for Python.
I’m not too proud to admit that only very rarely do my unit tests run without any failures. It’s usually difficult enough to track down the failures and errors without also being swamped by a ton of extraneous warnings generated by third party software. Such was the case with a simple function I had written to remove accidental duplicate characters from a piece of text.