[yt-svn] commit/yt: MatthewTurk: Don't allow can_run_pf and data_dir_load to run if the path does not exist.

Bitbucket commits-noreply at bitbucket.org
Sat Nov 10 10:52:42 PST 2012


1 new commit in yt:


https://bitbucket.org/yt_analysis/yt/changeset/66da587187b8/
changeset:   66da587187b8
branch:      yt
user:        MatthewTurk
date:        2012-11-10 19:51:57
summary:     Don't allow can_run_pf and data_dir_load to run if the path does not exist.
affected #:  1 file

diff -r 5e3967177d655534958bfd15f7c2762111c60141 -r 66da587187b86e19ae50146341e51fe61d276899 yt/utilities/answer_testing/framework.py
--- a/yt/utilities/answer_testing/framework.py
+++ b/yt/utilities/answer_testing/framework.py
@@ -180,6 +180,8 @@
 
 def can_run_pf(pf_fn):
     path = ytcfg.get("yt", "test_data_dir")
+    if not os.path.isdir(path):
+        retrun False
     if isinstance(pf_fn, StaticOutput):
         return AnswerTestingTest.result_storage is not None
     with temp_cwd(path):
@@ -191,6 +193,8 @@
 
 def data_dir_load(pf_fn):
     path = ytcfg.get("yt", "test_data_dir")
+    if not os.path.isdir(path):
+        retrun False
     if isinstance(pf_fn, StaticOutput): return pf_fn
     with temp_cwd(path):
         pf = load(pf_fn)

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list