From 8a4a94466930205826c638a69a3501b6aecd5006 Mon Sep 17 00:00:00 2001 From: Andy Mastbaum Date: Tue, 1 May 2012 11:46:30 -0400 Subject: more unit test fixes update remaining unit tests to build BVHs with ``loader.create_geometry_from_obj`` instead of the (removed) ``build`` method. --- test/test_detector.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'test/test_detector.py') diff --git a/test/test_detector.py b/test/test_detector.py index 9660e59..e1ff622 100644 --- a/test/test_detector.py +++ b/test/test_detector.py @@ -2,6 +2,7 @@ import unittest import numpy as np from chroma.geometry import Solid, Geometry, vacuum +from chroma.loader import create_geometry_from_obj from chroma.detector import Detector from chroma.make import box from chroma.sim import Simulation @@ -17,10 +18,10 @@ class TestDetector(unittest.TestCase): cube.set_time_dist_gaussian(1.2, -6.0, 6.0) cube.set_charge_dist_gaussian(1.0, 0.1, 0.5, 1.5) - cube.build(use_cache=False) + geo = create_geometry_from_obj(cube, update_bvh_cache=False) - self.cube = cube - self.sim = Simulation(cube, geant4_processes=0) + self.geo = geo + self.sim = Simulation(self.geo, geant4_processes=0) def testTime(self): '''Test PMT time distribution''' -- cgit