All sorting of materials/cells/universes is now done by ID in Python API

This commit is contained in:
Will Boyd 2015-10-21 00:28:41 -04:00
parent f72eda7f28
commit b92aaf5d10
17 changed files with 2350 additions and 30 deletions

View file

@ -135,7 +135,9 @@ class Geometry(object):
for cell in material_cells:
materials.add(cell._fill)
return sorted(list(materials))
materials = list(materials)
materials.sort(key=lambda x: x.id)
return materials
def get_all_material_cells(self):
all_cells = self.get_all_cells()
@ -145,7 +147,9 @@ class Geometry(object):
if cell._type == 'normal':
material_cells.add(cell)
return sorted(list(material_cells))
material_cells = list(material_cells)
material_cells.sort(key=lambda x: x.id)
return material_cells
def get_all_material_universes(self):
"""Return all universes composed of at least one non-fill cell
@ -166,7 +170,9 @@ class Geometry(object):
if cell._type == 'normal':
material_universes.add(universe)
return sorted(list(material_universes))
material_universes = list(material_universes)
material_universes.sort(key=lambda x: x.id)
return material_universes
class GeometryFile(object):

View file

@ -56,7 +56,7 @@ class Library(object):
tally_trigger : Trigger
An (optional) tally precision trigger given to each tally used to
compute the cross section
all_mgxs : dict
all_mgxs : OrderedDict
MGXS objects keyed by domain ID and cross section type
statepoint : openmc.StatePoint
The statepoint with tally data used to the compute cross sections

View file

@ -83,7 +83,7 @@ class MGXS(object):
tally_trigger : Trigger
An (optional) tally precision trigger given to each tally used to
compute the cross section
tallies : dict
tallies : OrderedDict
OpenMC tallies needed to compute the multi-group cross section
xs_tally : Tally
Derived tally for the multi-group cross section. This attribute

View file

@ -470,8 +470,8 @@ for key in iter(tests):
logfilename = os.path.splitext(logfilename)[0]
logfilename = logfilename + '_{0}.log'.format(test.name)
shutil.copy(logfile[0], logfilename)
with open(logfilename) as fh: print(fh.read())
print(logfilename)
with open(logfilename) as fh: print(fh.read())
# Clear build directory and remove binary and hdf5 files
shutil.rmtree('build', ignore_errors=True)

View file

@ -1 +1 @@
06e2f794c78d312491a87074b2e725d6f395fc250e004c125b50c1057b725ef1dbf3fd943629fd01b5a26ed018a1292712fc3425c925661ddadbf83194eb66df
35f99f1973b3bf3efcec6c2dddf56d6679a15dab8582ab5336e86e4fdf90967ce91036e5c30c345decb994ab9133a906b82dc8fad0cdd3398a612d9aa05c1c77

View file

@ -1 +1,49 @@
a14024dfa41c9b9e90db79574f4d3f9eeeffb1c8c6fd7d26a234bf3fe1c3268316ee9f1de01211583246d0968b148870086469548a7c8ca424b8ff4111db0c8d
material group in nuclide mean std. dev.
0 1 1 total 0.419289 0.01638 material group in nuclide mean std. dev.
0 1 1 total 0.07774 0.003273 material group in group out nuclide mean std. dev.
0 1 1 1 total 0.352665 0.015654 material group out nuclide mean std. dev.
0 1 1 total 1 0.119622 material group in nuclide mean std. dev.
0 2 1 total 0.247316 0.009562 material group in nuclide mean std. dev.
0 2 1 total 0 0 material group in group out nuclide mean std. dev.
0 2 1 1 total 0.244838 0.009996 material group out nuclide mean std. dev.
0 2 1 total 0 0 material group in nuclide mean std. dev.
0 3 1 total 0.409938 0.042262 material group in nuclide mean std. dev.
0 3 1 total 0 0 material group in group out nuclide mean std. dev.
0 3 1 1 total 0.403354 0.041386 material group out nuclide mean std. dev.
0 3 1 total 0 0 material group in nuclide mean std. dev.
0 4 1 total 0.344007 0.05352 material group in nuclide mean std. dev.
0 4 1 total 0 0 material group in group out nuclide mean std. dev.
0 4 1 1 total 0.340438 0.052067 material group out nuclide mean std. dev.
0 4 1 total 0 0 material group in nuclide mean std. dev.
0 5 1 total 0 0 material group in nuclide mean std. dev.
0 5 1 total 0 0 material group in group out nuclide mean std. dev.
0 5 1 1 total 0 0 material group out nuclide mean std. dev.
0 5 1 total 0 0 material group in nuclide mean std. dev.
0 6 1 total 0 0 material group in nuclide mean std. dev.
0 6 1 total 0 0 material group in group out nuclide mean std. dev.
0 6 1 1 total 0 0 material group out nuclide mean std. dev.
0 6 1 total 0 0 material group in nuclide mean std. dev.
0 7 1 total 0 0 material group in nuclide mean std. dev.
0 7 1 total 0 0 material group in group out nuclide mean std. dev.
0 7 1 1 total 0 0 material group out nuclide mean std. dev.
0 7 1 total 0 0 material group in nuclide mean std. dev.
0 8 1 total 0 0 material group in nuclide mean std. dev.
0 8 1 total 0 0 material group in group out nuclide mean std. dev.
0 8 1 1 total 0 0 material group out nuclide mean std. dev.
0 8 1 total 0 0 material group in nuclide mean std. dev.
0 9 1 total 0.751873 0.559701 material group in nuclide mean std. dev.
0 9 1 total 0 0 material group in group out nuclide mean std. dev.
0 9 1 1 total 0.695491 0.50757 material group out nuclide mean std. dev.
0 9 1 total 0 0 material group in nuclide mean std. dev.
0 10 1 total 0 0 material group in nuclide mean std. dev.
0 10 1 total 0 0 material group in group out nuclide mean std. dev.
0 10 1 1 total 0 0 material group out nuclide mean std. dev.
0 10 1 total 0 0 material group in nuclide mean std. dev.
0 11 1 total 0.457329 0.403578 material group in nuclide mean std. dev.
0 11 1 total 0 0 material group in group out nuclide mean std. dev.
0 11 1 1 total 0.446737 0.392775 material group out nuclide mean std. dev.
0 11 1 total 0 0 material group in nuclide mean std. dev.
0 12 1 total 0.574978 0.38864 material group in nuclide mean std. dev.
0 12 1 total 0 0 material group in group out nuclide mean std. dev.
0 12 1 1 total 0.559478 0.377512 material group out nuclide mean std. dev.
0 12 1 total 0 0

View file

@ -24,7 +24,7 @@ class MGXSTestHarness(PyAPITestHarness):
# Initialize MGXS Library for a few cross section types
self.mgxs_lib = openmc.mgxs.Library(self._input_set.geometry.geometry)
self.mgxs_lib.by_nuclide = True
self.mgxs_lib.by_nuclide = False
self.mgxs_lib.mgxs_types = ['transport', 'nu-fission',
'nu-scatter matrix', 'chi']
self.mgxs_lib.energy_groups = energy_groups
@ -33,10 +33,10 @@ class MGXSTestHarness(PyAPITestHarness):
# Initialize a tallies file
self._input_set.tallies = openmc.TalliesFile()
self.mgxs_lib.add_to_tallies_file(self._input_set.tallies, merge=True)
self.mgxs_lib.add_to_tallies_file(self._input_set.tallies, merge=False)
self._input_set.tallies.export_to_xml()
def _get_results(self, hash_output=True):
def _get_results(self, hash_output=False):
"""Digest info in the statepoint and return as a string."""
# Read the statepoint file.
@ -57,12 +57,14 @@ class MGXSTestHarness(PyAPITestHarness):
# Build a string from Pandas Dataframe for each 1-group MGXS
outstr = ''
for domain in sorted(condense_lib.domains):
for domain in condense_lib.domains:
for mgxs_type in condense_lib.mgxs_types:
mgxs = condense_lib.get_mgxs(domain, mgxs_type)
df = mgxs.get_pandas_dataframe()
outstr += df.to_string()
print(outstr)
# Hash the results if necessary
if hash_output:
sha512 = hashlib.sha512()

View file

@ -1 +1 @@
ff4b31da88312d526bebb8819aaaa75f737b9aaff4660557009c8277c1e8c5f2515d256de9ffc9bdc07bce42719fae27aeb8d0a3d3b61552dd4b1eddd48e6ff2
35f99f1973b3bf3efcec6c2dddf56d6679a15dab8582ab5336e86e4fdf90967ce91036e5c30c345decb994ab9133a906b82dc8fad0cdd3398a612d9aa05c1c77

View file

@ -1 +1,168 @@
290551338cc3a6c5fcf965d5f0ee0d14bb68a9fa3f4066bd59c65d2673bf659547be0674961631f5fd03bc06d991ff1dafb974938222a8e87c4d232f1212bd4a
domain=1 type=transport
[ 0.38437891 0.81208747]
[ 0.01648997 0.07418959]
domain=1 type=nu-fission
[ 0.02127008 0.69604034]
[ 0.0008939 0.05345764]
domain=1 type=nu-scatter matrix
[[ 3.49923892e-01 1.73140769e-04]
[ 1.94810926e-03 3.79607212e-01]]
[[ 0.01664928 0.0001732 ]
[ 0.00195193 0.04007819]]
domain=1 type=chi
[ 1. 0.]
[ 0.11962178 0. ]
domain=2 type=transport
[ 0.24504295 0.26645769]
[ 0.00882749 0.05220872]
domain=2 type=nu-fission
[ 0. 0.]
[ 0. 0.]
domain=2 type=nu-scatter matrix
[[ 0.24365718 0. ]
[ 0. 0.25478661]]
[[ 0.00908307 0. ]
[ 0. 0.05556256]]
domain=2 type=chi
[ 0. 0.]
[ 0. 0.]
domain=3 type=transport
[ 0.28227749 1.42731974]
[ 0.03724175 0.24712746]
domain=3 type=nu-fission
[ 0. 0.]
[ 0. 0.]
domain=3 type=nu-scatter matrix
[[ 0.25396726 0.02727268]
[ 0. 1.37652669]]
[[ 0.03617307 0.00180698]
[ 0. 0.2402569 ]]
domain=3 type=chi
[ 0. 0.]
[ 0. 0.]
domain=4 type=transport
[ 0.25572316 1.17976682]
[ 0.05191655 0.22938034]
domain=4 type=nu-fission
[ 0. 0.]
[ 0. 0.]
domain=4 type=nu-scatter matrix
[[ 0.23297756 0.02228141]
[ 0. 1.14680862]]
[[ 0.04977114 0.00262525]
[ 0. 0.22219839]]
domain=4 type=chi
[ 0. 0.]
[ 0. 0.]
domain=5 type=transport
[ 0. 0.]
[ 0. 0.]
domain=5 type=nu-fission
[ 0. 0.]
[ 0. 0.]
domain=5 type=nu-scatter matrix
[[ 0. 0.]
[ 0. 0.]]
[[ 0. 0.]
[ 0. 0.]]
domain=5 type=chi
[ 0. 0.]
[ 0. 0.]
domain=6 type=transport
[ 0. 0.]
[ 0. 0.]
domain=6 type=nu-fission
[ 0. 0.]
[ 0. 0.]
domain=6 type=nu-scatter matrix
[[ 0. 0.]
[ 0. 0.]]
[[ 0. 0.]
[ 0. 0.]]
domain=6 type=chi
[ 0. 0.]
[ 0. 0.]
domain=7 type=transport
[ 0. 0.]
[ 0. 0.]
domain=7 type=nu-fission
[ 0. 0.]
[ 0. 0.]
domain=7 type=nu-scatter matrix
[[ 0. 0.]
[ 0. 0.]]
[[ 0. 0.]
[ 0. 0.]]
domain=7 type=chi
[ 0. 0.]
[ 0. 0.]
domain=8 type=transport
[ 0. 0.]
[ 0. 0.]
domain=8 type=nu-fission
[ 0. 0.]
[ 0. 0.]
domain=8 type=nu-scatter matrix
[[ 0. 0.]
[ 0. 0.]]
[[ 0. 0.]
[ 0. 0.]]
domain=8 type=chi
[ 0. 0.]
[ 0. 0.]
domain=9 type=transport
[ 0.50403601 1.68709544]
[ 0.37962374 2.53662237]
domain=9 type=nu-fission
[ 0. 0.]
[ 0. 0.]
domain=9 type=nu-scatter matrix
[[ 0.50403601 0. ]
[ 0. 1.41795483]]
[[ 0.37962374 0. ]
[ 0. 2.15802716]]
domain=9 type=chi
[ 0. 0.]
[ 0. 0.]
domain=10 type=transport
[ 0. 0.]
[ 0. 0.]
domain=10 type=nu-fission
[ 0. 0.]
[ 0. 0.]
domain=10 type=nu-scatter matrix
[[ 0. 0.]
[ 0. 0.]]
[[ 0. 0.]
[ 0. 0.]]
domain=10 type=chi
[ 0. 0.]
[ 0. 0.]
domain=11 type=transport
[ 0.30282618 1.00614519]
[ 0.40131081 1.09163785]
domain=11 type=nu-fission
[ 0. 0.]
[ 0. 0.]
domain=11 type=nu-scatter matrix
[[ 0.27567871 0.02714747]
[ 0. 0.95792921]]
[[ 0.38567601 0.02000859]
[ 0. 1.05195936]]
domain=11 type=chi
[ 0. 0.]
[ 0. 0.]
domain=12 type=transport
[ 0.25593293 1.11334475]
[ 0.26842571 0.98867569]
domain=12 type=nu-fission
[ 0. 0.]
[ 0. 0.]
domain=12 type=nu-scatter matrix
[[ 0.22631045 0.02962248]
[ 0. 1.07168976]]
[[ 0.25487194 0.0177599 ]
[ 0. 0.95829029]]
domain=12 type=chi
[ 0. 0.]
[ 0. 0.]

View file

@ -34,10 +34,10 @@ class MGXSTestHarness(PyAPITestHarness):
# Initialize a tallies file
self._input_set.tallies = openmc.TalliesFile()
self.mgxs_lib.add_to_tallies_file(self._input_set.tallies, merge=True)
self.mgxs_lib.add_to_tallies_file(self._input_set.tallies, merge=False)
self._input_set.tallies.export_to_xml()
def _get_results(self, hash_output=True):
def _get_results(self, hash_output=False):
"""Digest info in the statepoint and return as a string."""
# Read the statepoint file.
@ -60,12 +60,13 @@ class MGXSTestHarness(PyAPITestHarness):
# Build a string from the datasets in the HDF5 file
outstr = ''
for domain in sorted(self.mgxs_lib.domains):
for domain in self.mgxs_lib.domains:
for mgxs_type in self.mgxs_lib.mgxs_types:
outstr += 'domain={0} type={1}\n'.format(domain.id, mgxs_type)
key = 'material/{0}/{1}/average'.format(domain.id, mgxs_type)
outstr += str(f[key])
outstr += str(f[key][...]) + '\n'
key = 'material/{0}/{1}/std. dev.'.format(domain.id, mgxs_type)
outstr += str(f[key])
outstr += str(f[key][...]) + '\n'
# Close the MGXS HDF5 file
f.close()

View file

@ -1 +1 @@
ff4b31da88312d526bebb8819aaaa75f737b9aaff4660557009c8277c1e8c5f2515d256de9ffc9bdc07bce42719fae27aeb8d0a3d3b61552dd4b1eddd48e6ff2
35f99f1973b3bf3efcec6c2dddf56d6679a15dab8582ab5336e86e4fdf90967ce91036e5c30c345decb994ab9133a906b82dc8fad0cdd3398a612d9aa05c1c77

View file

@ -1 +1,121 @@
f882fc13affc45ed4ce833c17b719c10a371b3c086022a846014e0ce46337971850d55c7634a9bfc740709c696aef8ec9cdad19253f62aeb77af6baed35f9fda
material group in nuclide mean std. dev.
1 1 1 total 0.384379 0.01649
0 1 2 total 0.812087 0.07419 material group in nuclide mean std. dev.
1 1 1 total 0.02127 0.000894
0 1 2 total 0.69604 0.053458 material group in group out nuclide mean std. dev.
3 1 1 1 total 0.349924 0.016649
2 1 1 2 total 0.000173 0.000173
1 1 2 1 total 0.001948 0.001952
0 1 2 2 total 0.379607 0.040078 material group out nuclide mean std. dev.
1 1 1 total 1 0.119622
0 1 2 total 0 0.000000 material group in nuclide mean std. dev.
1 2 1 total 0.245043 0.008827
0 2 2 total 0.266458 0.052209 material group in nuclide mean std. dev.
1 2 1 total 0 0
0 2 2 total 0 0 material group in group out nuclide mean std. dev.
3 2 1 1 total 0.243657 0.009083
2 2 1 2 total 0.000000 0.000000
1 2 2 1 total 0.000000 0.000000
0 2 2 2 total 0.254787 0.055563 material group out nuclide mean std. dev.
1 2 1 total 0 0
0 2 2 total 0 0 material group in nuclide mean std. dev.
1 3 1 total 0.282277 0.037242
0 3 2 total 1.427320 0.247127 material group in nuclide mean std. dev.
1 3 1 total 0 0
0 3 2 total 0 0 material group in group out nuclide mean std. dev.
3 3 1 1 total 0.253967 0.036173
2 3 1 2 total 0.027273 0.001807
1 3 2 1 total 0.000000 0.000000
0 3 2 2 total 1.376527 0.240257 material group out nuclide mean std. dev.
1 3 1 total 0 0
0 3 2 total 0 0 material group in nuclide mean std. dev.
1 4 1 total 0.255723 0.051917
0 4 2 total 1.179767 0.229380 material group in nuclide mean std. dev.
1 4 1 total 0 0
0 4 2 total 0 0 material group in group out nuclide mean std. dev.
3 4 1 1 total 0.232978 0.049771
2 4 1 2 total 0.022281 0.002625
1 4 2 1 total 0.000000 0.000000
0 4 2 2 total 1.146809 0.222198 material group out nuclide mean std. dev.
1 4 1 total 0 0
0 4 2 total 0 0 material group in nuclide mean std. dev.
1 5 1 total 0 0
0 5 2 total 0 0 material group in nuclide mean std. dev.
1 5 1 total 0 0
0 5 2 total 0 0 material group in group out nuclide mean std. dev.
3 5 1 1 total 0 0
2 5 1 2 total 0 0
1 5 2 1 total 0 0
0 5 2 2 total 0 0 material group out nuclide mean std. dev.
1 5 1 total 0 0
0 5 2 total 0 0 material group in nuclide mean std. dev.
1 6 1 total 0 0
0 6 2 total 0 0 material group in nuclide mean std. dev.
1 6 1 total 0 0
0 6 2 total 0 0 material group in group out nuclide mean std. dev.
3 6 1 1 total 0 0
2 6 1 2 total 0 0
1 6 2 1 total 0 0
0 6 2 2 total 0 0 material group out nuclide mean std. dev.
1 6 1 total 0 0
0 6 2 total 0 0 material group in nuclide mean std. dev.
1 7 1 total 0 0
0 7 2 total 0 0 material group in nuclide mean std. dev.
1 7 1 total 0 0
0 7 2 total 0 0 material group in group out nuclide mean std. dev.
3 7 1 1 total 0 0
2 7 1 2 total 0 0
1 7 2 1 total 0 0
0 7 2 2 total 0 0 material group out nuclide mean std. dev.
1 7 1 total 0 0
0 7 2 total 0 0 material group in nuclide mean std. dev.
1 8 1 total 0 0
0 8 2 total 0 0 material group in nuclide mean std. dev.
1 8 1 total 0 0
0 8 2 total 0 0 material group in group out nuclide mean std. dev.
3 8 1 1 total 0 0
2 8 1 2 total 0 0
1 8 2 1 total 0 0
0 8 2 2 total 0 0 material group out nuclide mean std. dev.
1 8 1 total 0 0
0 8 2 total 0 0 material group in nuclide mean std. dev.
1 9 1 total 0.504036 0.379624
0 9 2 total 1.687095 2.536622 material group in nuclide mean std. dev.
1 9 1 total 0 0
0 9 2 total 0 0 material group in group out nuclide mean std. dev.
3 9 1 1 total 0.504036 0.379624
2 9 1 2 total 0.000000 0.000000
1 9 2 1 total 0.000000 0.000000
0 9 2 2 total 1.417955 2.158027 material group out nuclide mean std. dev.
1 9 1 total 0 0
0 9 2 total 0 0 material group in nuclide mean std. dev.
1 10 1 total 0 0
0 10 2 total 0 0 material group in nuclide mean std. dev.
1 10 1 total 0 0
0 10 2 total 0 0 material group in group out nuclide mean std. dev.
3 10 1 1 total 0 0
2 10 1 2 total 0 0
1 10 2 1 total 0 0
0 10 2 2 total 0 0 material group out nuclide mean std. dev.
1 10 1 total 0 0
0 10 2 total 0 0 material group in nuclide mean std. dev.
1 11 1 total 0.302826 0.401311
0 11 2 total 1.006145 1.091638 material group in nuclide mean std. dev.
1 11 1 total 0 0
0 11 2 total 0 0 material group in group out nuclide mean std. dev.
3 11 1 1 total 0.275679 0.385676
2 11 1 2 total 0.027147 0.020009
1 11 2 1 total 0.000000 0.000000
0 11 2 2 total 0.957929 1.051959 material group out nuclide mean std. dev.
1 11 1 total 0 0
0 11 2 total 0 0 material group in nuclide mean std. dev.
1 12 1 total 0.255933 0.268426
0 12 2 total 1.113345 0.988676 material group in nuclide mean std. dev.
1 12 1 total 0 0
0 12 2 total 0 0 material group in group out nuclide mean std. dev.
3 12 1 1 total 0.226310 0.254872
2 12 1 2 total 0.029622 0.017760
1 12 2 1 total 0.000000 0.000000
0 12 2 2 total 1.071690 0.958290 material group out nuclide mean std. dev.
1 12 1 total 0 0
0 12 2 total 0 0

View file

@ -33,10 +33,10 @@ class MGXSTestHarness(PyAPITestHarness):
# Initialize a tallies file
self._input_set.tallies = openmc.TalliesFile()
self.mgxs_lib.add_to_tallies_file(self._input_set.tallies, merge=True)
self.mgxs_lib.add_to_tallies_file(self._input_set.tallies, merge=False)
self._input_set.tallies.export_to_xml()
def _get_results(self, hash_output=True):
def _get_results(self, hash_output=False):
"""Digest info in the statepoint and return as a string."""
# Read the statepoint file.
@ -53,7 +53,7 @@ class MGXSTestHarness(PyAPITestHarness):
# Build a string from Pandas Dataframe for each MGXS
outstr = ''
for domain in sorted(self.mgxs_lib.domains):
for domain in self.mgxs_lib.domains:
for mgxs_type in self.mgxs_lib.mgxs_types:
mgxs = self.mgxs_lib.get_mgxs(domain, mgxs_type)
df = mgxs.get_pandas_dataframe()

View file

@ -1 +1 @@
06e2f794c78d312491a87074b2e725d6f395fc250e004c125b50c1057b725ef1dbf3fd943629fd01b5a26ed018a1292712fc3425c925661ddadbf83194eb66df
7c1deb8a54fbe1a1ce6ef27cea4a11995210ad3e5ecf32bd83d7c80041edf0793378a7325ffe7ebf9c537e9c278fd4545642fec6c1e46b9c5418118f035d5e95

File diff suppressed because it is too large Load diff

View file

@ -33,10 +33,10 @@ class MGXSTestHarness(PyAPITestHarness):
# Initialize a tallies file
self._input_set.tallies = openmc.TalliesFile()
self.mgxs_lib.add_to_tallies_file(self._input_set.tallies, merge=True)
self.mgxs_lib.add_to_tallies_file(self._input_set.tallies, merge=False)
self._input_set.tallies.export_to_xml()
def _get_results(self, hash_output=True):
def _get_results(self, hash_output=False):
"""Digest info in the statepoint and return as a string."""
# Read the statepoint file.
@ -53,7 +53,7 @@ class MGXSTestHarness(PyAPITestHarness):
# Build a string from Pandas Dataframe for each MGXS
outstr = ''
for domain in sorted(self.mgxs_lib.domains):
for domain in self.mgxs_lib.domains:
for mgxs_type in self.mgxs_lib.mgxs_types:
mgxs = self.mgxs_lib.get_mgxs(domain, mgxs_type)
df = mgxs.get_pandas_dataframe()

View file

@ -320,6 +320,9 @@ class PyAPITestHarness(TestHarness):
outstr = '\n'.join([open(fname).read() for fname in xmls
if os.path.exists(fname)])
if 'MGXSTestHarness' in str(type(self)):
print(outstr)
sha512 = hashlib.sha512()
sha512.update(outstr.encode('utf-8'))
outstr = sha512.hexdigest()
@ -339,6 +342,9 @@ class PyAPITestHarness(TestHarness):
"""Make sure the current inputs agree with the _true standard."""
compare = filecmp.cmp('inputs_test.dat', 'inputs_true.dat')
if not compare:
f = open('inputs_test.dat')
for line in f.readlines(): print(line)
f.close()
os.rename('inputs_test.dat', 'inputs_error.dat')
assert compare, 'Input files are broken.'