def test_asTextModeFromBytesWithEncoding(self):
        """
        C{asTextMode} with an C{encoding} argument uses that encoding when
        coercing the L{bytes}-mode L{FilePath} to a L{unicode}-mode L{FilePath}.
        """
        fp = filepath.FilePath(b'\xe2\x98\x83')
        newfp = fp.asTextMode(encoding="utf-8")
        self.assertIn(u"\u2603", newfp.path)

        C{asTextMode} with an C{encoding} argument uses that encoding when
        coercing the L{bytes}-mode L{FilePath} to a L{unicode}-mode L{FilePath}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_paths.py