def metadata(): from pyne import dagmc dagmc.load(path) rets1 = [dagmc.volume_is_graveyard(x) for x in range(1, 5)] rets2 = [dagmc.volume_is_implicit_complement(x) for x in range(1, 5)] md = dagmc.volume_metadata(2) return [rets1, rets2, md]
def test_metadata(self): rets = [dagmc.volume_is_graveyard(x) for x in range(1, 5)] self.assertEqual(rets, [True, False, False, False]) rets = [dagmc.volume_is_implicit_complement(x) for x in range(1, 5)] self.assertEqual(rets, [False, False, False, True]) md = dagmc.volume_metadata(2) self.assertEqual(md['material'], 5) self.assertEqual(md['rho'], 0.5) self.assertTrue(all(x in md for x in ['material', 'rho', 'imp']))
def metadata(): from pyne import dagmc dagmc.load(path) rets = [dagmc.volume_is_graveyard(x) for x in range(1, 5)] assert_equal(rets, [True, False, False, False]) rets = [dagmc.volume_is_implicit_complement(x) for x in range(1, 5)] assert_equal(rets, [False, False, False, True]) md = dagmc.volume_metadata(2) assert_equal(md['material'], 5) assert_equal(md['rho'], 0.5) assert_true(all(x in md for x in ['material', 'rho', 'imp']))