Skip to content

Commit 6c6fe15

Browse files
committed
tests: direct falsiness for ROOT
Signed-off-by: Henry Schreiner <[email protected]>
1 parent bb19786 commit 6c6fe15

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/test_0414-write-jagged-arrays.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -200,15 +200,15 @@ def test_awkward_jagged_metadata(tmp_path):
200200

201201
b1 = t1.GetBranch("b1")
202202
assert b1.GetLeaf("b1").GetName() == "b1"
203-
assert b1.GetLeaf("b1").GetLeafCount() == None # noqa: E711 (ROOT null check)
203+
assert not b1.GetLeaf("b1").GetLeafCount()
204204

205205
nb2 = t1.GetBranch("nb2")
206206
assert nb2.GetLeaf("nb2").GetName() == "nb2"
207-
assert nb2.GetLeaf("nb2").GetLeafCount() == None # noqa: E711 (ROOT null check)
207+
assert not nb2.GetLeaf("nb2").GetLeafCount()
208208

209209
b2 = t1.GetBranch("b2")
210210
assert b2.GetLeaf("b2").GetName() == "b2"
211-
assert b2.GetLeaf("b2").GetLeafCount() != None # noqa: E711 (ROOT null check)
211+
assert b2.GetLeaf("b2").GetLeafCount()
212212
assert b2.GetLeaf("b2").GetLeafCount().GetName() == "nb2"
213213

214214
f1.Close()
@@ -237,20 +237,20 @@ def test_awkward_jagged_record_metadata(tmp_path):
237237

238238
b1 = t1.GetBranch("b1")
239239
assert b1.GetLeaf("b1").GetName() == "b1"
240-
assert b1.GetLeaf("b1").GetLeafCount() == None # noqa: E711 (ROOT null check)
240+
assert not b1.GetLeaf("b1").GetLeafCount()
241241

242242
nb2 = t1.GetBranch("nb2")
243243
assert nb2.GetLeaf("nb2").GetName() == "nb2"
244-
assert nb2.GetLeaf("nb2").GetLeafCount() == None # noqa: E711 (ROOT null check)
244+
assert not nb2.GetLeaf("nb2").GetLeafCount()
245245

246246
b2_x = t1.GetBranch("b2_x")
247247
assert b2_x.GetLeaf("b2_x").GetName() == "b2_x"
248-
assert b2_x.GetLeaf("b2_x").GetLeafCount() != None # noqa: E711 (ROOT null check)
248+
assert b2_x.GetLeaf("b2_x").GetLeafCount()
249249
assert b2_x.GetLeaf("b2_x").GetLeafCount().GetName() == "nb2"
250250

251251
b2_y = t1.GetBranch("b2_y")
252252
assert b2_y.GetLeaf("b2_y").GetName() == "b2_y"
253-
assert b2_y.GetLeaf("b2_y").GetLeafCount() != None # noqa: E711 (ROOT null check)
253+
assert b2_y.GetLeaf("b2_y").GetLeafCount()
254254
assert b2_y.GetLeaf("b2_y").GetLeafCount().GetName() == "nb2"
255255

256256
f1.Close()

0 commit comments

Comments
 (0)