diff --git a/src/geant4_python_application/files/datasets.py b/src/geant4_python_application/files/datasets.py index 05ee991..5f5055d 100644 --- a/src/geant4_python_application/files/datasets.py +++ b/src/geant4_python_application/files/datasets.py @@ -199,7 +199,9 @@ def install_datasets(show_progress: bool = True): return # check if the datasets are present in the corresponding Geant4 directory - if not bool(missing_datasets(os.environ["GEANT4_DATA_DIR"])): + if "GEANT4_DATA_DIR" in os.environ and not bool( + missing_datasets(os.environ["GEANT4_DATA_DIR"]) + ): # return ... diff --git a/tests/test_application.py b/tests/test_application.py index f43d1f0..8a73463 100644 --- a/tests/test_application.py +++ b/tests/test_application.py @@ -54,7 +54,7 @@ def test_seed_single_thread(): 8.09506886e-03, 1.22345221e00, ] - energy = np.array(events.track.step.energy[0][0][0:5]) + energy = np.asarray(events.track.step.energy[0][0][0:5]) assert np.allclose(energy, reference_value, atol=1e-5) assert app.seed == 1100