From 122177153b14664a0e4fed85aa4f22b87cfabf56 Mon Sep 17 00:00:00 2001 From: Chandan Singh Date: Mon, 11 Nov 2019 17:07:09 +0000 Subject: Reformat code using Black As discussed over the mailing list, reformat code using Black. This is a one-off change to reformat all our codebase. Moving forward, we shouldn't expect such blanket reformats. Rather, we expect each change to already comply with the Black formatting style. --- .../deprecationwarnings/deprecationwarnings.py | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'tests/plugins') diff --git a/tests/plugins/deprecationwarnings/deprecationwarnings.py b/tests/plugins/deprecationwarnings/deprecationwarnings.py index 4d2d22c05..628faea68 100644 --- a/tests/plugins/deprecationwarnings/deprecationwarnings.py +++ b/tests/plugins/deprecationwarnings/deprecationwarnings.py @@ -8,10 +8,7 @@ import pytest from buildstream.testing import cli # pylint: disable=unused-import -DATA_DIR = os.path.join( - os.path.dirname(os.path.realpath(__file__)), - "project" -) +DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "project") _DEPRECATION_MESSAGE = "Here is some detail." _DEPRECATION_WARNING = "Using deprecated plugin deprecated_plugin: {}".format(_DEPRECATION_MESSAGE) @@ -20,7 +17,7 @@ _DEPRECATION_WARNING = "Using deprecated plugin deprecated_plugin: {}".format(_D @pytest.mark.datafiles(DATA_DIR) def test_deprecation_warning_present(cli, datafiles): project = str(datafiles) - result = cli.run(project=project, args=['show', 'deprecated.bst']) + result = cli.run(project=project, args=["show", "deprecated.bst"]) result.assert_success() assert _DEPRECATION_WARNING in result.stderr @@ -28,16 +25,14 @@ def test_deprecation_warning_present(cli, datafiles): @pytest.mark.datafiles(DATA_DIR) def test_suppress_deprecation_warning(cli, datafiles): project = str(datafiles) - cli.run(project=project, args=['show', 'manual.bst']) + cli.run(project=project, args=["show", "manual.bst"]) - element_overrides = "elements:\n" \ - " deprecated_plugin:\n" \ - " suppress-deprecation-warnings : True\n" + element_overrides = "elements:\n" " deprecated_plugin:\n" " suppress-deprecation-warnings : True\n" - project_conf = os.path.join(project, 'project.conf') - with open(project_conf, 'a') as f: + project_conf = os.path.join(project, "project.conf") + with open(project_conf, "a") as f: f.write(element_overrides) - result = cli.run(project=project, args=['show', 'deprecated.bst']) + result = cli.run(project=project, args=["show", "deprecated.bst"]) result.assert_success() assert _DEPRECATION_WARNING not in result.stderr -- cgit v1.2.1