diff --git a/01_hello/test.py b/01_hello/test.py index d0cedd1c2..0e04a2bfe 100755 --- a/01_hello/test.py +++ b/01_hello/test.py @@ -4,7 +4,7 @@ import os from subprocess import getstatusoutput, getoutput -prg = './hello.py' +prg = "./hello.py" # -------------------------------------------------- @@ -18,8 +18,8 @@ def test_exists(): def test_runnable(): """Runs using python3""" - out = getoutput(f'python3 {prg}') - assert out.strip() == 'Hello, World!' + out = getoutput(f"python3 {prg}") + assert out.strip() == "Hello, World!" # -------------------------------------------------- @@ -27,25 +27,25 @@ def test_executable(): """Says 'Hello, World!' by default""" out = getoutput(prg) - assert out.strip() == 'Hello, World!' + assert out.strip() == "Hello, World!" # -------------------------------------------------- def test_usage(): """usage""" - for flag in ['-h', '--help']: - rv, out = getstatusoutput(f'{prg} {flag}') + for flag in ["-h", "--help"]: + rv, out = getstatusoutput(f"{prg} {flag}") assert rv == 0 - assert out.lower().startswith('usage') + assert out.lower().startswith("usage") # -------------------------------------------------- def test_input(): """test for input""" - for val in ['Universe', 'Multiverse']: - for option in ['-n', '--name']: - rv, out = getstatusoutput(f'{prg} {option} {val}') + for val in ["Universe", "Multiverse"]: + for option in ["-n", "--name"]: + rv, out = getstatusoutput(f"{prg} {option} {val}") assert rv == 0 - assert out.strip() == f'Hello, {val}!' + assert out.strip() == f"Hello, {val}!"