<html><body>
<p>2 new commits in yt:</p>
<p><a href="https://bitbucket.org/yt_analysis/yt/commits/c6cf963c1f47/">https://bitbucket.org/yt_analysis/yt/commits/c6cf963c1f47/</a> Changeset: c6cf963c1f47 Branch: yt User: xarthisius Date: 2016-04-26 15:35:41+00:00 Summary: Force nose to produce meaningful traceback for cookbook recipes' tests Affected #: 1 file</p>
<p>diff -r 77db965d0a537a9884d6db3c5ad7595dc3070ba0 -r c6cf963c1f47bdf7dcaa2c733d58710c771de5a2 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><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-2ByeRZFC1LslHcg6aJmnQ70VruLbmeLQr27ArtqzdrnVAzWEducJmsiw9GENbMP3Oj5QiuRENGgD-2FByQxIDp1HM0wGuHU35Hpruefd2xQit9jGCz6cAuMq-2Fqhw4nrrvs2u4V-2BjcIwtPkoJJio9AE3wTz1K1vrNN27eILKnEPU64Ym8nPEMNOO5P3Yy1d0A2bLCd7uaWEYrJbL6QexX33hGmsjRLvMlqh9Iao-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>