mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 00:35:00 +00:00
style: format test_deprecated.py with black
This commit is contained in:
parent
319d543ac2
commit
4755578822
1 changed files with 10 additions and 6 deletions
|
@ -51,8 +51,10 @@ class TestDeprecated(TestCase):
|
||||||
if flag.lstrip("-") in call_args[0][0] and "deprecated" in call_args[0][0]:
|
if flag.lstrip("-") in call_args[0][0] and "deprecated" in call_args[0][0]:
|
||||||
deprecation_warning = call_args[0][0]
|
deprecation_warning = call_args[0][0]
|
||||||
break
|
break
|
||||||
|
|
||||||
self.assertIsNotNone(deprecation_warning, f"No deprecation warning found for {flag}")
|
self.assertIsNotNone(
|
||||||
|
deprecation_warning, f"No deprecation warning found for {flag}"
|
||||||
|
)
|
||||||
warning_msg = deprecation_warning
|
warning_msg = deprecation_warning
|
||||||
|
|
||||||
# Remove any leading hyphens for the comparison
|
# Remove any leading hyphens for the comparison
|
||||||
|
@ -77,8 +79,10 @@ class TestDeprecated(TestCase):
|
||||||
if "deprecated" in call_args[0][0] and "--model gpt4" in call_args[0][0]:
|
if "deprecated" in call_args[0][0] and "--model gpt4" in call_args[0][0]:
|
||||||
deprecation_warning = call_args[0][0]
|
deprecation_warning = call_args[0][0]
|
||||||
break
|
break
|
||||||
|
|
||||||
self.assertIsNotNone(deprecation_warning, "No deprecation warning with model alias found")
|
self.assertIsNotNone(
|
||||||
|
deprecation_warning, "No deprecation warning with model alias found"
|
||||||
|
)
|
||||||
warning_msg = deprecation_warning
|
warning_msg = deprecation_warning
|
||||||
self.assertIn("--model gpt4", warning_msg)
|
self.assertIn("--model gpt4", warning_msg)
|
||||||
self.assertNotIn("--model gpt-4-0613", warning_msg)
|
self.assertNotIn("--model gpt-4-0613", warning_msg)
|
||||||
|
@ -106,11 +110,11 @@ class TestDeprecated(TestCase):
|
||||||
# Create args with ONLY the current flag set to True
|
# Create args with ONLY the current flag set to True
|
||||||
args = MagicMock()
|
args = MagicMock()
|
||||||
args.model = None
|
args.model = None
|
||||||
|
|
||||||
# Ensure all flags are False by default
|
# Ensure all flags are False by default
|
||||||
for test_flag, _ in test_cases:
|
for test_flag, _ in test_cases:
|
||||||
setattr(args, test_flag, False)
|
setattr(args, test_flag, False)
|
||||||
|
|
||||||
# Set only the current flag to True
|
# Set only the current flag to True
|
||||||
setattr(args, flag, True)
|
setattr(args, flag, True)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue