<html><body>
<p>1 new commit in yt:</p>
<p><a href="https://bitbucket.org/yt_analysis/yt/commits/10bf552980ab/">https://bitbucket.org/yt_analysis/yt/commits/10bf552980ab/</a> Changeset:   10bf552980ab Branch:      yt User:        chummels Date:        2016-03-24 16:21:50+00:00 Summary:     Merged in xarthisius/yt (pull request #2056)</p>
<p>Let test datasets paths be handled by convenience functions instead of doing chdir Affected #:  1 file</p>
<p>diff -r f12067d78ef445599aa567bc5e38a6406bef9f06 -r 10bf552980ab547ece30ab77e8ccd522d440a74e yt/utilities/answer_testing/framework.py --- a/yt/utilities/answer_testing/framework.py +++ b/yt/utilities/answer_testing/framework.py @@ -264,14 +264,13 @@</p>
<pre>path = ytcfg.get("yt", "test_data_dir")
if not os.path.isdir(path):
    return False</pre>
<ul><li><p>with temp_cwd(path):</p></li>
<li><p>if file_check:</p></li>
<li><p>return os.path.isfile(ds_fn) and \</p></li>
<li><p>AnswerTestingTest.result_storage is not None</p></li>
<li><p>try:</p></li>
<li><p>load(ds_fn)</p></li>
<li><p>except YTOutputNotIdentified:</p></li>
<li><p>return False</p></li></ul>
<p>+    if file_check: +        return os.path.isfile(os.path.join(path, ds_fn)) and \ +            AnswerTestingTest.result_storage is not None +    try: +        load(ds_fn) +    except YTOutputNotIdentified: +        return False</p>
<pre>    return AnswerTestingTest.result_storage is not None

def can_run_sim(sim_fn, sim_type, file_check = False):</pre>
<p>@@ -280,14 +279,13 @@</p>
<pre>path = ytcfg.get("yt", "test_data_dir")
if not os.path.isdir(path):
    return False</pre>
<ul><li><p>with temp_cwd(path):</p></li>
<li><p>if file_check:</p></li>
<li><p>return os.path.isfile(sim_fn) and \</p></li>
<li><p>AnswerTestingTest.result_storage is not None</p></li>
<li><p>try:</p></li>
<li><p>simulation(sim_fn, sim_type)</p></li>
<li><p>except YTOutputNotIdentified:</p></li>
<li><p>return False</p></li></ul>
<p>+    if file_check: +        return os.path.isfile(os.path.join(path, sim_fn)) and \ +            AnswerTestingTest.result_storage is not None +    try: +        simulation(sim_fn, sim_type) +    except YTOutputNotIdentified: +        return False</p>
<pre>    return AnswerTestingTest.result_storage is not None

def data_dir_load(ds_fn, cls = None, args = None, kwargs = None):</pre>
<p>@@ -297,13 +295,12 @@</p>
<pre>if isinstance(ds_fn, Dataset): return ds_fn
if not os.path.isdir(path):
    return False</pre>
<ul><li><p>with temp_cwd(path):</p></li>
<li><p>if cls is None:</p></li>
<li><p>ds = load(ds_fn, *args, **kwargs)</p></li>
<li><p>else:</p></li>
<li><p>ds = cls(ds_fn, *args, **kwargs)</p></li>
<li><p>ds.index</p></li>
<li><p>return ds</p></li></ul>
<p>+    if cls is None: +        ds = load(ds_fn, *args, **kwargs) +    else: +        ds = cls(os.path.join(path, ds_fn), *args, **kwargs) +    ds.index +    return ds</p>
<pre>def sim_dir_load(sim_fn, path = None, sim_type = "Enzo",
                 find_outputs=False):</pre>
<p>@@ -311,9 +308,8 @@</p>
<pre>    raise IOError
if os.path.exists(sim_fn) or not path:
    path = "."</pre>
<ul><li><p>with temp_cwd(path):</p></li>
<li><p>return simulation(sim_fn, sim_type,</p></li>
<li><p>find_outputs=find_outputs)</p></li></ul>
<p>+    return simulation(os.path.join(path, sim_fn), sim_type, +                      find_outputs=find_outputs)</p>
<pre>class AnswerTestingTest(object):
    reference_storage = None</pre>
<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-2ByeRZFC1LslHcg6aJmnQ70VruLbmeLQr27DMicUeMc4P-2BGcZjTaJkTNVkYECKYonKIaEgWnQHWdKT0j-2BsA4Lm-2BVe6KKTtmDYOad25v8zNnq1mRNV-2FTUxpLF-2FY-2F2KSBNfLroToE5dmr1abrryaKppjpu-2B1A5cy91xPy8nQ50pa9Okh4taBTR3Iqh-2BH4IrvJ1THLDK8STh5tviLI4CRV55s04Yx1-2BmCQsUOdM-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>