Skip to content

Commit

Permalink
format,flake8: update python formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
vicentebolea committed Jul 28, 2023
1 parent 45f79c9 commit 15627b9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
for f_step in f:
shape_z = int(f_step.available_variables()['z']['Shape'])
print(shape_z)
assert(shape_z == int(shape[f_step.current_step()][0]))
assert (shape_z == int(shape[f_step.current_step()][0]))
8 changes: 4 additions & 4 deletions testing/adios2/bindings/python/TestBPPNGHighLevelAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ def CompressPNG(compression_level):

for i in range(0, Nx):
for j in range(0, Ny):
assert(u32s[i][j] == in_u32s[i][j])
assert(u8s[i][j][0] == in_u8s[i][j][0])
assert(u8s[i][j][1] == in_u8s[i][j][1])
assert(u8s[i][j][2] == in_u8s[i][j][2])
assert (u32s[i][j] == in_u32s[i][j])
assert (u8s[i][j][0] == in_u8s[i][j][0])
assert (u8s[i][j][1] == in_u8s[i][j][1])
assert (u8s[i][j][2] == in_u8s[i][j][2])


def main():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
with adios2.open("types_np.bp", "r", comm) as fr:

# file only
assert(fr.steps() == 5)
assert (fr.steps() == 5)

for fr_step in fr:

Expand Down
4 changes: 2 additions & 2 deletions testing/adios2/bindings/python/TestBPZfpHighLevelAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ def CompressZfp2D(rate):

for j in range(0, Ny):
for i in range(0, Nx):
assert(abs(r32s[j][i] - in_r32s[j][i]) < 1E-4)
assert(abs(r64s[j][i] - in_r64s[j][i]) < 1E-4)
assert (abs(r32s[j][i] - in_r32s[j][i]) < 1E-4)
assert (abs(r64s[j][i] - in_r64s[j][i]) < 1E-4)


def main():
Expand Down
10 changes: 5 additions & 5 deletions testing/adios2/bindings/python/TestNullEngine.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@

nullWriter = ioWrite.Open('NULL_py.bp', adios2.Mode.Write)

assert(nullWriter.Type() == "NullWriter")
assert (nullWriter.Type() == "NullWriter")

status = nullWriter.BeginStep()
assert(status == adios2.StepStatus.OK)
assert (status == adios2.StepStatus.OK)

nullWriter.Put(varTemperature, temperatures)
nullWriter.EndStep()
Expand All @@ -56,16 +56,16 @@
ioRead.SetEngine("null")
nullReader = ioRead.Open('NULL_py.bp', adios2.Mode.Read, MPI.COMM_SELF)

assert(nullReader.Type() == "NullReader")
assert (nullReader.Type() == "NullReader")

inTemperatures = np.zeros(1, dtype=np.int32)

status = nullReader.BeginStep()
assert(status == adios2.StepStatus.EndOfStream)
assert (status == adios2.StepStatus.EndOfStream)

var_inTemperature = ioRead.InquireVariable("temperature2D")

if(var_inTemperature is True):
if (var_inTemperature is True):
raise ValueError('var_inTemperature is not False')

# nullReader.Get(var_inTemperature, inTemperatures)
Expand Down

0 comments on commit 15627b9

Please sign in to comment.