bpo-32964: Reuse a testing implementation of the path protocol in tests. (GH-5930)

(cherry picked from commit b21d155f57d284aecf9092a9bd24258293965c2f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
diff --git a/Doc/library/test.rst b/Doc/library/test.rst
index a366fe2..6041f52 100644
--- a/Doc/library/test.rst
+++ b/Doc/library/test.rst
@@ -1293,6 +1293,13 @@
    Class for logging support.
 
 
+.. class:: FakePath(path)
+
+   Simple :term:`path-like object`.  It implements the :meth:`__fspath__`
+   method which just returns the *path* argument.  If *path* is an exception,
+   it will be raised in :meth:`!__fspath__`.
+
+
 :mod:`test.support.script_helper` --- Utilities for the Python execution tests
 ==============================================================================