summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'guide/pytest.html')
-rw-r--r--guide/pytest.html18
1 files changed, 11 insertions, 7 deletions
diff --git a/guide/pytest.html b/guide/pytest.html
index b4a034e..ef8025d 100644
--- a/guide/pytest.html
+++ b/guide/pytest.html
@@ -6,11 +6,11 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>pytest recipes &#8212; Gentoo Python Guide documentation</title>
- <link rel="stylesheet" type="text/css" href="_static/pygments.css" />
- <link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
- <script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
- <script src="_static/doctools.js"></script>
- <script src="_static/sphinx_highlight.js"></script>
+ <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=b3523f8e" />
+ <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=039e1c02" />
+ <script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=b3ba4146"></script>
+ <script src="_static/doctools.js?v=888ff710"></script>
+ <script src="_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Advanced concepts" href="concept.html" />
@@ -130,13 +130,17 @@ make options for the job number, e.g.:</p>
distutils_enable_tests<span class="w"> </span>pytest
python_test<span class="o">()</span><span class="w"> </span><span class="o">{</span>
-<span class="w"> </span>epytest<span class="w"> </span>-n<span class="w"> </span><span class="s2">&quot;</span><span class="k">$(</span>makeopts_jobs<span class="k">)</span><span class="s2">&quot;</span>
+<span class="w"> </span>epytest<span class="w"> </span>-n<span class="w"> </span><span class="s2">&quot;</span><span class="k">$(</span>makeopts_jobs<span class="k">)</span><span class="s2">&quot;</span><span class="w"> </span>--dist<span class="o">=</span>worksteal
<span class="o">}</span>
</pre></div>
</div>
<p>Please note that some upstream use pytest-xdist even if there is no real
gain from doing so. If the package’s tests take a short time to finish,
please avoid the dependency and strip it if necessary.</p>
+<p>The <code class="docutils literal notranslate"><span class="pre">--dist=worksteal</span></code> enables rescheduling tests when some of
+the workers finish early. It is recommended when some of the package’s
+tests are very slow while others are fast. Otherwise, the lengthy tests
+may end up being executed on the same thread and become a bottleneck.</p>
</section>
<section id="avoiding-dependencies-on-other-pytest-plugins">
<h2>Avoiding dependencies on other pytest plugins<a class="headerlink" href="#avoiding-dependencies-on-other-pytest-plugins" title="Permalink to this heading">¶</a></h2>
@@ -432,7 +436,7 @@ setting ignores <code class="docutils literal notranslate"><span class="pre">Dep
&copy;2020, Michał Górny, license: CC BY 4.0.
|
- Powered by <a href="http://sphinx-doc.org/">Sphinx 7.0.1</a>
+ Powered by <a href="http://sphinx-doc.org/">Sphinx 7.1.1</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
|