Commits

Matthew Turk committed 66da587

Don't allow can_run_pf and data_dir_load to run if the path does not exist.

Comments (0)

Files changed (1)

yt/utilities/answer_testing/framework.py

 
 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):
 
 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)