diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2022-01-24 22:51:01 +0100 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2022-01-24 23:09:14 +0100 |
commit | 34a3e1fd501f20c55d41ec9aaa982d79a499bf41 (patch) | |
tree | b6e4e829877d45f31f488731ac38b89ce0df4f89 /samsung-ipc | |
parent | 9e172e31991ee4aead7e891c111e9734667f29de (diff) | |
download | hardware_replicant_libsamsung-ipc-34a3e1fd501f20c55d41ec9aaa982d79a499bf41.tar.gz hardware_replicant_libsamsung-ipc-34a3e1fd501f20c55d41ec9aaa982d79a499bf41.tar.bz2 hardware_replicant_libsamsung-ipc-34a3e1fd501f20c55d41ec9aaa982d79a499bf41.zip |
tests: python: unify string quotes as per PEP 8
Having a code style makes the code easier to read.
As for which code style to use, the code style defined by the
PEP 8 [1] is used in the python standard library and in the main
Python distribution.
Its official nature (it's standardized by python) probably makes it
the most well known and used code style adopted by python programmers.
In it we have a section about string quotes:
String Quotes
-------------
In Python, single-quoted strings and double-quoted strings are the
same. This PEP does not make a recommendation for this. Pick a rule
and stick to it. When a string contains single or double quote
characters, however, use the other one to avoid backslashes in the
string. It improves readability.
For triple-quoted strings, always use double quote characters to be
consistent with the docstring convention in PEP 257.
Since "if __name__ == '__main__':" is widely used, we choose to use the
single quotes.
[1]https://www.python.org/dev/peps/pep-0008/
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'samsung-ipc')
-rwxr-xr-x | samsung-ipc/tests/libsamsung-ipc-test.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/samsung-ipc/tests/libsamsung-ipc-test.py b/samsung-ipc/tests/libsamsung-ipc-test.py index 328f4f0..7e819aa 100755 --- a/samsung-ipc/tests/libsamsung-ipc-test.py +++ b/samsung-ipc/tests/libsamsung-ipc-test.py @@ -30,10 +30,10 @@ class libsamsung_ipc_test(object): if not srcdir: srcdir = os.path.dirname(sys.argv[0]) - self.run = sh.Command(srcdir + os.sep + "libsamsung-ipc-test") + self.run = sh.Command(srcdir + os.sep + 'libsamsung-ipc-test') def run_all_tests(self): - output = str(self.run("list-tests")).split(os.linesep) + output = str(self.run('list-tests')).split(os.linesep) # Remove the last line break from the output output.remove('') @@ -44,7 +44,7 @@ class libsamsung_ipc_test(object): output.pop(0) for test_name in output: - self.run("test", test_name.replace(' ', '')) + self.run('test', test_name.replace(' ', '')) def main(): tests = libsamsung_ipc_test() |