[Django] #12191: It's not possible to run a specific test if it's not in models.py or tests.py (e.g. when using suites)

View: New views
2 Messages — Rating Filter:   Alert me  

[Django] #12191: It's not possible to run a specific test if it's not in models.py or tests.py (e.g. when using suites)

by Django-3 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

#12191: It's not possible to run a specific test if it's not in models.py or
tests.py (e.g. when using suites)
---------------------------------+------------------------------------------
   Reporter:  dolapo             |                Owner:  nobody    
     Status:  new                |            Milestone:            
  Component:  Testing framework  |              Version:  1.1      
   Keywords:  testing test       |                Stage:  Unreviewed
  Has_patch:  1                  |           Needs_docs:  0        
Needs_tests:  0                  |   Needs_better_patch:  1        
---------------------------------+------------------------------------------
 The simple django looks for tests in either models.py or tests.py. This is
 unfortunate for large applications since tests.py in each app becomes
 rather large and unwieldy. Apps with a large number of tests can break out
 their tests further by creating a method called suite() that returns a
 TestSuite. This works for test separation but because the runner still
 looks for test cases in models.py or tests.py it is no longer possible to
 run an individual TestCase or TestCase.test_method.
 Proposal:
 In addition to supporting the ability to specify tests to run as:
 o app
 o app.TestCase
 o app.TestCase.test_method

 also support:
 o app.module.TestCase.test_method
 o app.module.TestCase.*

 I'm including a patch which adds this functionality.

--
Ticket URL: <http://code.djangoproject.com/ticket/12191>
Django <http://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 post to this group, send email to django-updates@...
To unsubscribe from this group, send email to django-updates+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: [Django] #12191: It's not possible to run a specific test if it's not in models.py or tests.py (e.g. when using suites)

by Django-3 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

#12191: It's not possible to run a specific test if it's not in models.py or
tests.py (e.g. when using suites)
----------------------------------------+-----------------------------------
          Reporter:  dolapo             |         Owner:  dolapo      
            Status:  assigned           |     Milestone:              
         Component:  Testing framework  |       Version:  1.1        
        Resolution:                     |      Keywords:  testing test
             Stage:  Unreviewed         |     Has_patch:  1          
        Needs_docs:  0                  |   Needs_tests:  0          
Needs_better_patch:  1                  |  
----------------------------------------+-----------------------------------
Changes (by dolapo):

  * owner:  nobody => dolapo
  * status:  new => assigned

Comment:

 Since I screwed up the formatting in the description, this patch adds to
 the simple test runner the ability to run tests as:[[BR]]

 {{{
 app.module.TestCase.test_method
 app.module.TestCase.*
 }}}

--
Ticket URL: <http://code.djangoproject.com/ticket/12191#comment:1>
Django <http://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 post to this group, send email to django-updates@...
To unsubscribe from this group, send email to django-updates+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---