Beispiel #1
0
    def setUp(self):
        TestCase.setUp(self)

        self.tmpdir = tempfile.mkdtemp()

        self.c = Converter()
        self.e = Exporter()
class TestPenelopeExporter(TestCase):
    def setUp(self):
        TestCase.setUp(self)

        self.tmpdir = tempfile.mkdtemp()

        self.c = Converter()
        self.e = Exporter()

    def tearDown(self):
        TestCase.tearDown(self)

        shutil.rmtree(self.tmpdir, ignore_errors=True)

    def testskeleton(self):
        self.assertTrue(True)

    def testexport(self):
        # Create
        ops = Options(name="test1")
        ops.beam.energy_eV = 30e3
        ops.detectors["trajectories"] = TrajectoryDetector(False)
        ops.limits.add(ShowersLimit(100))

        # Export
        opss = self.c.convert(ops)
        self.e.export(opss[0], self.tmpdir)
Beispiel #3
0
class TestPenelopeExporter(TestCase):
    def setUp(self):
        TestCase.setUp(self)

        self.tmpdir = tempfile.mkdtemp()

        self.c = Converter()
        self.e = Exporter()

    def tearDown(self):
        TestCase.tearDown(self)

        shutil.rmtree(self.tmpdir, ignore_errors=True)

    def testskeleton(self):
        self.assertTrue(True)

    def testexport(self):
        # Create
        ops = Options(name='test1')
        ops.beam.energy_eV = 30e3
        ops.detectors['trajectories'] = TrajectoryDetector(False)
        ops.limits.add(ShowersLimit(100))

        # Export
        opss = self.c.convert(ops)
        self.e.export(opss[0], self.tmpdir)
    def setUp(self):
        TestCase.setUp(self)

        self.tmpdir = tempfile.mkdtemp()

        self.c = Converter()
        self.e = Exporter()