pitrou commented on code in PR #13564: URL: https://github.com/apache/arrow/pull/13564#discussion_r920236148
########## python/pyarrow/conftest.py: ########## @@ -241,3 +242,26 @@ def _docdir(request): else: yield + + +# Define doctest_namespace for fs module docstring import +@pytest.fixture(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: Hmm, so for the purposes of avoiding potential conflicts with existing files, can we call it something more explicit (for example `/tmp/pyarrow-example.dat`)? -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org