diff --git a/Dockerfile.py b/Dockerfile.py index f5bfc5e..4775487 100755 --- a/Dockerfile.py +++ b/Dockerfile.py @@ -48,7 +48,7 @@ def run_and_stream_command_output(command, environment_vars, verbose) -> bool: print(line, end='') build_result.wait() if build_result.returncode != 0: - print(" ::: Error running".format(command)) + print(f' ::: Error running: {command}') print(build_result.stderr) return build_result.returncode == 0 diff --git a/test/conftest.py b/test/conftest.py index 744323d..7b9f6a8 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -23,7 +23,7 @@ def run_and_stream_command_output(): print(line, end='') build_result.wait() if build_result.returncode != 0: - print(" ::: Error running".format(command)) + print(f' ::: Error running: {command}') print(build_result.stderr) return run_and_stream_command_output_inner diff --git a/test/test_bash_functions.py b/test/test_bash_functions.py index 0aef47b..6929c2b 100644 --- a/test/test_bash_functions.py +++ b/test/test_bash_functions.py @@ -168,14 +168,14 @@ expected_debian_lines = [ def test_debian_setup_php_env(Docker, expected_lines, repeat_function): ''' confirm all expected output is there and nothing else ''' stdout = '' - for i in range(repeat_function): + for _ in range(repeat_function): stdout = Docker.run('. /bash_functions.sh ; eval `grep setup_php_env /start.sh`').stdout for expected_line in expected_lines: search_config_cmd = "grep -c '{}' /etc/lighttpd/conf-enabled/15-fastcgi-php.conf".format(expected_line) search_config_count = Docker.run(search_config_cmd) found_lines = int(search_config_count.stdout.rstrip('\n')) if found_lines > 1: - assert False, "Found line {} times (more than once): {}".format(expected_line) + assert False, f'Found line {expected_line} times (more than once): {found_lines}' def test_webPassword_random_generation(Docker):