Skip to content

Commit 3c0b1d2

Browse files
Reflow
1 parent 8e33f5d commit 3c0b1d2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

QA/common.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99

1010

1111
def execute(args):
12-
""" Execute a specified command """
12+
"""Execute a specified command"""
1313
subprocess.run(args)
1414

1515

1616
def execute_jafar_and_miniooni(ooni_exe, outfile, experiment, tag, args):
17-
""" Executes jafar and miniooni. Returns the test keys. """
17+
"""Executes jafar and miniooni. Returns the test keys."""
1818
tmpoutfile = "/tmp/{}".format(outfile)
1919
with contextlib.suppress(FileNotFoundError):
2020
os.remove(tmpoutfile) # just in case
@@ -40,17 +40,17 @@ def execute_jafar_and_miniooni(ooni_exe, outfile, experiment, tag, args):
4040

4141

4242
def read_result(outfile):
43-
""" Reads the result of an experiment """
43+
"""Reads the result of an experiment"""
4444
return json.load(open(outfile, "rb"))
4545

4646

4747
def test_keys(result):
48-
""" Returns just the test keys of a specific result """
48+
"""Returns just the test keys of a specific result"""
4949
return result["test_keys"]
5050

5151

5252
def check_maybe_binary_value(value):
53-
""" Make sure a maybe binary value is correct """
53+
"""Make sure a maybe binary value is correct"""
5454
assert isinstance(value, str) or (
5555
isinstance(value, dict)
5656
and value["format"] == "base64"
@@ -59,8 +59,8 @@ def check_maybe_binary_value(value):
5959

6060

6161
def with_free_port(func):
62-
""" This function executes |func| passing it a port number on localhost
63-
which is bound but not listening for new connections """
62+
"""This function executes |func| passing it a port number on localhost
63+
which is bound but not listening for new connections"""
6464
# See <https://stackoverflow.com/a/45690594>
6565
with contextlib.closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as sock:
6666
sock.bind(("127.0.0.1", 0))

0 commit comments

Comments
 (0)