Summary
tests/test_bng_atomizer.py contains two assertions of the form
list.sort() == list.sort(), which compare the return values of
list.sort(). list.sort() sorts in place and returns None, so
both sides are always None and the assertion always passes —
regardless of the actual file listing.
Locations
tests/test_bng_atomizer.py:23 (in test_atomize_flat)
tests/test_bng_atomizer.py:42 (in test_atomize_atomized)
Example (line 22–23):
file_list = os.listdir(os.path.join(tfold, "test"))
assert file_list.sort() == to_match.sort()
Why this matters
These assertions were presumably intended to verify that the atomizer
produced the expected output filename(s) in the test output directory.
Today they verify nothing — even if the atomizer wrote the wrong files,
or no files, the test would still pass.
Suggested fix
Replace each occurrence with a real comparison, e.g.:
assert sorted(file_list) == sorted(to_match)
Note: the test output directory (tests/test/) is reused across runs
rather than being a fresh tmp_path. Once the assertion is real,
stale artifacts from prior runs may make it fail; the fix likely also
needs to switch the output directory to a per-test tmp_path (or
clean tests/test/ at setup).
Summary
tests/test_bng_atomizer.pycontains two assertions of the formlist.sort() == list.sort(), which compare the return values oflist.sort().list.sort()sorts in place and returnsNone, soboth sides are always
Noneand the assertion always passes —regardless of the actual file listing.
Locations
tests/test_bng_atomizer.py:23(intest_atomize_flat)tests/test_bng_atomizer.py:42(intest_atomize_atomized)Example (line 22–23):
Why this matters
These assertions were presumably intended to verify that the atomizer
produced the expected output filename(s) in the test output directory.
Today they verify nothing — even if the atomizer wrote the wrong files,
or no files, the test would still pass.
Suggested fix
Replace each occurrence with a real comparison, e.g.:
Note: the test output directory (
tests/test/) is reused across runsrather than being a fresh
tmp_path. Once the assertion is real,stale artifacts from prior runs may make it fail; the fix likely also
needs to switch the output directory to a per-test
tmp_path(orclean
tests/test/at setup).