def test_BytesInstantiationBytesChild(self):
        """
        Calling L{FilePath.child} on a bytes-mode L{FilePath} with a bytes
        subpath will return a bytes-mode FilePath.
        """
        fp = filepath.FilePath(b"./")
        child = fp.child(u'child-mon\u20acy'.encode('utf-8'))
        self.assertEqual(type(child.path), bytes)

        Calling L{FilePath.child} on a bytes-mode L{FilePath} with a bytes
        subpath will return a bytes-mode FilePath.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_paths.py