diff options
author | Andy Mastbaum <mastbaum@hep.upenn.edu> | 2012-05-01 11:46:30 -0400 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2021-05-09 08:42:39 -0700 |
commit | 8a4a94466930205826c638a69a3501b6aecd5006 (patch) | |
tree | 61196154e6b40e3cbebc9b7ac7fa7b75ec6f2d05 /test/test_detector.py | |
parent | b22129a30493e415a6d239cc64f1695eb1a8be93 (diff) | |
download | chroma-8a4a94466930205826c638a69a3501b6aecd5006.tar.gz chroma-8a4a94466930205826c638a69a3501b6aecd5006.tar.bz2 chroma-8a4a94466930205826c638a69a3501b6aecd5006.zip |
more unit test fixes
update remaining unit tests to build BVHs with
``loader.create_geometry_from_obj`` instead of the (removed) ``build``
method.
Diffstat (limited to 'test/test_detector.py')
-rw-r--r-- | test/test_detector.py | 7 |
1 files changed, 4 insertions, 3 deletions
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''' |