[Yt-svn] commit/yt: 2 new changesets
Bitbucket
commits-noreply at bitbucket.org
Mon Apr 4 14:26:41 PDT 2011
2 new changesets in yt:
http://bitbucket.org/yt_analysis/yt/changeset/65563ea99a32/
changeset: r4071:65563ea99a32
branch: yt
user: MatthewTurk
date: 2011-04-04 22:41:01
summary: Minor updates to answer_testing to support different comparison paths
affected #: 2 files (140 bytes)
--- a/yt/utilities/answer_testing/api.py Mon Apr 04 14:09:36 2011 -0400
+++ b/yt/utilities/answer_testing/api.py Mon Apr 04 16:41:01 2011 -0400
@@ -30,4 +30,9 @@
from .runner import \
RegressionTestRunner, \
- RegressionTestStorage
+ RegressionTestStorage, \
+ run_main
+
+from .output_tests import \
+ YTStaticOutputTest, \
+ create_test
--- a/yt/utilities/answer_testing/runner.py Mon Apr 04 14:09:36 2011 -0400
+++ b/yt/utilities/answer_testing/runner.py Mon Apr 04 16:41:01 2011 -0400
@@ -34,14 +34,15 @@
class RegressionTestRunner(object):
def __init__(self, id, compare_id = None,
- results_path = ".", io_log = "OutputLog"):
+ results_path = ".", compare_results_path = ".",
+ io_log = "OutputLog"):
# This test runner assumes it has been launched with the current
# working directory that of the test case itself.
self.io_log = io_log
self.id = id
if compare_id is not None:
self.old_results = RegressionTestStorage(
- compare_id, path=results_path)
+ compare_id, path=compare_results_path)
else:
self.old_results = None
self.results = RegressionTestStorage(id, path=results_path)
http://bitbucket.org/yt_analysis/yt/changeset/e54b4f4d1f2f/
changeset: r4072:e54b4f4d1f2f
branch: yt
user: MatthewTurk
date: 2011-04-04 23:25:57
summary: Adding a helper function for multiple test problem testing in the same interpreter. Fixed having a non-hashed or identified 'results' directory.
affected #: 2 files (213 bytes)
--- a/yt/utilities/answer_testing/api.py Mon Apr 04 16:41:01 2011 -0400
+++ b/yt/utilities/answer_testing/api.py Mon Apr 04 17:25:57 2011 -0400
@@ -31,7 +31,8 @@
from .runner import \
RegressionTestRunner, \
RegressionTestStorage, \
- run_main
+ run_main, \
+ clear_registry
from .output_tests import \
YTStaticOutputTest, \
--- a/yt/utilities/answer_testing/runner.py Mon Apr 04 16:41:01 2011 -0400
+++ b/yt/utilities/answer_testing/runner.py Mon Apr 04 17:25:57 2011 -0400
@@ -8,10 +8,16 @@
from output_tests import test_registry, MultipleOutputTest, \
RegressionTestException
+def clear_registry():
+ test_registry.clear()
+
class RegressionTestStorage(object):
- def __init__(self, id, path = "."):
- self.id = id
- self._path = os.path.join(path, "results_%s" % self.id)
+ def __init__(self, results_id, path = "."):
+ self.id = results_id
+ if results_id == "":
+ self._path = os.path.join(path, "results")
+ else:
+ self._path = os.path.join(path, "results_%s" % self.id)
if not os.path.isdir(self._path): os.mkdir(self._path)
if os.path.isfile(self._path): raise RuntimeError
@@ -33,19 +39,19 @@
return tr
class RegressionTestRunner(object):
- def __init__(self, id, compare_id = None,
+ def __init__(self, results_id, compare_id = None,
results_path = ".", compare_results_path = ".",
io_log = "OutputLog"):
# This test runner assumes it has been launched with the current
# working directory that of the test case itself.
self.io_log = io_log
- self.id = id
+ self.id = results_id
if compare_id is not None:
self.old_results = RegressionTestStorage(
compare_id, path=compare_results_path)
else:
self.old_results = None
- self.results = RegressionTestStorage(id, path=results_path)
+ self.results = RegressionTestStorage(results_id, path=results_path)
self.plot_list = {}
self.passed_tests = {}
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