home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 889555977

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions issue performed_via_github_app
https://github.com/simonw/datasette/issues/1406#issuecomment-889555977 https://api.github.com/repos/simonw/datasette/issues/1406 889555977 IC_kwDOBm6k_c41BYwJ 9599 2021-07-30T01:06:57Z 2021-07-30T01:06:57Z OWNER

Looking at the source code in Click for isolated_filesystem(): https://github.com/pallets/click/blob/9da166957f5848b641231d485467f6140bca2bc0/src/click/testing.py#L450-L468

python @contextlib.contextmanager def isolated_filesystem( self, temp_dir: t.Optional[t.Union[str, os.PathLike]] = None ) -> t.Iterator[str]: """A context manager that creates a temporary directory and changes the current working directory to it. This isolates tests that affect the contents of the CWD to prevent them from interfering with each other. :param temp_dir: Create the temporary directory under this directory. If given, the created directory is not removed when exiting. .. versionchanged:: 8.0 Added the ``temp_dir`` parameter. """ cwd = os.getcwd() t = tempfile.mkdtemp(dir=temp_dir) os.chdir(t) How about if I pass in that optional temp_dir as a temp directory created using the pytest-xdist aware pytest mechanisms: https://docs.pytest.org/en/6.2.x/tmpdir.html

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
956303470  
Powered by Datasette · Queries took 0.861ms · About: github-to-sqlite