Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/t/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ def in_container() -> bool:

def prepare_fixture_dir(
request, files: Iterable[str], dirs: Iterable[str]
) -> Tuple[Path, List[str], List[str]]:
) -> Path:
"""
Fixture to prepare a test dir with dummy contents on the fly.

Expand All @@ -961,11 +961,11 @@ def prepare_fixture_dir(
old_cwd = os.getcwd()
try:
os.chdir(tempdir)
new_files, new_dirs = create_dummy_filedirs(files, dirs)
_, _ = create_dummy_filedirs(files, dirs)
finally:
os.chdir(old_cwd)

return tempdir, new_files, new_dirs
return tempdir


def create_dummy_filedirs(
Expand Down
2 changes: 1 addition & 1 deletion test/t/test_man.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def colonpath(self, request, bash):
else:
pytest.skip("Cygwin doesn't like paths with colons")

tmpdir, _, _ = prepare_fixture_dir(
tmpdir = prepare_fixture_dir(
request,
files=["man/man3/Bash::Completion.3pm.gz"],
dirs=["man", "man/man3"],
Expand Down
4 changes: 2 additions & 2 deletions test/t/test_scp.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def tmpdir_backslash(self, request, bash):
if sys.platform.startswith("win"):
pytest.skip("Filenames not allowed on Windows")

tmpdir, _, _ = prepare_fixture_dir(
tmpdir = prepare_fixture_dir(
request, files=["local_path-file\\"], dirs=[]
)
return tmpdir
Expand All @@ -192,7 +192,7 @@ def test_remote_path_ending_with_backslash(self, bash):
def tmpdir_mkfifo(self, request, bash):
# We prepare two files: 1) a named pipe and 2) a regular file ending
# with the same name but an extra special character "|".
tmpdir, _, _ = prepare_fixture_dir(
tmpdir = prepare_fixture_dir(
request,
files=["local_path_2-pipe|"],
dirs=[],
Expand Down
2 changes: 1 addition & 1 deletion test/t/test_sshfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def tmpdir_backslash(self, request, bash):
if sys.platform.startswith("win"):
pytest.skip("Filenames not allowed on Windows")

tmpdir, _, _ = prepare_fixture_dir(
tmpdir = prepare_fixture_dir(
request, files=["local_path-file\\"], dirs=["local_path-dir"]
)
return tmpdir
Expand Down
2 changes: 1 addition & 1 deletion test/t/unit/test_unit_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def fixture_dir(self, request, bash):
set up symbolic links.
"""

tmpdir, _, _ = prepare_fixture_dir(request, files=[], dirs=[])
tmpdir = prepare_fixture_dir(request, files=[], dirs=[])
assert_bash_exec(bash, "cp -R %s/* %s/" % (os.getcwd(), tmpdir))
assert_bash_exec(bash, "mkdir -p %s/bin" % tmpdir)
assert_bash_exec(
Expand Down