code: def test_error_on_warning(self):
      with self.assertRaises(UserWarning):
          warnings.warn("test warning")
  
imports: import warnings
  from pelican.tests.support import unittest
label_desc: Use image node_id 1 for calling the TestSuiteTest obj's underlying member method code with example usage: obj.test_error_on_warning() without return types