diff options
author | Benjamin Schubert <ben.c.schubert@gmail.com> | 2019-03-09 10:35:38 +0000 |
---|---|---|
committer | Benjamin Schubert <ben.c.schubert@gmail.com> | 2019-03-20 09:38:42 +0000 |
commit | 010d10b611e5288ac9a105bce3efcfe85f01ba9f (patch) | |
tree | fb70390a89071f27586fdc8f86884770e47474f1 /tests/frontend | |
parent | faa85d293211239f1da2fb4c6ab4c910d238dd75 (diff) | |
download | buildstream-010d10b611e5288ac9a105bce3efcfe85f01ba9f.tar.gz |
tests:lint: remove all unneccessary-parens errors from pylint
Diffstat (limited to 'tests/frontend')
-rw-r--r-- | tests/frontend/logging.py | 4 | ||||
-rw-r--r-- | tests/frontend/main.py | 12 | ||||
-rw-r--r-- | tests/frontend/workspace.py | 14 |
3 files changed, 15 insertions, 15 deletions
diff --git a/tests/frontend/logging.py b/tests/frontend/logging.py index e75901c23..1fbd57e7d 100644 --- a/tests/frontend/logging.py +++ b/tests/frontend/logging.py @@ -45,7 +45,7 @@ def test_default_logging(cli, tmpdir, datafiles): result.assert_success() m = re.search(r"\[\d\d:\d\d:\d\d\]\[\s*\]\[.*\] SUCCESS Checking sources", result.stderr) - assert(m is not None) + assert m is not None @pytest.mark.datafiles(DATA_DIR) @@ -83,7 +83,7 @@ def test_custom_logging(cli, tmpdir, datafiles): m = re.search(r"\d\d:\d\d:\d\d,\d\d:\d\d:\d\d.\d{6},\d\d:\d\d:\d\d,\d\d:\d\d:\d\d.\d{6}\s*,.*" r",SUCCESS,Checking sources", result.stderr) - assert(m is not None) + assert m is not None @pytest.mark.datafiles(DATA_DIR) diff --git a/tests/frontend/main.py b/tests/frontend/main.py index 03b8840ff..7fefb7429 100644 --- a/tests/frontend/main.py +++ b/tests/frontend/main.py @@ -7,22 +7,22 @@ from buildstream._frontend.app import _prefix_choice_value_proc def test_prefix_choice_value_proc_full_match(): value_proc = _prefix_choice_value_proc(['foo', 'bar', 'baz']) - assert("foo" == value_proc("foo")) - assert("bar" == value_proc("bar")) - assert("baz" == value_proc("baz")) + assert "foo" == value_proc("foo") + assert "bar" == value_proc("bar") + assert "baz" == value_proc("baz") def test_prefix_choice_value_proc_prefix_match(): value_proc = _prefix_choice_value_proc(['foo']) - assert ("foo" == value_proc("f")) + assert "foo" == value_proc("f") def test_prefix_choice_value_proc_ambigous_match(): value_proc = _prefix_choice_value_proc(['bar', 'baz']) - assert ("bar" == value_proc("bar")) - assert ("baz" == value_proc("baz")) + assert "bar" == value_proc("bar") + assert "baz" == value_proc("baz") with pytest.raises(click.UsageError): value_proc("ba") diff --git a/tests/frontend/workspace.py b/tests/frontend/workspace.py index f1fa13df0..1a8119124 100644 --- a/tests/frontend/workspace.py +++ b/tests/frontend/workspace.py @@ -177,7 +177,7 @@ def test_open_bzr_customize(cli, tmpdir, datafiles): # Check that the .bzr dir exists bzrdir = os.path.join(workspace, ".bzr") - assert(os.path.isdir(bzrdir)) + assert os.path.isdir(bzrdir) # Check that the correct origin branch is set element_config = _yaml.load(os.path.join(project, "elements", element_name)) @@ -186,7 +186,7 @@ def test_open_bzr_customize(cli, tmpdir, datafiles): stripped_url = source_config['url'].lstrip("file:///") expected_output_str = ("checkout of branch: /{}/{}" .format(stripped_url, source_config['track'])) - assert(expected_output_str in str(output)) + assert expected_output_str in str(output) @pytest.mark.datafiles(DATA_DIR) @@ -199,12 +199,12 @@ def test_open_multi(cli, tmpdir, datafiles): assert kind in elname workspace_lsdir = os.listdir(workspace) if kind == 'git': - assert('.git' in workspace_lsdir) + assert '.git' in workspace_lsdir elif kind == 'bzr': - assert('.bzr' in workspace_lsdir) + assert '.bzr' in workspace_lsdir else: - assert not ('.git' in workspace_lsdir) - assert not ('.bzr' in workspace_lsdir) + assert not '.git' in workspace_lsdir + assert not '.bzr' in workspace_lsdir @pytest.mark.skipif(os.geteuid() == 0, reason="root may have CAP_DAC_OVERRIDE and ignore permissions") @@ -232,7 +232,7 @@ def test_open_multi_unwritable(cli, tmpdir, datafiles): result.assert_main_error(ErrorDomain.STREAM, None) # Normally we avoid checking stderr in favour of using the mechine readable result.assert_main_error # But Tristan was very keen that the names of the elements left needing workspaces were present in the out put - assert (" ".join([element_name for element_name, workspace_dir_suffix in element_tuples[1:]]) in result.stderr) + assert " ".join([element_name for element_name, workspace_dir_suffix in element_tuples[1:]]) in result.stderr @pytest.mark.datafiles(DATA_DIR) |