Django test command with --parallel

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Django test command with --parallel

Yevhen Yevhen
I try to run my django tests using --parallel flag but get the following error (pastebin). How can I fix this?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d866583d-1fd5-47ce-9363-85737ef13d35%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Django test command with --parallel

Yevhen Yevhen
The same traceback from the pastebin link:

Creating test database for alias 'default'...
Cloning test database for alias 'default'...
Cloning test database for alias 'default'...
System check identified no issues (0 silenced).
Traceback (most recent call last):
  File "manage.py", line 41, in <module>
    main()
  File "manage.py", line 37, in main
    execute_from_command_line(sys.argv)
  File "/Users/me/.virtualenvs/project/lib/python3.6/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/Users/me/.virtualenvs/project/lib/python3.6/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/me/.virtualenvs/project/lib/python3.6/site-packages/django/core/management/commands/test.py", line 29, in run_from_argv
    super(Command, self).run_from_argv(argv)
  File "/Users/me/.virtualenvs/project/lib/python3.6/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/Users/me/.virtualenvs/project/lib/python3.6/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/Users/me/.virtualenvs/project/lib/python3.6/site-packages/django/core/management/commands/test.py", line 62, in handle
    failures = test_runner.run_tests(test_labels)
  File "/Users/me/.virtualenvs/project/lib/python3.6/site-packages/django/test/runner.py", line 603, in run_tests
    result = self.run_suite(suite)
  File "/Users/me/.virtualenvs/project/lib/python3.6/site-packages/django/test/runner.py", line 567, in run_suite
    return runner.run(suite)
  File "/Users/me/.pyenv/versions/3.6.2/lib/python3.6/unittest/runner.py", line 176, in run
    test(result)
  File "/Users/me/.pyenv/versions/3.6.2/lib/python3.6/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/Users/me/.virtualenvs/project/lib/python3.6/site-packages/django/test/runner.py", line 370, in run
    subsuite_index, events = test_results.next(timeout=0.1)
  File "/Users/me/.pyenv/versions/3.6.2/lib/python3.6/multiprocessing/pool.py", line 735, in next
    raise value
  File "/Users/me/.pyenv/versions/3.6.2/lib/python3.6/multiprocessing/pool.py", line 424, in _handle_tasks
    put(task)
  File "/Users/me/.pyenv/versions/3.6.2/lib/python3.6/multiprocessing/connection.py", line 206, in send
    self._send_bytes(_ForkingPickler.dumps(obj))
  File "/Users/me/.pyenv/versions/3.6.2/lib/python3.6/multiprocessing/reduction.py", line 51, in dumps
    cls(buf, protocol).dump(obj)
_pickle.PicklingError: Can't pickle <function TestCase.run at 0x1093db730>: it's not the same object as unittest.case.TestCase.run



On Tuesday, January 9, 2018 at 7:22:50 PM UTC+2, Yevhen Yevhen wrote:
I try to run my django tests using --parallel flag but get the following <a href="https://pastebin.com/DfLcGsqQ" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fpastebin.com%2FDfLcGsqQ\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHE_gJkyZExBf2w4A52LRtC4-Ilnw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fpastebin.com%2FDfLcGsqQ\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHE_gJkyZExBf2w4A52LRtC4-Ilnw&#39;;return true;">error (pastebin). How can I fix this?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3da47ff2-3ab4-40e9-becc-8c06362b1739%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Django test command with --parallel

Avraham Serour
does it work without the parallel flag?

On Wed, Jan 10, 2018 at 10:57 AM, Yevhen Yevhen <[hidden email]> wrote:
The same traceback from the pastebin link:

Creating test database for alias 'default'...
Cloning test database for alias 'default'...
Cloning test database for alias 'default'...
System check identified no issues (0 silenced).
Traceback (most recent call last):
  File "manage.py", line 41, in <module>
    main()
  File "manage.py", line 37, in main
    execute_from_command_line(sys.argv)
  File "/Users/me/.virtualenvs/project/lib/python3.6/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/Users/me/.virtualenvs/project/lib/python3.6/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/me/.virtualenvs/project/lib/python3.6/site-packages/django/core/management/commands/test.py", line 29, in run_from_argv
    super(Command, self).run_from_argv(argv)
  File "/Users/me/.virtualenvs/project/lib/python3.6/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/Users/me/.virtualenvs/project/lib/python3.6/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/Users/me/.virtualenvs/project/lib/python3.6/site-packages/django/core/management/commands/test.py", line 62, in handle
    failures = test_runner.run_tests(test_labels)
  File "/Users/me/.virtualenvs/project/lib/python3.6/site-packages/django/test/runner.py", line 603, in run_tests
    result = self.run_suite(suite)
  File "/Users/me/.virtualenvs/project/lib/python3.6/site-packages/django/test/runner.py", line 567, in run_suite
    return runner.run(suite)
  File "/Users/me/.pyenv/versions/3.6.2/lib/python3.6/unittest/runner.py", line 176, in run
    test(result)
  File "/Users/me/.pyenv/versions/3.6.2/lib/python3.6/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/Users/me/.virtualenvs/project/lib/python3.6/site-packages/django/test/runner.py", line 370, in run
    subsuite_index, events = test_results.next(timeout=0.1)
  File "/Users/me/.pyenv/versions/3.6.2/lib/python3.6/multiprocessing/pool.py", line 735, in next
    raise value
  File "/Users/me/.pyenv/versions/3.6.2/lib/python3.6/multiprocessing/pool.py", line 424, in _handle_tasks
    put(task)
  File "/Users/me/.pyenv/versions/3.6.2/lib/python3.6/multiprocessing/connection.py", line 206, in send
    self._send_bytes(_ForkingPickler.dumps(obj))
  File "/Users/me/.pyenv/versions/3.6.2/lib/python3.6/multiprocessing/reduction.py", line 51, in dumps
    cls(buf, protocol).dump(obj)
_pickle.PicklingError: Can't pickle <function TestCase.run at 0x1093db730>: it's not the same object as unittest.case.TestCase.run



On Tuesday, January 9, 2018 at 7:22:50 PM UTC+2, Yevhen Yevhen wrote:
I try to run my django tests using --parallel flag but get the following error (pastebin). How can I fix this?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3da47ff2-3ab4-40e9-becc-8c06362b1739%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFWa6tKUyh4X5wvLvL66pJWPDUML2sg8zemvE%2Be3-O-UiVc%3DgQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Django test command with --parallel

Yevhen Yevhen
Yes, it works without this flag. And I've found the cause -- custom mixins for TestCase class that performed tricky patching.

On Wednesday, January 10, 2018 at 12:03:44 PM UTC+2, Avraham Serour wrote:
does it work without the parallel flag?

On Wed, Jan 10, 2018 at 10:57 AM, Yevhen Yevhen <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="qyiKeM9GAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">yvhn...@...> wrote:
The same traceback from the pastebin link:

Creating test database for alias 'default'...
Cloning test database for alias 'default'...
Cloning test database for alias 'default'...
System check identified no issues (0 silenced).
Traceback (most recent call last):
  File "manage.py", line 41, in <module>
    main()
  File "manage.py", line 37, in main
    execute_from_command_line(sys.argv)
  File "/Users/me/.virtualenvs/project/lib/python3.6/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/Users/me/.virtualenvs/project/lib/python3.6/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/me/.virtualenvs/project/lib/python3.6/site-packages/django/core/management/commands/test.py", line 29, in run_from_argv
    super(Command, self).run_from_argv(argv)
  File "/Users/me/.virtualenvs/project/lib/python3.6/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/Users/me/.virtualenvs/project/lib/python3.6/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/Users/me/.virtualenvs/project/lib/python3.6/site-packages/django/core/management/commands/test.py", line 62, in handle
    failures = test_runner.run_tests(test_labels)
  File "/Users/me/.virtualenvs/project/lib/python3.6/site-packages/django/test/runner.py", line 603, in run_tests
    result = self.run_suite(suite)
  File "/Users/me/.virtualenvs/project/lib/python3.6/site-packages/django/test/runner.py", line 567, in run_suite
    return runner.run(suite)
  File "/Users/me/.pyenv/versions/3.6.2/lib/python3.6/unittest/runner.py", line 176, in run
    test(result)
  File "/Users/me/.pyenv/versions/3.6.2/lib/python3.6/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/Users/me/.virtualenvs/project/lib/python3.6/site-packages/django/test/runner.py", line 370, in run
    subsuite_index, events = test_results.next(timeout=0.1)
  File "/Users/me/.pyenv/versions/3.6.2/lib/python3.6/multiprocessing/pool.py", line 735, in next
    raise value
  File "/Users/me/.pyenv/versions/3.6.2/lib/python3.6/multiprocessing/pool.py", line 424, in _handle_tasks
    put(task)
  File "/Users/me/.pyenv/versions/3.6.2/lib/python3.6/multiprocessing/connection.py", line 206, in send
    self._send_bytes(_ForkingPickler.dumps(obj))
  File "/Users/me/.pyenv/versions/3.6.2/lib/python3.6/multiprocessing/reduction.py", line 51, in dumps
    cls(buf, protocol).dump(obj)
_pickle.PicklingError: Can't pickle <function TestCase.run at 0x1093db730>: it's not the same object as unittest.case.TestCase.run



On Tuesday, January 9, 2018 at 7:22:50 PM UTC+2, Yevhen Yevhen wrote:
I try to run my django tests using --parallel flag but get the following <a href="https://pastebin.com/DfLcGsqQ" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fpastebin.com%2FDfLcGsqQ\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHE_gJkyZExBf2w4A52LRtC4-Ilnw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fpastebin.com%2FDfLcGsqQ\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHE_gJkyZExBf2w4A52LRtC4-Ilnw&#39;;return true;">error (pastebin). How can I fix this?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="qyiKeM9GAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">django-users...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="qyiKeM9GAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">django...@....
Visit this group at <a href="https://groups.google.com/group/django-users" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/group/django-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/django-users&#39;;return true;">https://groups.google.com/group/django-users.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/django-users/3da47ff2-3ab4-40e9-becc-8c06362b1739%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/django-users/3da47ff2-3ab4-40e9-becc-8c06362b1739%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/django-users/3da47ff2-3ab4-40e9-becc-8c06362b1739%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/django-users/3da47ff2-3ab4-40e9-becc-8c06362b1739%40googlegroups.com.

For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4ba1f7e4-238f-40bf-b2cc-9152b3b04106%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.