def test_keepOriginalAttributes(self):
        """
        Verify that the Unlistable exception raised will preserve the attributes of
        the previously-raised exception.
        """
        fp = filepath.FilePath(self.mktemp())
        ose = self.assertRaises(OSError, fp.children)
        d1 = list(ose.__dict__.keys())
        d1.remove('originalException')
        d2 = list(ose.originalException.__dict__.keys())
        d1.sort()
        d2.sort()
        self.assertEqual(d1, d2)

        Verify that the Unlistable exception raised will preserve the attributes of
        the previously-raised exception.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_paths.py