1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Refs #34900 -- Fixed CommandTypes.test_help_default_options_with_custom_arguments test on Python 3.13+.

c4a2e8a2c5
This commit is contained in:
Mariusz Felisiak
2024-02-20 20:59:26 +01:00
committed by GitHub
parent e626716c28
commit 3426a5c33c
2 changed files with 12 additions and 4 deletions

View File

@@ -33,6 +33,7 @@ from django.db.migrations.recorder import MigrationRecorder
from django.test import LiveServerTestCase, SimpleTestCase, TestCase, override_settings
from django.test.utils import captured_stderr, captured_stdout
from django.urls import path
from django.utils.version import PY313
from django.views.static import serve
from . import urls
@@ -1901,10 +1902,16 @@ class CommandTypes(AdminScriptTestCase):
]
for option in expected_options:
self.assertOutput(out, f"[{option}]")
self.assertOutput(out, "--option_a OPTION_A, -a OPTION_A")
self.assertOutput(out, "--option_b OPTION_B, -b OPTION_B")
self.assertOutput(out, "--option_c OPTION_C, -c OPTION_C")
self.assertOutput(out, "-v {0,1,2,3}, --verbosity {0,1,2,3}")
if PY313:
self.assertOutput(out, "--option_a, -a OPTION_A")
self.assertOutput(out, "--option_b, -b OPTION_B")
self.assertOutput(out, "--option_c, -c OPTION_C")
self.assertOutput(out, "-v, --verbosity {0,1,2,3}")
else:
self.assertOutput(out, "--option_a OPTION_A, -a OPTION_A")
self.assertOutput(out, "--option_b OPTION_B, -b OPTION_B")
self.assertOutput(out, "--option_c OPTION_C, -c OPTION_C")
self.assertOutput(out, "-v {0,1,2,3}, --verbosity {0,1,2,3}")
def test_color_style(self):
style = color.no_style()