Skip to content

Commit 8da74aa

Browse files
committed
Finish tidying up docstrings.
1 parent f9eab00 commit 8da74aa

2 files changed

Lines changed: 13 additions & 18 deletions

File tree

tests/tests_integration/base.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ class BaseTest:
1717
@pytest.fixture(scope="function")
1818
def no_cfg_project(test):
1919
"""
20-
Fixture that creates an empty project. Ignore the warning
21-
that no configs are setup yet.
20+
Fixture that creates an empty project. Ignore the
21+
warning that no configs are set up yet.
2222
"""
2323
test_utils.delete_project_if_it_exists(TEST_PROJECT_NAME)
2424

@@ -31,10 +31,10 @@ def no_cfg_project(test):
3131
@pytest.fixture(scope="function")
3232
def project(self, tmp_path):
3333
"""
34-
Setup a project with default configs to use
35-
for testing.
34+
Set up a project with default configs
35+
to use for testing.
3636
37-
# Note this fixture is a duplicate of project()
37+
Note this fixture is a duplicate of project()
3838
in test_filesystem_transfer.py fixture
3939
"""
4040
tmp_path = tmp_path / "test with space"
@@ -53,8 +53,8 @@ def project(self, tmp_path):
5353
def clean_project_name(self):
5454
"""
5555
Create an empty project, but ensure no
56-
configs already exists, and delete created configs
57-
after test.
56+
configs already exists, and delete created
57+
configs after test.
5858
"""
5959
project_name = TEST_PROJECT_NAME
6060
test_utils.delete_project_if_it_exists(project_name)

tests/tests_integration/test_ssh_setup.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ class TestSSHSetup(BaseTest):
1717
@pytest.fixture(scope="function")
1818
def project(test, tmp_path, setup_ssh_container):
1919
"""
20-
Make a project as per usual, but now add
21-
in test ssh configurations
20+
Set up a project with configs for SSH into
21+
the test Dockerfile image.
2222
"""
2323
tmp_path = tmp_path / "test with space"
2424

@@ -39,15 +39,10 @@ def test_verify_ssh_central_host_do_not_accept(
3939
self, capsys, project, input_
4040
):
4141
"""
42-
Use the main function to test this. Test the sub-function
43-
when accepting, because this main function will also
44-
call setup ssh key pairs which we don't want to do yet
45-
46-
This should only accept for "y" so try some random strings
47-
including "n" and check they all do not make the connection.
42+
Test that host not accepted if input is not "y".
4843
"""
4944
orig_builtin = copy.deepcopy(builtins.input)
50-
builtins.input = lambda _: "y" # type: ignore
45+
builtins.input = lambda _: input_ # type: ignore
5146

5247
project.setup_ssh_connection()
5348

@@ -82,8 +77,8 @@ def test_verify_ssh_central_host_accept(self, capsys, project):
8277

8378
def test_generate_and_write_ssh_key(self, project):
8479
"""
85-
Check ssh key for passwordless connection is written
86-
to file
80+
Check ssh key for passwordless connection
81+
is written to file.
8782
"""
8883
path_to_save = project.cfg["local_path"] / "test"
8984
ssh.generate_and_write_ssh_key(path_to_save)

0 commit comments

Comments
 (0)