#33891: TypeError when trying to run tests in parallel with spawn.
-------------------------------------+-------------------------------------
     Reporter:  Kevin Renskers       |                    Owner:  Mariusz
                                     |  Felisiak
         Type:  Bug                  |                   Status:  assigned
    Component:  Testing framework    |                  Version:  4.1
     Severity:  Release blocker      |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

 * status:  new => assigned
 * severity:  Normal => Release blocker
 * cc: Carlton Gibson (added)
 * owner:  nobody => Mariusz Felisiak
 * stage:  Unreviewed => Accepted


Comment:

 It looks that I overcomplicated 41c4cb253c137edf5a96b7408ea55d57d6e0602a,
 sorry. Does the following patch work for you?
 {{{#!diff
 diff --git a/django/test/runner.py b/django/test/runner.py
 index 270ddf5b59..24ce766ce1 100644
 --- a/django/test/runner.py
 +++ b/django/test/runner.py
 @@ -443,6 +443,11 @@ def _run_subsuite(args):
      return subsuite_index, result.events


 +def _process_setup_stub(*args):
 +    """Stub method to simplify run() implementation."""
 +    pass
 +
 +
  class ParallelTestSuite(unittest.TestSuite):
      """
      Run a series of tests in parallel in several processes.
 @@ -461,6 +466,7 @@ class ParallelTestSuite(unittest.TestSuite):

      # In case someone wants to modify these in a subclass.
      init_worker = _init_worker
 +    process_setup = _process_setup_stub
      process_setup_args = ()
      run_subsuite = _run_subsuite
      runner_class = RemoteTestRunner
 @@ -474,14 +480,6 @@ class ParallelTestSuite(unittest.TestSuite):
          self.serialized_contents = None
          super().__init__()

 -    def process_setup(self, *args):
 -        """
 -        Stub method to simplify run() implementation. "self" is never
 actually
 -        passed because a function implementing this method (__func__) is
 -        always used, not the method itself.
 -        """
 -        pass
 -
      def run(self, result):
          """
          Distribute test cases across workers.

 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33891#comment:1>
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/01070182677e02bb-29644bb3-e79f-4c15-be0e-42a9e0a2ae12-000000%40eu-central-1.amazonses.com.

Reply via email to