scikit-hep / uproot5

ROOT I/O in pure Python and NumPy.
https://uproot.readthedocs.io
BSD 3-Clause "New" or "Revised" License
239 stars 76 forks source link

fix: 'AwkwardForth testing E' should use the last `fields`/`formats`, not first #1224

Closed jpivarski closed 6 months ago

jpivarski commented 6 months ago

We've never before had a C++ class with members in the following pattern:

  1. some basic type (int, float, bool...)
  2. some not basic type (string, collection, class...)
  3. more than one basic types

but it came up in #1221. It revealed a bug in which AwkwardForth statements are supposed to be generated from the last fields/formats list to be filled (these variables are both lists of lists), but the old code was looking at the first.

This was in the "AwkwardForth testing E" block, for the case in which there's more than just one fields/formats.

All of the tests/test_0637_setup_tests_for_AwkwardForth.py tests are insensitive to the code change, so this case doesn't exist in our test suite. It would be great to get example files from #1221 and add them to our test suite.