[Yt-svn] commit/yt: 2 new changesets
Bitbucket
commits-noreply at bitbucket.org
Mon Jun 20 22:03:22 PDT 2011
2 new changesets in yt:
http://bitbucket.org/yt_analysis/yt/changeset/7709ec49a262/
changeset: 7709ec49a262
branch: yt
user: MatthewTurk
date: 2011-06-21 07:02:47
summary: Adding watcher for Xunit reporting to the test framework.
affected #: 2 files (181 bytes)
--- a/tests/runall.py Wed Jun 15 10:55:57 2011 -0400
+++ b/tests/runall.py Tue Jun 21 01:02:47 2011 -0400
@@ -4,7 +4,8 @@
from yt.utilities.answer_testing.api import \
RegressionTestRunner, clear_registry, create_test, \
- TestFieldStatistics, TestAllProjections, registry_entries
+ TestFieldStatistics, TestAllProjections, registry_entries, \
+ Xunit
from yt.utilities.command_line import get_yt_version
@@ -78,12 +79,16 @@
sys.exit(1)
# Now we modify our compare name and self name to include the pf.
compare_id = opts.compare_name
- if compare_id is not None: compare_id += "_%s_%s" % (pf, pf._hash())
+ watcher = None
+ if compare_id is not None:
+ compare_id += "_%s_%s" % (pf, pf._hash())
+ watcher = Xunit()
this_id = opts.this_name + "_%s_%s" % (pf, pf._hash())
rtr = RegressionTestRunner(this_id, compare_id,
results_path = opts.storage_dir,
compare_results_path = opts.storage_dir,
io_log = [opts.parameter_file])
+ rtr.watcher = watcher
tests_to_run = []
for m, vals in mapping.items():
print vals, opts.test_pattern
@@ -93,5 +98,7 @@
load_tests(m, cwd)
for test_name in sorted(tests_to_run):
rtr.run_test(test_name)
+ if watcher is not None:
+ rtr.watcher.report()
for test_name, result in sorted(rtr.passed_tests.items()):
print "TEST %s: %s" % (test_name, result)
--- a/yt/utilities/answer_testing/api.py Wed Jun 15 10:55:57 2011 -0400
+++ b/yt/utilities/answer_testing/api.py Tue Jun 21 01:02:47 2011 -0400
@@ -42,3 +42,6 @@
from .default_tests import \
TestFieldStatistics, \
TestAllProjections
+
+from .xunit import \
+ Xunit
http://bitbucket.org/yt_analysis/yt/changeset/e67e06316dae/
changeset: e67e06316dae
branch: yt
user: MatthewTurk
date: 2011-06-21 07:03:12
summary: Merge
affected #: 2 files (340 bytes)
--- a/yt/frontends/flash/data_structures.py Tue Jun 21 01:02:47 2011 -0400
+++ b/yt/frontends/flash/data_structures.py Tue Jun 21 01:03:12 2011 -0400
@@ -84,6 +84,12 @@
def _detect_fields(self):
ncomp = self._handle["/unknown names"].shape[0]
self.field_list = [s for s in self._handle["/unknown names"][:].flat]
+ facevars = [s for s in self._handle
+ if s.startswith(("fcx","fcy","fcz")) and s[-1].isdigit()]
+ nfacevars = len(facevars)
+ if (nfacevars > 0) :
+ ncomp += nfacevars
+ self.field_list.append(facevars)
if ("/particle names" in self._handle) :
self.field_list += ["particle_" + s[0].strip() for s
in self._handle["/particle names"][:]]
--- a/yt/utilities/amr_kdtree/amr_kdtree.py Tue Jun 21 01:02:47 2011 -0400
+++ b/yt/utilities/amr_kdtree/amr_kdtree.py Tue Jun 21 01:03:12 2011 -0400
@@ -259,6 +259,7 @@
self.current_split_dim = 0
self.pf = pf
+ self._id_offset = pf.h.grids[0]._id_offset
if nprocs > len(pf.h.grids):
print('Parallel rendering requires that the number of \n \
grids in the dataset is greater or equal to the number of \n \
@@ -568,7 +569,7 @@
None
"""
- thisnode.grid = self.pf.hierarchy.grids[thisnode.grid - 1]
+ thisnode.grid = self.pf.hierarchy.grids[thisnode.grid - self._id_offset]
dds = thisnode.grid.dds
gle = thisnode.grid.LeftEdge
@@ -844,7 +845,7 @@
# Check if we have children and have not exceeded l_max
if len(thisgrid.Children) > 0 and thisgrid.Level < self.l_max:
# Get the children that are actually in the current volume
- children = [child.id - 1 for child in thisgrid.Children
+ children = [child.id - self._id_offset for child in thisgrid.Children
if na.all(child.LeftEdge < current_node.r_corner) &
na.all(child.RightEdge > current_node.l_corner)]
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