From 50bae2f6cfd7e899dff99af65e1acaef47084ac5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 7 May 2024 06:46:50 +0200 Subject: Merging upstream version 0.1.32. Signed-off-by: Daniel Baumann --- tests/lint_tests/lint_tutil.py | 2 ++ tests/test_style.py | 18 +++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'tests') diff --git a/tests/lint_tests/lint_tutil.py b/tests/lint_tests/lint_tutil.py index 08120ee..26df505 100644 --- a/tests/lint_tests/lint_tutil.py +++ b/tests/lint_tests/lint_tutil.py @@ -60,6 +60,8 @@ class LintWrapper: state = LintStateImpl( self._debputy_plugin_feature_set, self.lint_style_preference_table, + None, + None, self.path, "".join(dctrl_lines) if dctrl_lines is not None else "", lines, diff --git a/tests/test_style.py b/tests/test_style.py index cae4510..0e3f5d7 100644 --- a/tests/test_style.py +++ b/tests/test_style.py @@ -71,7 +71,7 @@ def test_compat_styles() -> None: ) src = SourcePackage(fields) - effective_style = determine_effective_style(styles, src, None) + effective_style, _ = determine_effective_style(styles, src, None) assert effective_style == nt_pref fields["Uploaders"] = ( @@ -79,7 +79,7 @@ def test_compat_styles() -> None: ) src = SourcePackage(fields) - effective_style = determine_effective_style(styles, src, None) + effective_style, _ = determine_effective_style(styles, src, None) assert effective_style == nt_pref assert effective_style == zeha_pref @@ -88,7 +88,7 @@ def test_compat_styles() -> None: ) src = SourcePackage(fields) - effective_style = determine_effective_style(styles, src, None) + effective_style, _ = determine_effective_style(styles, src, None) assert effective_style is None @@ -108,7 +108,7 @@ def test_compat_styles_team_maint() -> None: assert "random@example.org" not in styles.maintainer_preferences team_style = styles.maintainer_preferences["team@lists.debian.org"] assert team_style.is_packaging_team - effective_style = determine_effective_style(styles, src, None) + effective_style, _ = determine_effective_style(styles, src, None) assert effective_style == team_style.as_effective_pref() @@ -125,7 +125,7 @@ def test_x_style() -> None: assert "random@example.org" not in styles.maintainer_preferences assert "black" in styles.named_styles black_style = styles.named_styles["black"] - effective_style = determine_effective_style(styles, src, None) + effective_style, _ = determine_effective_style(styles, src, None) assert effective_style == black_style @@ -139,18 +139,18 @@ def test_was_from_salsa_ci_style() -> None: ) src = SourcePackage(fields) assert "random@example.org" not in styles.maintainer_preferences - effective_style = determine_effective_style(styles, src, None) + effective_style, _ = determine_effective_style(styles, src, None) assert effective_style is None salsa_ci = CommentedMap( {"variables": CommentedMap({"SALSA_CI_DISABLE_WRAP_AND_SORT": "yes"})} ) - effective_style = determine_effective_style(styles, src, salsa_ci) + effective_style, _ = determine_effective_style(styles, src, salsa_ci) assert effective_style is None salsa_ci = CommentedMap( {"variables": CommentedMap({"SALSA_CI_DISABLE_WRAP_AND_SORT": "no"})} ) - effective_style = determine_effective_style(styles, src, salsa_ci) + effective_style, _ = determine_effective_style(styles, src, salsa_ci) was_style = EffectivePreference(**_WAS_DEFAULTS) assert effective_style == was_style @@ -218,7 +218,7 @@ def test_was_from_salsa_ci_style_args( ) } ) - effective_style = determine_effective_style(styles, src, salsa_ci) + effective_style, _ = determine_effective_style(styles, src, salsa_ci) if style_delta is None: assert effective_style is None else: -- cgit v1.2.3