Skip to content

Commit

Permalink
fix flake8 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jreadey committed Apr 22, 2024
1 parent e135c40 commit 0648dc1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
40 changes: 20 additions & 20 deletions test/hl/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,30 +37,31 @@
del fname
del testfile


def getTestFileName(basename, subfolder=None):
"""
Get filepath for a test case given a testname
"""
"""
Get filepath for a test case given a testname
"""

if config.get("use_h5py"):
filename = "out"
if config.get("use_h5py"):
filename = "out"
if not op.isdir(filename):
os.mkdir(filename)
if subfolder:
filename = op.join(filename, subfolder)
if not op.isdir(filename):
os.mkdir(filename)
if subfolder:
filename = op.join(filename, subfolder)
if not op.isdir(filename):
os.mkdir(filename)
filename = op.join(filename, f"{basename}.h5")
filename = op.join(filename, f"{basename}.h5")
else:
if "H5PYD_TEST_FOLDER" in os.environ:
filename = os.environ["H5PYD_TEST_FOLDER"]
else:
if "H5PYD_TEST_FOLDER" in os.environ:
filename = os.environ["H5PYD_TEST_FOLDER"]
else:
# default to the root folder
filename = "/"
if subfolder:
filename = op.join(filename, subfolder)
filename = op.join(filename, f"{basename}.h5")
return filename
# default to the root folder
filename = "/"
if subfolder:
filename = op.join(filename, subfolder)
filename = op.join(filename, f"{basename}.h5")
return filename


class TestCase(ut.TestCase):
Expand Down Expand Up @@ -233,7 +234,6 @@ def getFileName(self, basename, subfolder=None):
# Just call the external function
filename = getTestFileName(basename, subfolder=subfolder)


if config.get("use_h5py"):
filename = "out"
if not op.isdir(filename):
Expand Down
2 changes: 1 addition & 1 deletion test/hl/multi_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def run_benchmark(test_name, test_func, stats, datasets, num_iters):
if __name__ == '__main__':
print("Executing multi read/write benchmark")
shape = (100, 100, 100)
count = 4 # 64
count = 64
num_iters = 50
dt = np.int32
stats = {}
Expand Down
2 changes: 1 addition & 1 deletion test/hl/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
import h5pyd as h5py



def is_empty_dataspace(obj):
shape_json = obj.shape_json

if "class" not in shape_json:
raise KeyError()
if shape_json["class"] == 'H5S_NULL':
Expand Down

0 comments on commit 0648dc1

Please sign in to comment.