def test_getPrelude(self):
        """
        The tree needs to get the segments of the test ID that correspond
        to the module and class that it belongs to.
        """
        self.assertEqual(
            ['foo.bar', 'baz'],
            self.result._getPreludeSegments('foo.bar.baz.qux'))
        self.assertEqual(
            ['foo', 'bar'],
            self.result._getPreludeSegments('foo.bar.baz'))
        self.assertEqual(
            ['foo'],
            self.result._getPreludeSegments('foo.bar'))
        self.assertEqual([], self.result._getPreludeSegments('foo'))

        The tree needs to get the segments of the test ID that correspond
        to the module and class that it belongs to.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/test/test_reporter.py