<html><body>
<p>1 new commit in yt:</p>
<p><a href="https://bitbucket.org/yt_analysis/yt/commits/3f50767dec55/">https://bitbucket.org/yt_analysis/yt/commits/3f50767dec55/</a> Changeset: 3f50767dec55 Branch: yt User: ngoldbaum Date: 2016-04-29 17:29:52+00:00 Summary: Merged in xarthisius/yt (pull request #2145)</p>
<p>Force nose to produce meaningful traceback for cookbook recipes' tests Affected #: 1 file</p>
<p>diff -r f828b79bde2be6541a9ee80b1eaef285258c4a89 -r 3f50767dec553868bf966a8e027f308f545e84c2 doc/source/cookbook/tests/test_cookbook.py --- a/doc/source/cookbook/tests/test_cookbook.py +++ b/doc/source/cookbook/tests/test_cookbook.py @@ -15,6 +15,26 @@</p>
<pre>import subprocess
</pre>
<p>+def run_with_capture(*args, **kwargs): + sp = subprocess.Popen(*args, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + **kwargs) + out, err = sp.communicate() + if out: + sys.stdout.write(out.decode("UTF-8")) + if err: + sys.stderr.write(err.decode("UTF-8")) + + if sp.returncode != 0: + retstderr = " “.join(args[0]) + retstderr += “\n\nTHIS IS THE REAL CAUSE OF THE FAILURE:\n” + retstderr += err.decode("UTF-8”) + “\n” + raise subprocess.CalledProcessError(sp.returncode, retstderr) + + return sp.returncode + +</p>
<pre>PARALLEL_TEST = {"rockstar_nest.py": "3"}
BLACKLIST = ["opengl_ipython.py", "opengl_vr.py"]
</pre>
<p>@@ -37,10 +57,16 @@</p>
<pre>def check_recipe(cmd):
'''Run single recipe'''</pre>
<ul><li><p>try:</p></li>
<li><p>subprocess.check_call(cmd)</p></li>
<li><p>result = True</p></li>
<li><p>except subprocess.CalledProcessError as e:</p></li>
<li><p>print(("Stdout output:\n", e.output))</p></li>
<li><p>result = False</p></li>
<li><p>assert result</p></li></ul>
<p>+ proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + out, err = proc.communicate() + if out: + sys.stdout.write(out.decode("utf8")) + if err: + sys.stderr.write(err.decode("utf8")) + + if proc.returncode != 0: + retstderr = " “.join(cmd) + retstderr += “\n\nTHIS IS THE REAL CAUSE OF THE FAILURE:\n” + retstderr += err.decode("UTF-8”) + “\n” + raise subprocess.CalledProcessError(proc.returncode, retstderr)</p>
<p>Repository URL: <a href="https://bitbucket.org/yt_analysis/yt/">https://bitbucket.org/yt_analysis/yt/</a></p>
<p>—</p>
<p>This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.</p>
<img src="http://link.bitbucket.org/wf/open?upn=ll4ctv0L-2ByeRZFC1LslHcg6aJmnQ70VruLbmeLQr27CRn8aBLg1sfB5Kk2D9FsuDTYkqO0QaK9GozuUDyNW5SoKPokp9B2HSZolRBN8xO0CpvefqyRCcnKiH76lQu19thjIwlyO8ySCtpeWyl0Yvo7FJHoQngc4Er6dCAi8wyU4rBFx7-2B9KRfmBp5Pb4CzKSzVcuJ-2BLHTDgOEDs2JOv8iVFN6tCbSRRbBg5Nndyqz3k-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;"/>
</body></html>