diff --git a/exercises/12_useful_modules/task_12_1.py b/exercises/12_useful_modules/task_12_1.py index 46d7582..bcca74a 100644 --- a/exercises/12_useful_modules/task_12_1.py +++ b/exercises/12_useful_modules/task_12_1.py @@ -7,11 +7,14 @@ The function expects a list of IP addresses as an argument. The function must return a tuple with two lists: -* list of available IP addresses -* list of unavailable IP addresses - -To check the availability of an IP address, use the ping command. +* list of reachable IP addresses +* list of unreachable IP addresses +To check if an IP address is reachable, use the ping command (use subprocess). +The IP address is considered reachable if the execution of the ping command +completed with return code 0. +Nuances: on Windows, the return code can be 0 not only when ping was successful, +but it is the code that needs to be checked for the job. This is to simplify tests. Restriction: All tasks must be done using the topics covered in this and previous chapters. """ diff --git a/exercises/18_ssh_telnet/test_task_18_1a.py b/exercises/18_ssh_telnet/test_task_18_1a.py index ddb6db8..e4a8f46 100644 --- a/exercises/18_ssh_telnet/test_task_18_1a.py +++ b/exercises/18_ssh_telnet/test_task_18_1a.py @@ -25,7 +25,7 @@ def test_function_return_value(capsys, first_router_wrong_pass): Function check """ return_value = task_18_1a.send_show_command(first_router_wrong_pass, "sh ip int br") - correct_stdout = "Authentication fail" + correct_stdout = "authentication" out, err = capsys.readouterr() assert out != "", "Error message not printed to stdout" - assert correct_stdout in out, "Wrong error message printed" + assert correct_stdout in out.lower(), "Wrong error message printed" diff --git a/exercises/20_jinja2/task_20_1.py b/exercises/20_jinja2/task_20_1.py index 800e3d8..5fd2d04 100644 --- a/exercises/20_jinja2/task_20_1.py +++ b/exercises/20_jinja2/task_20_1.py @@ -13,6 +13,10 @@ Check the operation of the function on the templates/for.txt template and data from the data_files/for.yml file. +An important nuance: you need to get the directory from the template parameter, +you cannot specify the current directory in the FileSystemLoader - that is, +DO NOT do this: FileSystemLoader("."). +Specifying the current directory will break the work of other tasks/tests. """ import yaml diff --git a/exercises/23_oop_special_methods/task_23_2.py b/exercises/23_oop_special_methods/task_23_2.py index 679c546..3e9aec8 100644 --- a/exercises/23_oop_special_methods/task_23_2.py +++ b/exercises/23_oop_special_methods/task_23_2.py @@ -24,4 +24,6 @@ *19:17:20.244 UTC Sat Apr 6 2019 R1# +The test checks the connection with parameters from the devices.yaml file. +The file must contain the parameters of the available devices. """