#27078: Simplify "if" logic inside SQLite's DatabaseCreation._get_test_db_name()
----------------------------------------------+--------------------
     Reporter:  cjerdonek                     |      Owner:  nobody
         Type:  Cleanup/optimization          |     Status:  new
    Component:  Database layer (models, ORM)  |    Version:  master
     Severity:  Normal                        |   Keywords:
 Triage Stage:  Unreviewed                    |  Has patch:  0
Easy pickings:  0                             |      UI/UX:  0
----------------------------------------------+--------------------
 This ticket is to simplify the "if" logic inside the SQLite backend's
 `DatabaseCreation._get_test_db_name()` method somewhat.
 
[https://github.com/django/django/blob/ff445f4c19a0fdf6696c99efefa38b1409b8709f/django/db/backends/sqlite3/creation.py#L12
 Here] is a link to the method implementation.

 The logic can be simplified by, for example, (1) eliminating the need to
 nest the "if" blocks twice, and (2) having the `return ':memory:'` code
 path be handled by the same code path as `return test_database_name`.

--
Ticket URL: <https://code.djangoproject.com/ticket/27078>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.39e617d1c4e4b2dbdb03e3ea4b8f13ee%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to