AlenkaF commented on code in PR #13582:
URL: https://github.com/apache/arrow/pull/13582#discussion_r919750986


##########
python/pyarrow/conftest.py:
##########
@@ -241,3 +242,26 @@ def _docdir(request):
 
     else:
         yield
+
+
+# Define doctest_namespace for fs module docstring import
[email protected](autouse=True)
+def add_fs(doctest_namespace, request):
+
+    # Trigger ONLY for the doctests
+    doctest_m = request.config.option.doctestmodules
+    doctest_c = getattr(request.config.option, "doctest_cython", False)
+
+    if doctest_m or doctest_c:
+        # fs import
+        doctest_namespace["fs"] = fs
+
+        # Creation of an object and file with data
+        local = fs.LocalFileSystem()
+        with local.open_output_stream('/tmp/fileinfo.dat') as stream:

Review Comment:
   Oh, sorry. Misread 🤦‍♀️ 
   Of course, will add the deleting part/use `tmp_path` or similar.
   +1 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to