diff options
Diffstat (limited to 'tests/plugins/deprecationwarnings')
-rw-r--r-- | tests/plugins/deprecationwarnings/__init__.py | 0 | ||||
-rw-r--r-- | tests/plugins/deprecationwarnings/deprecationwarnings.py | 38 | ||||
-rw-r--r-- | tests/plugins/deprecationwarnings/elements/deprecated.bst (renamed from tests/plugins/deprecationwarnings/project/elements/deprecated.bst) | 0 | ||||
-rw-r--r-- | tests/plugins/deprecationwarnings/plugins/elements/deprecated_plugin.py (renamed from tests/plugins/deprecationwarnings/project/plugins/elements/deprecated_plugin.py) | 0 | ||||
-rw-r--r-- | tests/plugins/deprecationwarnings/plugins/elements/deprecated_plugin.yaml (renamed from tests/plugins/deprecationwarnings/project/plugins/elements/deprecated_plugin.yaml) | 0 | ||||
-rw-r--r-- | tests/plugins/deprecationwarnings/project.conf (renamed from tests/plugins/deprecationwarnings/project/project.conf) | 0 |
6 files changed, 0 insertions, 38 deletions
diff --git a/tests/plugins/deprecationwarnings/__init__.py b/tests/plugins/deprecationwarnings/__init__.py deleted file mode 100644 index e69de29bb..000000000 --- a/tests/plugins/deprecationwarnings/__init__.py +++ /dev/null diff --git a/tests/plugins/deprecationwarnings/deprecationwarnings.py b/tests/plugins/deprecationwarnings/deprecationwarnings.py deleted file mode 100644 index 628faea68..000000000 --- a/tests/plugins/deprecationwarnings/deprecationwarnings.py +++ /dev/null @@ -1,38 +0,0 @@ -# Pylint doesn't play well with fixtures and dependency injection from pytest -# pylint: disable=redefined-outer-name - -import os - -import pytest - -from buildstream.testing import cli # pylint: disable=unused-import - - -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) - - -@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.assert_success() - assert _DEPRECATION_WARNING in result.stderr - - -@pytest.mark.datafiles(DATA_DIR) -def test_suppress_deprecation_warning(cli, datafiles): - project = str(datafiles) - cli.run(project=project, args=["show", "manual.bst"]) - - 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: - f.write(element_overrides) - - result = cli.run(project=project, args=["show", "deprecated.bst"]) - result.assert_success() - assert _DEPRECATION_WARNING not in result.stderr diff --git a/tests/plugins/deprecationwarnings/project/elements/deprecated.bst b/tests/plugins/deprecationwarnings/elements/deprecated.bst index e80bd91cd..e80bd91cd 100644 --- a/tests/plugins/deprecationwarnings/project/elements/deprecated.bst +++ b/tests/plugins/deprecationwarnings/elements/deprecated.bst diff --git a/tests/plugins/deprecationwarnings/project/plugins/elements/deprecated_plugin.py b/tests/plugins/deprecationwarnings/plugins/elements/deprecated_plugin.py index 1badf59af..1badf59af 100644 --- a/tests/plugins/deprecationwarnings/project/plugins/elements/deprecated_plugin.py +++ b/tests/plugins/deprecationwarnings/plugins/elements/deprecated_plugin.py diff --git a/tests/plugins/deprecationwarnings/project/plugins/elements/deprecated_plugin.yaml b/tests/plugins/deprecationwarnings/plugins/elements/deprecated_plugin.yaml index 1c07cd8b2..1c07cd8b2 100644 --- a/tests/plugins/deprecationwarnings/project/plugins/elements/deprecated_plugin.yaml +++ b/tests/plugins/deprecationwarnings/plugins/elements/deprecated_plugin.yaml diff --git a/tests/plugins/deprecationwarnings/project/project.conf b/tests/plugins/deprecationwarnings/project.conf index 9e03afe0a..9e03afe0a 100644 --- a/tests/plugins/deprecationwarnings/project/project.conf +++ b/tests/plugins/deprecationwarnings/project.conf |