importPackages only fixes the problem for "packages"

So just call load on every module before trying to iterate its attributes.
This commit is contained in:
Jean-Paul Calderone 2019-08-13 15:19:05 -04:00
parent 13409a2449
commit b1c7556239

View File

@ -23,7 +23,9 @@ class PythonTwoRegressions(unittest.TestCase):
"""
All classes defined by Tahoe-LAFS are new-style.
"""
for mod in getModule("allmydata").walkModules(importPackages=True):
for mod in getModule("allmydata").walkModules():
# Cannot iterate attributes of unloaded modules.
mod.load()
for attr in mod.iterAttributes():
value = attr.load()
self.assertFalse(