code: def test_skipping(self):
      class Foo(unittest.TestCase):
          def defaultTestResult(self):
              return LoggingResult(events)
  
          def test_skip_me(self):
              self.skipTest("skip")
  
      events = []
      result = LoggingResult(events)
      test = Foo("test_skip_me")
      self.assertIs(test.run(result), result)
      self.assertEqual(events, ["startTest", "addSkip", "stopTest"])
      self.assertEqual(result.skipped, [(test, "skip")])
  
      events = []
      result = test.run()
      self.assertEqual(
          events,
          [
              "startTestRun",
              "startTest",
              "addSkip",
              "stopTest",
              "stopTestRun",
          ],
      )
      self.assertEqual(result.skipped, [(test, "skip")])
      self.assertEqual(result.testsRun, 1)
  
      # Try letting setUp skip the test now.
      class Foo(unittest.TestCase):
          def defaultTestResult(self):
              return LoggingResult(events)
  
          def setUp(self):
              self.skipTest("testing")
  
          def test_nothing(self):
              pass
  
      events = []
      result = LoggingResult(events)
      test = Foo("test_nothing")
      self.assertIs(test.run(result), result)
      self.assertEqual(events, ["startTest", "addSkip", "stopTest"])
      self.assertEqual(result.skipped, [(test, "testing")])
      self.assertEqual(result.testsRun, 1)
  
      events = []
      result = test.run()
      self.assertEqual(
          events,
          [
              "startTestRun",
              "startTest",
              "addSkip",
              "stopTest",
              "stopTestRun",
          ],
      )
      self.assertEqual(result.skipped, [(test, "testing")])
      self.assertEqual(result.testsRun, 1)
  
imports: import unittest
  from test.test_unittest.support import LoggingResult
label_desc: Use image node_id 1 for calling the Test_TestSkipping obj's underlying member method code with example usage: obj.test_skipping() and returns: LoggingResult, LoggingResult