`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:
parent
13409a2449
commit
b1c7556239
|
@ -23,7 +23,9 @@ class PythonTwoRegressions(unittest.TestCase):
|
||||||
"""
|
"""
|
||||||
All classes defined by Tahoe-LAFS are new-style.
|
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():
|
for attr in mod.iterAttributes():
|
||||||
value = attr.load()
|
value = attr.load()
|
||||||
self.assertFalse(
|
self.assertFalse(
|
||||||
|
|
Loading…
Reference in New Issue