Skip to content

Commit

Permalink
check for deprecation warnings in unit tests
Browse files Browse the repository at this point in the history
This patch changes deprecation warnings to errors in the testing.TestCase base
class in order to catch features that are used by nutils but due to be removed
by thrd parties.
  • Loading branch information
gertjanvanzwieten committed Feb 9, 2024
1 parent e84396b commit e145530
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nutils/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ def setUp(self):
self.enter_context(treelog.set(treelog.LoggingLog('nutils')))
self.enter_context(_builtin_warnings.catch_warnings())
_builtin_warnings.simplefilter('error', warnings.NutilsWarning)
_builtin_warnings.simplefilter('error', DeprecationWarning)

def assertAllEqual(self, actual, desired):
actual = numpy.asarray(actual)
Expand Down

0 comments on commit e145530

Please sign in to comment.