#34655: Tests for RadioSelect and Select have diverged considerably, potentially
leaving RadioSelect undertested
------------------------------------------------+------------------------
Reporter: Natalia Bidart | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Forms | Version: 4.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
------------------------------------------------+------------------------
Even though `Select` and `RadioSelect` both share most of the
functionality by inheriting from `ChoiceWidget`, there are no explicit
tests for `ChoiceWidget`, and tests for `Select` and `RadioSelect` have
diverged considerably over time.
While some tests will be specific to each children (for their custom
code), after inspection when reviewing
[https://github.com/django/django/pull/16929/ PR] for #34034, there seems
to be some tests that were added to `Select` but not added to their
counterpart `RadioSelect`, for example `test_deepcopy`.
My hope with this ticket is to either:
* evaluate the creation of specific tests for `ChoiceWidget` and have
tests for `Select` and `RadioSelect` reusing those, and then having
custom tests for their custom functionality
* extend the tests for `RadioSelect` using those for `Select` as a guide
and have some sort of comment suggesting to grow both test suites when
making changes to their parent class.
--
Ticket URL: <https://code.djangoproject.com/ticket/34655>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070188ba75da70-806d7e12-3e70-4452-9b55-ef96c0ccbf2f-000000%40eu-central-1.amazonses.com.