We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 330019d commit e67c6abCopy full SHA for e67c6ab
1 file changed
test/python/unittest/API/APITest.py
@@ -2242,6 +2242,11 @@ def testSeriesConstructors(self):
2242
def testScalarHdf5Fields(self):
2243
if "hdf5" not in io.variants:
2244
return
2245
+ try:
2246
+ import h5py
2247
+ except ImportError:
2248
+ return
2249
+
2250
file = "../samples/scalar_hdf5.h5"
2251
series_write = io.Series(file, io.Access.create)
2252
E_x = series_write.write_iterations()[0].meshes["E"]["x"]
@@ -2250,7 +2255,6 @@ def testScalarHdf5Fields(self):
2255
series_write.close()
2256
2257
# Now turn E_x into a scalar
2253
- import h5py
2254
2258
with h5py.File(file, "r+") as f:
2259
E = f["data"]["0"]["meshes"]["E"]
2260
reapply_attributes = \
0 commit comments