﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
33082	test_subparser_invalid_option regression with Python 3.9.7	Michał Górny	nobody	"I'm getting the following test failure with Python 3.9.7:

```
======================================================================
FAIL: test_subparser_invalid_option (user_commands.tests.CommandTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ""/usr/lib/python3.9/unittest/case.py"", line 59, in testPartExecutor
    yield
  File ""/usr/lib/python3.9/unittest/case.py"", line 592, in run
    self._callTestMethod(testMethod)
  File ""/usr/lib/python3.9/unittest/case.py"", line 550, in _callTestMethod
    method()
  File ""/tmp/portage/dev-python/django-3.2.7/work/Django-3.2.7/tests/user_commands/tests.py"", line 339, in test_subparser_invalid_option
    management.call_command('subparser', 'test', 12)
  File ""/usr/lib/python3.9/contextlib.py"", line 137, in __exit__
    self.gen.throw(typ, value, traceback)
  File ""/tmp/portage/dev-python/django-3.2.7/work/Django-3.2.7/django/test/testcases.py"", line 693, in _assert_raises_or_warns_cm
    self.assertIn(expected_message, str(getattr(cm, cm_attr)))
  File ""/usr/lib/python3.9/unittest/case.py"", line 1096, in assertIn
    self.fail(self._formatMessage(msg, standardMsg))
  File ""/usr/lib/python3.9/unittest/case.py"", line 668, in fail
    raise self.failureException(msg)
AssertionError: ""Error: invalid choice: 'test' (choose from 'foo')"" not found in ""Error: argument {foo}: invalid choice: 'test' (choose from 'foo')""
```

It seems that the output change has been backported from Python 3.10 to 3.9.7."	Uncategorized	new	Uncategorized	3.2	Normal				Unreviewed	0	0	0	0	0	0
